# Ubuntu子系统安装配置

Ubuntu子系统安装配置

亲测启动速度毫秒之间

安装配置

  1. 系统升级到一周年正式版及以上(1607)

  2. 依次在 设置 - 更新与安全 - 针对开发人员 选项中,启用“开发人员模式

  3. 在资源管理器中打开 控制面板\所有控制面板项\程序和功能 , 打开 启用或关闭 Windows功能 , 勾选 适用于Linux的Windows子系统(Beta)

  4. 重启电脑

  5. Microsoft Store中安装Ubuntu子系统(200M左右)

需要注意,装完后的实际目录在 C:\Users\22765\AppData\Local\Packages\CanonicalGroupLimited.UbuntuonWindows_79rhkp1fndgsc\LocalState\rootfs\

  1. 安装完首先更换软件源,查看Ubuntu版本选择对应的镜像云。

    lsb_release -a查看版本为18.04,选择阿里云镜像

  2. 首先备份设置sudo cp /etc/apt/sources.list /etc/apt/sources.list.bak,然后将sources.list文件内容替换为

    deb http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse
    deb http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse
    deb http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse
    deb http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse
    deb http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse
    deb-src http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse
    deb-src http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse
    deb-src http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse
    deb-src http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse
    deb-src http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse
  3. 更新系统软件sudo apt-get update && sudo apt-get -y upgrade

终端美化

  • 安装zsh , sudo apt-get install zsh

  • 安装oh-my-zsh,sudo apt-get install git

  • 没有Git的话先安装Git,然后

    sudo wget https://github.com/robbyrussell/oh-my-zsh/raw/master/tools/install.sh -O - | sh chsh -s /bin/zsh
  • 把默认的Shell改成zsh,chsh -s /bin/zsh,然后重启

卸载:

进入“Windows设置 - 应用 - 应用和功能”设置界面,在窗口右侧会显示Win10系统所安装的所有应用程序,其中就有你通过Microsoft Store安装的Linux子系统(例如Ubuntu) ,点击高级选项,里面有修复,重置,卸载操作。重置清除所有数据,回退到最开始时刻。

猜你喜欢

转载自www.cnblogs.com/sstealer/p/11828158.html