How to upgrade from Debian Linux 8 Jessie to Debian 9 Stretch using command line over ssh based session

To upgrade from Debian Linux 8 Jessie to Debian 9 Stretch using command line over an SSH-based session, follow these steps:

  1. Log in to your Jessie system using SSH:
    ssh user@hostname
  2. Update the package index:
    sudo apt-get update
  3. Upgrade the system to the latest version of Jessie:
    sudo apt-get upgrade
  4. Make a backup of important data and configurations.
  5. Edit the file /etc/apt/sources.list and replace all instances of jessie with stretch:
    sudo nano /etc/apt/sources.list
  6. Update the package index again:
    sudo apt-get update
  7. Run the upgrade command:
    sudo apt-get dist-upgrade
  8. The upgrade process will take some time and may require your intervention, such as confirming package removals or installations.
  9. After the upgrade process is complete, you can reboot the system:
    sudo reboot
  10. 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.

Leave a Comment