Linux Ubuntu 16.04 升级 18.04 详细教程


lsb_release -a

升级到 Ubuntu 18.04


sudo apt update && sudo apt dist-upgrade && sudo apt autoremove

安装Ubuntu update manager

sudo apt install update-manager-core


vi /etc/update-manager/release-upgrades



sudo do-release-upgrade
sudo do-release-upgrade -d



Continue running under SSH? 

This session appears to be running under ssh. It is not recommended 
to perform a upgrade over ssh currently because in case of failure it 
is harder to recover. 

If you continue, an additional ssh daemon will be started at port 
Do you want to continue? 

Continue [yN]
#是否继续在 SSH 下运行?
#输入 y 继续
To make recovery in case of failure easier, an additional sshd will 
be started on port '1022'. If anything goes wrong with the running 
ssh you can still connect to the additional one. 

To continue please press [ENTER]
#输入 回车 确认继续
Do you want to start the upgrade? 

2 installed packages are no longer supported by Canonical. You can 
still get support from the community. 

77 new packages are going to be installed. 257 packages are going to 
be upgraded. 

You have to download a total of 216 M. This download will take about 
42 seconds with your connection. 

Installing the upgrade can take several hours. Once the download has 
finished, the process cannot be canceled. 

 Continue [yN]  Details [d]
#输入 y 继续

选择keep the local version currently installed选项

选择keep the local version currently installed选项

Remove obsolete packages? 

23 packages are going to be removed. 

Continue [yN]  Details [d]
#输入 y 继续
System upgrade is complete.

Restart required 

To finish the upgrade, a restart is required. 
If you select 'y' the system will be restarted. 

Continue [yN]
#输入 y 开始重启启动

重启完成后输入lsb_release -a查看是否已经升级到Ubuntu 18.04