启用windows10的linux子系统

1. 首先,在windows10中启用开发者模式。按windows+x键,打开系统管理菜单;点击应用和功能,再点击主页;点击更新和安全,再点击开发者选项,勾选开发人员模式。在联网情况下,系统会安装高级开发功能。

2. 然后,启用windows10的linux子系统。按windows+x键,打开系统管理菜单,点击页面右边的程序和功能;在弹出的页面中点击启用和关闭windows功能,在继续弹出的页面中勾选适用于Linux的Windows子系统,点击确定,并重启windows10系统。

3. 最后,按windows键,点击并打开应用商店;在搜索栏搜索linux,然后选择一个喜欢的linux发行版本,比如debian或ubuntu等,进行下载和安装。

4. 我选择了debian进行下载和安装,最后,提示输入用户名和密码。该用户自动是超级管理员用户,可以使用sudo su -命令切换到root用户。

5. 使用windows系统下的linux子系统,相比于使用linux虚拟机更加方便,更少消耗内存。

6. window10下的debian子系统是最小安装的系统,很多软件无法使用。需要先对apt源进行修改后再安装软件。对/etc/apt/sources.list文件内容进行修改,将内容修改成如下内容(163源):

deb http://mirrors.163.com/debian/ jessie main non-free contrib
deb http://mirrors.163.com/debian/ jessie-updates main non-free contrib
deb http://mirrors.163.com/debian/ jessie-backports main non-free contrib
deb-src http://mirrors.163.com/debian/ jessie main non-free contrib
deb-src http://mirrors.163.com/debian/ jessie-updates main non-free contrib
deb-src http://mirrors.163.com/debian/ jessie-backports main non-free contrib
deb http://mirrors.163.com/debian-security/ jessie/updates main non-free contrib
deb-src http://mirrors.163.com/debian-security/ jessie/updates main non-free contrib

再安装软件:

# apt-get update
# apt-get install openssh-client
# apt-get install openssh-server

# apt-get remove vim-common
# apt-get install vim

发表评论

您的电子邮箱地址不会被公开。 必填项已用*标注

此站点使用Akismet来减少垃圾评论。了解我们如何处理您的评论数据