![]() The basic syntax of the sudo command is as follows: sudo COMMAND It provides a secure way to perform administrative tasks without the need for logging in as the root user. The ‘superusers’ or ‘root’ are the authorized users who get the elevated privilege to execute specific administrative commands and get the permissions to carry out any operations on the system. Sudo, which stands for ‘ Superuser Do’, is a powerful utility, used in Linux and Unix-based operating systems. To understand the sudo apt update command in detail, let’s break down the terms used: What is “sudo”? The package manager (in this case ‘apt’) needs to know which packages are available and where to find them to install software or packages on your system. It downloads package details from all set sources to refresh the package cache. In Linux-based operating systems, particularly Ubuntu, the sudo apt update command essentially serves as an instruction to update the local package index. 5.How to update package cache? Understanding the “sudo apt update” Command Now that we’ve finished upgrading Ubuntu, let’s see how to verify the upgrade has been successful. If you select 'y' the system will be restarted. To finish the upgrade, a restart is required. In this case, we’ll input yes for the last time in the terminal to proceed: System upgrade is complete. The final prompt asks us to restart the system in order to finish the upgrade process. Here, we’ll again type yes to give permission and move on to the final step: Searching for obsolete software The next prompt seeks permission to remove outdated packages from the distro. Once theĭownload has finished, the process cannot be canceled. ![]() This download will take aboutġ minute with a 40Mbit connection and about 15 minutes with a 5Mbitįetching and installing the upgrade can take several hours. In this case, we’ll type yes in the terminal to validate the information and proceed to the next step: 4 packages are going to be removed. Then, we’ll see some information regarding the upgrade and a prompt that urges us to verify the information. Here, we’ll hit Enter to give permission and start the upgrade process: Do you want to start the upgrade? The first prompt asks for permission to start upgrading Ubuntu. ![]() We’ve typed yes in the terminal when prompted to continue with the package upgrade process.Īfter the process is complete, we’ll use the apt autoremove command to remove all the unnecessary packages from the distro and also utilize the –purge option to remove all of their configuration files too: Libc-bin libc-dev-bin libc6 libc6-dev libx11-6 libx11-dataĦ upgraded, 0 newly installed, 2 to remove and 0 not upgraded.Īfter this operation, 102 kB of additional disk space will be used. So, let’s upgrade them using the apt upgrade command: $ sudo apt upgrade Moreover, we have to be a root user to perform this operation, so we’ve used the sudo command.Īs we can see, there are six packages that can be upgraded in this case. ![]() When we combine it with the update command, it updates the package list on the distro and gives us a list of upgradable packages. The apt command works as a package manager on Ubuntu and other Debian-based distros. Get:10 focal-updates amd64 Contents (deb)Ħ packages can be upgraded. Get:8 focal-security amd64 Contents (deb)
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |