Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to upgrade Debian 9 to Debian 10 through the command line in linux

2025-04-11 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

This article mainly introduces how to upgrade Debian 9 to Debian 10 in linux through the command line, which has a certain reference value, and interested friends can refer to it. I hope you can learn a lot after reading this article.

After almost two years of development, the Debian team finally released a stable version of Debian 10 with the code name Buster. Buster is a version of LTS (long-term support), so it will be supported by Debian for 5 years in the future.

New features of Debian 10 (Buster)

Debian 10 (Buster) returns a large number of new features to most Debian enthusiasts. Some features include:

GNOME Desktop 3.30

AppArmor is enabled by default

Support for Linux kernel 4.19.0-4

Support for OpenJDk 11.0

Upgrade from Nodejs 4-8 to Nodejs 10.15.2

Replace Iptables with NFTables

Wait.

Step by step upgrade Guide from Debian 9 to Debian 10

Before we start upgrading Debian 10, let's take a look at the prerequisites for the upgrade:

Step 1) prerequisites for Debian upgrade

A good network connection

Root user rights

Data backup

It is extremely important to back up all your application code bases, data files, user account details, and configuration files so that you can always revert to the previous version in the event of an upgrade error.

Step 2) upgrade the existing package of Debian 9

The next step is to upgrade all your existing packages, because some packages are marked as reserved and cannot be upgraded, and upgrading from Debian 9 to Debian 10 may fail or cause problems. Therefore, we do not take any risks to better upgrade the package. Use the following code to upgrade the package:

Root@linuxtechi:~$ sudo apt update & & sudo apt upgrade-y step 3) modify the package repository file / etc/sources.list

The next step is to modify the package repository file / etc/sources.list, and you need to replace Stretch with the text Buster.

However, before you change anything, be sure to create a backup of the sources.list file as follows:

Root@linuxtechi:~$ sudo cp / etc/apt/sources.list / etc/apt/sources.list.bak

Now use the following sed command to replace stretch with buster in the package repository file, as shown below:

Root@linuxtechi:~$ sudo sed-I's Universe BUSTERCHUR G'/ etc/apt/sources.listroot@linuxtechi:~$ sudo sed-I's Universe STRETCHGUBER G'/ etc/apt/sources.list.d/*.list

After the update, you need to update the package repository index as follows:

Root@linuxtechi:~$ sudo apt update

Before we start upgrading your existing Debian operating system, let's verify the current version with the following command

Root@linuxtechi:~$ cat / etc/*-releasePRETTY_NAME= "Debian GNU/Linux 9 (stretch)" NAME= "Debian GNU/Linux" VERSION_ID= "9" VERSION= "9 (stretch)" ID=debianHOME_URL= "https://www.debian.org/"SUPPORT_URL="https://www.debian.org/support"BUG_REPORT_URL="https://bugs.debian.org/"root@linuxtechi:~$ step 4) upgrade from Debian 9 to Debian 10

After you've made all the changes, it's time to upgrade from Debian 9 to Debian 10. But before you do, make sure to update your package as follows:

Root@linuxtechi:~$ sudo apt update & & sudo apt upgrade-y

During the package upgrade, you will be prompted to start the service, so choose the option you prefer.

Once all the software packages of your system have been upgraded, upgrade the packages of your distribution. Use the following code to upgrade the release:

Root@linuxtechi:~$ sudo apt dist-upgrade-y

The upgrade process may take some time, depending on the speed of your network. Remember that during the upgrade process, you will be asked questions about whether you need to restart the service after the package upgrade, whether you need to keep existing configuration files, and so on. If you don't want to make some custom changes, simply type "Y" to allow the upgrade process to continue.

Step 5) verify the upgrade

Once the upgrade process is complete, restart your machine and check the version using the following methods:

Root@linuxtechi:~$ lsb_release-a

If you get the following output:

Distributor ID: DebianDescription: Debian GNU/Linux 10 (buster) Release: 10Codename: busterroot@linuxtechi:~$

Yes, you have successfully upgraded from Debian 9 to Debian 10.

Verify the alternate method for the upgrade:

Root@linuxtechi:~$ cat / etc/*-releasePRETTY_NAME= "Debian GNU/Linux 10 (buster)" NAME= "Debian GNU/Linux" VERSION_ID= "10" VERSION= "10 (buster)" VERSION_CODENAME=busterID=debianHOME_URL= "https://www.debian.org/"SUPPORT_URL="https://www.debian.org/support"BUG_REPORT_URL="https://bugs.debian.org/"root@linuxtechi:~$ Thank you for reading this article carefully. I hope the article "how to upgrade Debian 9 to Debian 10 in linux through the command line" shared by the editor is helpful to everyone. At the same time, I also hope that you can support us and pay attention to the industry information channel. More related knowledge is waiting for you to learn!

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.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report