zoukankan      html  css  js  c++  java
  • Win10安装Ubuntu子系统(WSL)

    一:设置子系统环境

    关闭所有运行的程序,打开 控制面板→卸载程序→启用或关闭windows功能→勾选上适用于Linux的windows子系统 ,然后确定,完成会提示重启电脑,确定重启,等重启电脑后在操作。

    安装Ubuntu子系统

    打开Windows10应用商店,搜索ubuntu,然后选择版本,然后点击获取安装。
    默认第一个是最新的系统,后面两个是指定系统版本的.按自己需求选择.

    安装完成后在开始菜单点击打开运行Ubuntu即可
    打开之后会提示你开始安装,你需要等待一点时间,安装过程也有点慢。
    安装好之后,会提示输入用户名和密码,Linux中输入密码是看不到的,所以你不要紧张,正常输入即可。

    更换阿里云镜像源

    输入命令,安装nano编辑器

    sudo apt-get install nano
    

    修改源文件

    sudo nano /etc/apt/sources.list
    

    我们通过nano进入sources.list文件之后,把里面的源都用#禁止掉,或者全部删除,用以下阿里的源来代替:

    deb http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse
    deb-src http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse
    deb http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse
    deb-src http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse
    deb http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse
    deb-src http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse
    deb http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse
    deb-src 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-backports main restricted universe multiverse
    

    粘贴好 然后Ctrl+O(保存),按回车,再Ctrl+X(退出)。这就是nano命令,不会的搜索教程,保存退出.
    输入更新源列表命令:

    sudo apt-get update
    

    升级已安装软件

    sudo apt-get upgrade
    

    等待安装完成即可

  • 相关阅读:
    PowerShell Arrays
    PowerShell Hashtable
    PowerShell Variables
    MVC3 类型“System.Web.Mvc.ModelClientValidationRule”同时存在
    神奇的Timer
    神奇的Timer之lock篇
    利用lambda表达式正确关闭WCF连接
    Zendstutio设置
    一个服务器部署多个项目
    Magento模块配置文件
  • 原文地址:https://www.cnblogs.com/shmebluk/p/13235664.html
Copyright © 2011-2022 走看看