1

I can't log into my desktop so I have to upgrade my system from 14.04LTS to 16LTS. I have done:

      sudo apt-get update && sudo apt-get dist-upgrade
      sudo reboot
      sudo update-manager -d

but I get errors:

    GTK warning: cannot open display

it seems to me that it needs a GUI prompt for me to accept and then continue, so my question is:how to upgrade ubuntu 14.04LTS to 16LTS from command line without GUI?


I tried sudo do-release-upgrade but I get errors as below: https://i.stack.imgur.com/KUxHz.jpg https://i.stack.imgur.com/gLn6K.jpg

lily
  • 11
  • 1
  • 5

2 Answers2

8

The recommended way to upgrade a Server Edition installation is to use the do-release-upgrade utility. Part of the update-manager-core package, it does not have any graphical dependencies and is installed by default.

sudo do-release-upgrade

See https://help.ubuntu.com/lts/serverguide/installing-upgrading.html

This will work for your installation as well (i.e. not just for Server Editions).

Jos
  • 29,224
  • 1
    I tried sudo do-release-upgrade but I get errors as below: http://i.imgur.com/nBihtEj.jpg http://i.imgur.com/44k0IOn.jpg – lily Apr 18 '17 at 15:49
  • 2
    First remove all ppa's from /etc/apt/sources.list. Now run sudo do-release-upgrade. Reboot and add new ppa's for the current OS version. – jeroen Apr 18 '17 at 16:10
-1

Run this, you should be notified that there's a new release available, follow the prompts to do the upgrade.

sudo do-release-upgrade