How to Check Debian Version? Upgrade Debian from 8 to 9 and10

Debian is a Linux distribution based on the GNU operating system. It was founded in 1993 by Ian Murdock and it has since grown to become one of the most popular desktop, server and laptop systems used today. Debian’s popularity does not depend only on its stability but also because you can find pre-built packages for any kind of software that may be needed.

The project strives to provide an OS with up-to-date software packages while staying true to their goals as free open source software (FOSS). One way they do this is through strict development policies where anyone who wants to contribute code must first have experience programming under FOSS conditions or contributing for at least six months before being allowed access.

 It is important to stay up to date with your software version because there are updates and patches which might be necessary for security purposes. Sometimes, a new update provides performance improvements or even adds features you never knew were possible!

How to Check Debian Version with Command Line

You can simply check the version by using the following command:

cat /etc/os-release

The output of the command is as below:

PRETTY_NAME="Debian GNU/Linux 9 (stretch)"
NAME="Debian GNU/Linux"
VERSION="9 (stretch)"

To get minor version of the Debian OS, you can use lsb_release -d.

lsb_release -d

Description:    Debian GNU/Linux 9.13 (stretch)

Upgrade Debian 8 to 9

It is recommended to upgrade current OS to next major version, i.e. from 8 to 9 and 9 to 10. Don’t upgrade 8 to 10 directly! Furthermore, test your upgrade on test environment first because there is a chance that it may destabilize your system.

Update Package Manager and Repositories

Firstly, we need to remove all outdated software then update all software, including the Debian OS, to the latest version. These steps help make sure you have the latest and best-patched version of the software and since they are latest, they are compatible with new OS.

sudo aptitude search “~o”
sudo apt-get update
sudo apt-get upgrade
sudo apt-get dist-upgrade

Add Debian 9 Repositories

We need to modify the sources.list file under /etc/apt/sources.list to replace Debian 8 repositories with 9 one.

sudo nano /etc/apt/sources.list

Update content with this list

deb stretch main contrib non-free
deb stretch-updates main contrib non-free
deb stretch/updates main contrib non-free

Update From Debian 8 (Jessie) to 9 (Stretch)

Run these command lines in order to upgrade operating system:

sudo apt-get update
sudo apt-get upgrade
sudo apt-get dist-upgrade

After it is completed, you can check the current OS version with the tutorial in the first part of this blog post.

Upgrade Debian 9 (Stretch) to 10 (Buster)

You can follow all steps like upgrading from version 8 to 9. Only need to replace content of the sources.list with Debian 10 Buster’s repositories.

deb debian buster main

deb buster-updates main

deb buster/updates main

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top

By continuing to use the site, you agree to the use of cookies. more information

The cookie settings on this website are set to "allow cookies" to give you the best browsing experience possible. If you continue to use this website without changing your cookie settings or you click "Accept" below then you are consenting to this.