In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-29 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article is about how to update Ubuntu in the terminal and graphical interface. Xiaobian thinks it is quite practical, so share it with everyone for reference. Let's follow Xiaobian and have a look.
Update Ubuntu via Command Line
On the desktop, open the terminal. You can find it in the menu or use Ctrl+Alt+T shortcut keys. If you are logged into an Ubuntu server, you are already accessing a terminal.
In the terminal, you only need to use the following command:
sudo apt update && sudo apt upgrade -y
It will ask you for your password, and you can use your account password. When typing, you won't see anything on the screen, so please continue typing your password and press Enter.
Now, let me explain the order above.
In fact, it is not an order. It consists of two commands. The symbol && is one way to combine two commands, the second command being executed only if the previous command is successful.
When the apt upgrade command asks you to confirm before installing the update, the final argument-y automatically enters yes.
Note that you can also use these two commands one by one:
sudo apt updatesudo apt upgrade
This will take longer because you have to wait for *** command execution to complete before entering the second command.
Sudo apt update
This command updates the local database of available packages. If you do not run this command, the local database will not be updated and your system will not know if a new version is available.
That's why when you run sudo apt update, you'll see a lot of URLs in the output. This command fetches package information from the corresponding repository (the URL you see in the output).
Update Ubuntu Linux
At the end of the command, it tells you how many packages can be updated. You can view these packages using the following command:
apt list --upgradable
Additional reading: Read this article to learn what Ign, Hit, and Get are in the output of the command apt update.
Sudo apt upgrade
This command matches the installed package version to the local database. It collects all the information and then lists all the packages with updated versions. At this point, it asks you if you want to upgrade (an installed package is updated to a new version).
Update Ubuntu Linux via Command Line
You can type yes, y, or just hit enter to confirm installing these updates.
So in general, sudo apt update checks for new versions available, while sudo apt upgrade actually performs the update.
The command update can be confusing because you might expect to update your system by issuing the command apt update to install updates, but that doesn't happen.
Update Ubuntu via GUI (for desktop users)
If you are using Ubuntu on desktop, you do not need to open a terminal in order to update your system. You can still use command-line updates, but that's just an option.
In the menu, find "Software Update" and run it.
Running Software Updater in Ubuntu
It will check if updates are available for your system.
Check if Ubuntu has updates available
If an update is available, it will give you the option to install it.
Install updates in Ubuntu via Update Manager
Now, click "Install" and it may ask you for a password.
Install updates in Ubuntu Linux via GUI
Once you enter your password, it will start installing updates.
Update Ubuntu via GUI
In some cases, you may need to restart your system for the installed updates to work properly. If you need to restart the system, you will receive a notification at the end of the update.
Update Ubuntu via GUI
If you don't want to restart your system right away, you can choose to restart later.
Install updates in Ubuntu via GUI
Tip: if "software update" returns an error, you need to use the command sudo apt update in the terminal. The *** lines of the output will contain the actual error message. You can search the Internet for the bug and fix it.
A few things to remember when updating Ubuntu
You just learned how to update your Ubuntu system. If you're interested, you'll also need to know something about Ubuntu updates.
Clean up after update
Your system will have some updated packages that are no longer needed. You can delete these packages and free up space using this command:
sudo apt autoremove kernel hotfix in Ubuntu Server to avoid restart
If it is a Linux kernel update, you will need to reboot after the system update. This can be a problem when you don't want server downtime.
Hotfixes allow the Linux kernel to be patched while it is running continuously. In other words, you don't need to restart your system.
If you are managing servers, you may need to enable hotfix in Ubuntu.
Version upgrades are different
The update discussed in this article is to keep your installed Ubuntu ***. But it does not include version upgrades (such as upgrading from Ubuntu 16.04 to 18.04).
Ubuntu version upgrades are quite another matter. It updates the entire operating system core. You need to make backups before this lengthy process begins.
Thank you for reading! About "how to update Ubuntu in the terminal and graphical interface" this article is shared here, I hope the above content can be of some help to everyone, so that everyone can learn more knowledge, if you think the article is good, you can share it to let more people see it!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.