1. 升级 Linux kernel
Step 1: #sudo apt-get update
Step 2: #apt-cache search linux-image
Note: after this command, we could see all the available kernel resources, saying: linux-image- 4.2.0-27-generic linux-image-extra- 4.2.0-27-generic
Step 3: #apt-cache search linux-headers
Note: with this command, we could see corresponding headers resource, saying: linux-headers- 4.2.0-27-generic
Step 4: #sudo apt-get install linux-image-4.2.0-27-generic linux-image-extra-4.2.0-27-generic linux-headers-4.2.0-27-generic
Note: be sure to install all the three updates. When linux-image-extra is not installed, some drivers may not be updated correctly, such as USB ;
Step 5: after installation, reboot
Step 6: after re-entering Ubuntu, check kernel with "uname -r" to find the kernel has been upgraded;
实验:
在bash on windows 上执行失败(内核装好了,grub安装报错),选择了4.8.0-32 版本的内核
sudo apt-get install linux-image-4.8.0-32-generic linux-image-extra-4.8.0-32-generic linux-headers-4.8.0-32-generic
2. 升级 ubuntu version
Below are steps to upgrade your Ubuntu version, such as 14.04, to newest version (14.04.4).
1、do-release-upgrade
2、sudo apt-get update
3、sudo apt-get dist-upgrade
4、sudo reboot
3.设置运行GUI
参考 (Run any Desktop Environment in WSL)
1 、bash>>: echo "export DISPLAY=:0.0" >> ~/.bashrc
2、bash>>: sudo sed -i 's$<listen>.*</listen>$<listen>tcp:host=localhost,port=0</listen>$' /etc/dbus-1/session.conf
(如果第二步报错说找不到dbus-1/session.conf , 则重装dbus:sudo apt --reinstall install dbus)
3、安装Xming X Server for Windows(x-windows的东西),并打开
4、bash>>: source ~/.bashrc , 或重启以加载启动文件
5、在bash中运行gui程序,(比如nautilus,没有就安装)