Window10开启Linux Bash功能

来源:互联网 发布:linux 提权漏洞 编辑:程序博客网 时间:2024/06/02 10:52

确保您使用至少是Windows 10的14316版本。 这种方法只适用于64位版本的Windows 10。

1.打开CMD命令.

2.运行 Gpedit.msc.

前往 Local Computer Policy > Computer Configuration > Administrative
Templates > Windows Components > App Package Deployment
这里写图片描述

将下面的选项修改为enable:

  • Allow all trusted apps to install
  • Allows development of Windows Store apps and installing them from an integrated development environment (IDE)
    然后需要重启电脑。

3.接下来

打开控制面板,单击“程序”,然后单击“打开Windows功能打开或关闭”在程序和功能。在这里启用“Windows子系统为Linux(测试版)”列表中的选项,并单击“确定”。
执行此操作后,系统会提示您重新启动计算机。 点击“立即重新启动”,以重新启动您的计算机和Windows 10将安装新的功能。

4.接下来

看百度经验吧

5.安装完Linux bash之后记得更新源为国内的源

不然下载东西太慢了!!!
更新方法如下($ 命令):

$ su$ cd /etc/apt$ cp sources.list sources.list.backup #记得先做备份以防万一啊!$ vim /etc/apt/sources.list# 将下面横线之间的内容复制到sources.list中(下面两个分别为科大源和阿里源,任选其一!)---------------------------------科大源--------------------------------------------deb http://mirrors.ustc.edu.cn/ubuntu/ trusty main restricted universe multiverse deb http://mirrors.ustc.edu.cn/ubuntu/ trusty-security main restricted universe multiverse deb http://mirrors.ustc.edu.cn/ubuntu/ trusty-updates main restricted universe multiverse deb http://mirrors.ustc.edu.cn/ubuntu/ trusty-proposed main restricted universe multiverse deb http://mirrors.ustc.edu.cn/ubuntu/ trusty-backports main restricted universe multiverse deb-src http://mirrors.ustc.edu.cn/ubuntu/ trusty main restricted universe multiverse deb-src http://mirrors.ustc.edu.cn/ubuntu/ trusty-security main restricted universe multiverse deb-src http://mirrors.ustc.edu.cn/ubuntu/ trusty-updates main restricted universe multiverse deb-src http://mirrors.ustc.edu.cn/ubuntu/ trusty-proposed main restricted universe multiverse deb-src http://mirrors.ustc.edu.cn/ubuntu/ trusty-backports main restricted universe multiverse------------------------------------阿里源-------------------------------------------deb http://mirrors.aliyun.com/ubuntu/ trusty main restricted universe multiversedeb http://mirrors.aliyun.com/ubuntu/ trusty-security main restricted universe multiversedeb http://mirrors.aliyun.com/ubuntu/ trusty-updates main restricted universe multiversedeb http://mirrors.aliyun.com/ubuntu/ trusty-proposed main restricted universe multiversedeb http://mirrors.aliyun.com/ubuntu/ trusty-backports main restricted universe multiversedeb-src http://mirrors.aliyun.com/ubuntu/ trusty main restricted universe multiversedeb-src http://mirrors.aliyun.com/ubuntu/ trusty-security main restricted universe multiversedeb-src http://mirrors.aliyun.com/ubuntu/ trusty-updates main restricted universe multiversedeb-src http://mirrors.aliyun.com/ubuntu/ trusty-proposed main restricted universe multiversedeb-src http://mirrors.aliyun.com/ubuntu/ trusty-backports main restricted universe multiverse$ apt-get update$ apt-get dist-upgrade
0 0