5/16/2023 0 Comments Sudo apt updateThe apt-get update or apt update Linux commands are used to update the package information. Similarly, before you upgrade, you should first update the package information also, unless you update the sources list. It can only know by updating the package information using the apt-get command. It is recommended to do so since your kernel has no idea if the current version of the installed programs is the latest. You’ve noticed that before installing packages on Linux, you need to run apt-get update. Why Run apt-get update Before Installing Packages on Linux? They are the URLs indicating where to source the package information. Only the lines not commented, with a # before them, get executed. The kernel uses the configured sources and gets the latest version of each package. The configured sources are different depending on the kernel version you are running. The package information includes the location of each repository from where a package can be sourced and installed. All packages available for installation for the current kernel version are contained in the source list. The configured sources get defined in the sources.list file and you can open it using an editor or other commands. When all packages update their information, the last line indicates everything is up-to-date, as shown below. ![]() Hit suggests no change in the package, and Ign means a given package has been ignored. The Get indicates that there are versions of the package available. When you run the command, it instructs the kernel to use the configured sources to update the package information.Īlso, you will note various keywords, including Get, Hit, and Ign. Therefore, apt-get update downloads the information for all packages listed in the sources file. You can add, remove, or update any installed packages with either of the commands. ![]() The kernel uses the apt or apt-get GNU commands to manage the packages and software. Ubuntu and Linux are open-source and run on the Linux kernel. In the above, sudo (super-user-do) gives you administrator privileges, but if you are running as root, you don’t need to include it.
0 Comments
Leave a Reply. |