mirror of
https://github.com/LCTT/TranslateProject.git
synced 2024-12-26 21:30:55 +08:00
160 lines
6.1 KiB
Markdown
160 lines
6.1 KiB
Markdown
|
[#]: subject: "How to Switch from Debian Stable to Testing"
|
|||
|
[#]: via: "https://itsfoss.com/switch-debian-stable-testing/"
|
|||
|
[#]: author: "Sagar Sharma https://itsfoss.com/author/sagar/"
|
|||
|
[#]: collector: "lkxed"
|
|||
|
[#]: translator: " "
|
|||
|
[#]: reviewer: " "
|
|||
|
[#]: publisher: " "
|
|||
|
[#]: url: " "
|
|||
|
|
|||
|
How to Switch from Debian Stable to Testing
|
|||
|
======
|
|||
|
|
|||
|
If you are looking for the most stable Linux distribution, sure, Debian is the right choice.
|
|||
|
|
|||
|
Especially if you are planning to use it on servers.
|
|||
|
|
|||
|
But, on the desktop side, things are a bit different. I mean, you are given packages that are at least a year old and support for new-age hardware is even worse.
|
|||
|
|
|||
|
So what do you do in those cases, Well, you can use Debian testing!
|
|||
|
|
|||
|
But before jumping to the explanation part, let’s briefly understand Debian testing.
|
|||
|
|
|||
|
### What is Debian Testing?
|
|||
|
|
|||
|
Debian offers you 3 variants of Debian:
|
|||
|
|
|||
|
- Debian stable (what you get by default from their homepage).
|
|||
|
- Debian testing (has **newer packages** and breaks less often than Debian unstable).
|
|||
|
- Debian unstable (has the most recent packages and is **considered the most fragile of all**).
|
|||
|
|
|||
|
So Debian testing can be considered a sweet spot between stability and fresh packages.
|
|||
|
|
|||
|
I’ve been playing around with Debian testing for some time and haven’t faced any issues.
|
|||
|
|
|||
|
In fact, many Debian users prefer the testing variant over the stable version. Despite the name testing, it is pretty usable.
|
|||
|
|
|||
|
But still, **I would recommend you to experiment with this on VM,** try using it with your primary tools and if things go well, you can apply those changes in the main system.
|
|||
|
|
|||
|
### Switch from Debian stable to Debian testing
|
|||
|
|
|||
|
**_Warning: You can not downgrade from Debian testing to Debian stable, as installer scripts and installation tools are only designed to replace the older version with the new one._**
|
|||
|
|
|||
|
Also, I would recommend [using timeshift to create a backup][1] before applying the shown steps on your main machine.
|
|||
|
|
|||
|
First, update the existing packages using the given command:
|
|||
|
|
|||
|
```
|
|||
|
sudo apt update && sudo apt upgrade -y
|
|||
|
```
|
|||
|
|
|||
|
Next, make a copy of original `sources.list` file:
|
|||
|
|
|||
|
```
|
|||
|
sudo cp /etc/apt/sources.list sources.list.backup
|
|||
|
```
|
|||
|
|
|||
|
Now, let’s start with the first step.
|
|||
|
|
|||
|
#### Step 1: Edit sources.list file
|
|||
|
|
|||
|
There are two ways of editing `sources.list` file. Either you can manually alter the current release name with `testing` or you can [use the sed command][2] to get your job done.
|
|||
|
|
|||
|
And I’m going with a 2nd one to make the whole process easier. You just have to use the given command, and it will replace `bullseye` with `testing` for you:
|
|||
|
|
|||
|
```
|
|||
|
sudo sed -i 's/bullseye/testing/g' /etc/apt/sources.list
|
|||
|
```
|
|||
|
|
|||
|
Now, open your terminal and use the given command to open `sources.list` files:
|
|||
|
|
|||
|
```
|
|||
|
sudo nano /etc/apt/sources.list
|
|||
|
```
|
|||
|
|
|||
|
And comment out the lines having `security.debian.org` and anything that ends with `-updates` as shown below:
|
|||
|
|
|||
|
![comment out security sources][3]
|
|||
|
|
|||
|
If you are using nano as I do, you can press `Alt + /` to jump to the end of the line. And then you have to add the following line:
|
|||
|
|
|||
|
```
|
|||
|
deb http://security.debian.org testing-security main
|
|||
|
```
|
|||
|
|
|||
|
![2. add line to keep track of testing in debian][4]
|
|||
|
|
|||
|
And [save the changes and exit from the nano][5] text editor.
|
|||
|
|
|||
|
#### Step 2: Update the Repository and install new packages
|
|||
|
|
|||
|
Now, update the repository index, and it will show you a massive update pending:
|
|||
|
|
|||
|
```
|
|||
|
sudo apt update
|
|||
|
```
|
|||
|
|
|||
|
![update repository in linux][6]
|
|||
|
|
|||
|
Now, you can use the given command, and it will get you the most recent packages:
|
|||
|
|
|||
|
```
|
|||
|
sudo apt upgrade
|
|||
|
```
|
|||
|
|
|||
|
Sit back and relax as it is going to take a while.
|
|||
|
|
|||
|
Once done, it will present you with the list of changes made as you switched from Debian stable to testing:
|
|||
|
|
|||
|
![packages that are updated when switched to debian testing][7]
|
|||
|
|
|||
|
You can read if you want or you can **just press q** to proceed further.
|
|||
|
|
|||
|
Now, it will show you the message that some of the libraries installed on your system needs to restart. Press the **TAB** key, and it will select the **OK** option, and then press **Enter:**
|
|||
|
|
|||
|
![libraries needs to be restarted after update][8]
|
|||
|
|
|||
|
Next, it will ask you whether you want to restart services during the package upgrade. Here you have a choice. As I’m doing this for desktop usage only, I will go with `YES`:
|
|||
|
|
|||
|
![restart services during package upgrades without asking?][9]
|
|||
|
|
|||
|
Once done, you can reboot your system and then use the following command to have full effect from the changes you’ve just made:
|
|||
|
|
|||
|
```
|
|||
|
sudo apt full-upgrade
|
|||
|
```
|
|||
|
|
|||
|
Now, reboot your system, and you’ll have the most recent packages. Such as **I was running GNOME 43** when I got into the system:
|
|||
|
|
|||
|
![running gnome 43 in debian][10]
|
|||
|
|
|||
|
### Wrapping Up
|
|||
|
|
|||
|
In this tutorial, I explained how you could switch from Debian stable to Debian testing. I hope this will be helpful to you.
|
|||
|
|
|||
|
And if you face any issues or have any queries, let me know in the comments.
|
|||
|
|
|||
|
--------------------------------------------------------------------------------
|
|||
|
|
|||
|
via: https://itsfoss.com/switch-debian-stable-testing/
|
|||
|
|
|||
|
作者:[Sagar Sharma][a]
|
|||
|
选题:[lkxed][b]
|
|||
|
译者:[译者ID](https://github.com/译者ID)
|
|||
|
校对:[校对者ID](https://github.com/校对者ID)
|
|||
|
|
|||
|
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
|||
|
|
|||
|
[a]: https://itsfoss.com/author/sagar/
|
|||
|
[b]: https://github.com/lkxed
|
|||
|
[1]: https://itsfoss.com/backup-restore-linux-timeshift/
|
|||
|
[2]: https://linuxhandbook.com/sed-command-basics/
|
|||
|
[3]: https://itsfoss.com/wp-content/uploads/2022/11/comment-out-security-sources.gif
|
|||
|
[4]: https://itsfoss.com/wp-content/uploads/2022/11/2.-add-line-to-keep-track-of-testing-in-debian.png
|
|||
|
[5]: https://linuxhandbook.com/nano-save-exit/
|
|||
|
[6]: https://itsfoss.com/wp-content/uploads/2022/11/update-repository-in-linux.png
|
|||
|
[7]: https://itsfoss.com/wp-content/uploads/2022/11/packages-that-are-updated-when-switched-to-debian-testing.png
|
|||
|
[8]: https://itsfoss.com/wp-content/uploads/2022/11/libraries-needs-to-be-restarted-after-update.png
|
|||
|
[9]: https://itsfoss.com/wp-content/uploads/2022/11/restart-services-during-package-upgrades-without-asking.png
|
|||
|
[10]: https://itsfoss.com/wp-content/uploads/2022/11/running-gnome-43-in-debian.png
|