To upgrade from Debian Linux 8 Jessie to Debian 9 Stretch using command line over an SSH-based session, follow these steps:
- Log in to your Jessie system using SSH:
ssh user@hostname
- Update the package index:
sudo apt-get update
- Upgrade the system to the latest version of Jessie:
sudo apt-get upgrade
- Make a backup of important data and configurations.
- Edit the file
/etc/apt/sources.list
and replace all instances ofjessie
withstretch
:sudo nano /etc/apt/sources.list
- Update the package index again:
sudo apt-get update
- Run the upgrade command:
sudo apt-get dist-upgrade
- The upgrade process will take some time and may require your intervention, such as confirming package removals or installations.
- After the upgrade process is complete, you can reboot the system:
sudo reboot
- Log in to your system and verify the version to confirm that you are now running Debian 9 Stretch.
lsb_release -a
It is recommended to take a backup of your important data and configurations before proceeding with the upgrade process.