en
  English
Phone :  +370 (5) 204-1903
Email: sales@1gbits.com
  1. Dedicated server
  2. Blog
  3. How to update Linux: Debian, CentOS, Ubuntu, Fedora

How to update Linux: Debian, CentOS, Ubuntu, Fedora

In the current era, many people use different Linux distros as every Linux distro offers amazing features. These operating systems are rapidly developing to provide the best user experience possible for the users. Users get regular updates, and the operating system notifies a user about updates. However, sometimes users don't get notified about the updates. In such cases, one must update the distros manually to stay updated with new features. Confused about where to begin? Do Not Worry! because there are various ways to update Linux distros manually. We have covered complete information on updating different Linux distros easily.

Linux Tutorial Jun 02, 21 by Nisal N 7 min Read
How to update Linux: Debian, CentOS, Ubuntu, Fedora

How to Update Linux?

We have divided this section into multiple parts in which we will explain the procedures to update the Linux distros such as Ubuntu, CentOS, Debian, Fedora.

How to Update Ubuntu

Explained below are two ways to update Ubuntu easily:

Update Ubuntu by the Command Line

  • Open the terminal in the system from the menu and execute the following command: 

sudo apt update && sudo apt upgrade -y

  • The above command line has "sudo,"  the system will ask for the password. Remember, you will not be able to see characters on the screen while you type the password. 
  • The system will start the updating procedure once you type the password.  The above command line is the combination of two different commands. The "&&" is a command for running various commands on Linux so that the system can run every command one by one. 
  • The "-y" in the command line enters "yes" automatically, while the "apt upgrade" asks the user's confirmation before installing any update. 
  • In case you want to perform the tasks separately, then use the following: 

sudo apt update
sudo apt upgrade

  • After executing the command, the system will start to update the local database of the packages. In case this command line doesn't run currently, then your local database will not get updated. 
  • After executing the command, you will see various links on the screen because these links are the package information of different repositories. If you want to see the upgrade packages list, then run the following command: 

apt list --upgradable

  • This command works to match the versions of all installed packages with your local database. It also collects the information and lists those packages which have the latest versions available. 
  • Now, the system will ask to update the package, type "Y," and press enter to confirm the installation. 

Update Ubuntu using GUIs

If you want to update the Ubuntu packages using GUI tools, you can use"Software Updater". 

  • Click on this tool and check if there is any update available for the system. 
  • If you see any updates available, then you will see an option to install the updates. 
  • You install updates by the Update Manager in Ubuntu and click on the "Install Now". It may ask for the password, provide the password of your system. 
  • In some cases, the system requires a reboot to install the updates for working; you will get a message to reboot the system in the end update.
  • Make sure you clean up after an update to remove unnecessary packages and free up some space. Use the following command to perform the clean up: 

sudo apt autoremove

How to Update CentOS 

  • First, check the current version of CentOS, use the following command to do it: 

cat /etc/redhat-release

  • The system will show the complete details of the CentOS Linux release version.
  • Make sure to create a complete backup of your files before running the system upgrade procedure. 
  • Now, check the available updates using the following commands: 

sudo yum check-update

  • After executing the commands, you will see the information of available updates. 
  • The yum package manager works to update the system, and it can accumulate the additional listing and downloaded data. For clearing this data, run the following commands: 

sudo yum clean all

  • Now, reboot the server using:

# reboot

  • Update the CentOS using the following command: 

sudo yum update

  • After executing the commands, the system will provide the package list and the space required for downloading these packages. Press "Y" to confirm the update procedure. 
  • Finally, verify the current version of CentOS by using the following command: 

cat /etc/redhat-release

  • The system will provide the complete details of your current CentOS version. 

How to Update Fedora

In this section, we will describe two different procedures to update Fedora easily.

Update Fedora by Software Center

Most of the time, the system notifies the user to update the system whenever the new version is available. So users can click on the notification, and the system will launch the software center.

  • If you follow this way, click on the "update" in the software center to update the system. In case you don't receive the notification, then go to the software center and check for the updates. 
  • You can also update the system from the Settings option, open the Settings option and go to the details section at the bottom of the options list.
  • You will see a "Check for Updates" button in the details section,  click on it to scan for any latest update. If you find any update, click on it and provide the password to start the update. 

Update Fedora by the Command Line

  • Open the Linux terminal and execute the following command: 

sudo dnf upgrade

  • After executing the command, provide the admin password to start the procedure. 
  • Many users prefer dnf update instead of dnf upgrade, but both of these commands do the same work. 
  • Finally, you can reboot your system once your system updates successfully.

How to Update Debian

  • First, you make a backup of your file before starting the update and execute the following command to update the package list: 

$ sudo apt update

  • Use the following command to see the upgradable package list before starting the update. 

$ sudo apt list --upgradable

  • Now, execute the following command to upgrade all of the upgradable packages: 

$ sudo apt upgrade

  • After upgrading the system, use the below command to restart the server:

$ sudo reboot

  • In case you want to accept the default and then start the upgrade procedure, execute the following command: 

$ sudo apt update && sudo apt upgrade -y

  • In the above command,  "-y," which means this command will allow the system to start the upgrade automatically.
  • It is optional to remove old packages, use the following command  to remove old dependencies and packages: 

$ sudo apt autoremove

Conclusion 

We have provided complete information on updating different Linux distros like CentOS, Debian, Ubuntu, Fedora. Linux has a huge list of operating systems that are used for completing different tasks easily. If you use any Linux operating system, make sure you update your system regularly, as these updates help eliminate errors and get the newest options. We have every possible way to update the Linux distros without having any trouble. Remember that implement the above procedures carefully because you can get errors if you put any wrong command to update packages. 

author img

Nisal N

Computers has always fascinated me since I was a kid and here we are. I love travelling for 2 reasons: the first one to see a new part of the world and second (the most important one) to experience the rich culture hidden among the country and people. I'm pretty good at cooking but very poor when it comes to baking.

Leave A Comment