您的位置:首页 > 其它

win10安装Ubuntu子系统

2018-04-13 11:11 731 查看

一、版本:

win10:


Ubuntu:

root@YUAN:/tmp# uname -r
4.4.0-43-Microsoft
root@YUAN:/tmp# lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 16.04.3 LTS
Release:        16.04
Codename:       xenial
二、正式开始

1、开启子系统功能

启动或关闭Windows功能(Windows设置-》应用-》程序和功能(靠下方的位置)-》启动或关闭Windows功能(在左侧栏))


2、下载Ubuntu系统


下载安装完成后打开,第一次登录会让你输入用户名和密码。牢记奥,最好保存下来。


三、更换子系统软件源并更新软件(可以跳过)

请参考知乎链接

四、使用SSH,在windows使用Xshell连接

请参考知乎链接

五、使用图形化界面

请参考知乎链接

我遇到的坑:

1、VNC  viewer for Google Chrome访问不了Google商店,懒得翻墙。直接现在for Windows版本

链接:VNC viewer

2、VNC连接不上或连接成功出现白屏:请重新来过,尤其是配置啥的,一定检查一下。

另外:创建桌面时请用一下命令,加了“:1”1这个数字爱怎么填。这样方便使用vncserver -kill :1

vncserver :1
相对应windows下的功能:

快捷键WIN + Ctrl + D就能创建一个新桌面WIN + Ctrl + ←或→可以进行切换,WIN + Ctrl + F4可以关闭。

3、如果不幸出现下边的情况

查看当前的桌面(哇呀嘿,竟然有四个桌面了,还tm使用vncserver -kill :1等等关闭不了)

root@YUAN:/tmp# vncserver -list

Warning: YUAN:1 is taken because of /tmp/.X1-lock
Remove this file if there is no X server YUAN:1

Warning: YUAN:2 is taken because of /tmp/.X2-lock
Remove this file if there is no X server YUAN:2

Warning: YUAN:3 is taken because of /tmp/.X3-lock
Remove this file if there is no X server YUAN:3

New 'YUAN:4 (root)' desktop is YUAN:4

Starting applications specified in /root/.vnc/xstartup
Log file is /root/.vnc/YUAN:4.log
一旦使用vncserver -kill出现如下
root@YUAN:/tmp# vncserver -kill :3

Can't find file /root/.vnc/YUAN:3.pid
You'll have to kill the Xvnc4 process manually

root@YUAN:/tmp# vncserver :3

Warning: YUAN:3 is taken because of /tmp/.X3-lock
Remove this file if there is no X server YUAN:3
A VNC server is already running as :3
root@YUAN:/tmp# rm /tmp/.X3-lock
root@YUAN:/tmp# vncserver :3

Warning: YUAN:3 is taken because of /tmp/.X11-unix/X3
Remove this file if there is no X server YUAN:3
A VNC server is already running as :3
root@YUAN:/tmp# rm /tmp/.X11-unix/X3
root@YUAN:/tmp# vncserver :1

New 'YUAN:1 (root)' desktop is YUAN:1

Starting applications specified in /root/.vnc/xstartup
Log file is /root/.vnc/YUAN:1.log

root@YUAN:/tmp# vncserver :3

New 'YUAN:3 (root)' desktop is YUAN:3

Starting applications specified in /root/.vnc/xstartup
Log file is /root/.vnc/YUAN:3.log
看清楚操作了吗,我删除了它提示出来的文件

/tmp/.X2-lock

/tmp/.X11-unix/X2
然后重新创建再kill掉,解决。。。倍爽。

刚刚创建了两个窗口:1和:3,我就同时连俩




阅读更多
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: