This little How To Update & Upgrade Debian Linux describes how to keep Debian Linux up to date. It maybe works for other Linux distributions, such as Ubuntu too. Additionally, it provides some further background on system updates. Please ensure you have made a backup before you start with this how to.
Content of this How To Update & Upgrade Debian Linux
- Quick steps – three steps to update and upgrade Debian Linux
1. Three steps are required
In order to get Debian Linux updated, three simple steps should be executed. This started with opening a console on the Debian Linux box itself or to connect via for example SSH to the Debian Linux box. For the below example connecting tho the Debian Linux box via SSH was used.
- Login to your Debian Linux console by for example leveraging on SSH
- Send the command “sudo apt-get update” and hit enter
- Following the second bullet point the command of “sudo apt-get upgrade” should be executed
- That’s it. nothing else to be done. However, there is a way for simplification! So lets have a look at it in section 2.
2. Simplification of How To Update & Upgrade Debian Linux
There is a more simple way that allows to reduce the work to be done by simply executing one command. For doing so, we leverage on one of the advantages Linux is providing on the command line. This advantage is to combine commands into one. This not only can be used to update Linux like in the below example, but also for combining many other commands on the command line. I could write a book about this, however, lets focus on updating and upgrading the Debian Linux box.
Instead of writing the two command of “sudo apt-get update” and “sudo apt-get upgrade” an easy simplification is possible: Simply type “sudo apt-get update && sudo apt-get upgrade“
The Update command “sudo apt-get update” is used to re-synchronize the package index files from their sources. The indexes of available packages are fetched from the location(s) specified in /etc/apt/sources.list
The Upgrade command “sudo apt-get upgrade” is used to install the newest versions of all packages currently installed on the system from the sources enumerated in /etc/apt/sources.list.
The Update & Upgrade command “sudo apt-get update && sudo apt-get upgrade” simply combines both into one, hence allowing to reduce typing one command.
More details above these commands can be found in the unix man-page by typing “man apt-get” on the linux command line or in the internet. Link to the Debian Linux man pages man apt-get internet source.