桓楠百科网

编程知识、经典语录与百科知识分享平台

Win10下的WSL(Linux子系统)开发环境搭建(基础配置)

最近折腾了下WIndows的Linux子系统作为本地的开发环境搭建 感觉还不错 写下这篇文章给自己总结下也分享给各位借鉴

  • 先去Win10的设置》应用》程序和功能开启适用于Linux的Windows子系统并重启
  • 微软商店搜索WSL并下载Ubuntu18.04LTS版本


  • 下载好了以后打开Ubuntu并进入到命令行等待安装 安装过程中会要求输入用户名及密码 输入好以后我们就可以安装我们的开发环境了


  • 为了方便我们在命令行中的复制粘贴操作 我们还需要右键命令行窗体选择属性设置开启复制粘贴快捷键


  • 由于系统内置的软件源不在国内 软件安装下载比较慢 在这里我们将软件源设置为阿里云Ubuntu镜像地址
sudo cp /etc/apt/sources.list /etc/apt/sources.list.bak		//备份原有软件源文件
sudo vim /etc/apt/sources.list 																				//使用VIM编辑软件源文件
sudo apt-get update																											//将阿里云镜像地址复制进去保存后更新
  • 阿里云镜像地址
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

下篇教程地址

Win10下的WSL(Linux子系统)PHP开发环境搭建

#我要上头条# #Linux# #PHP#

控制面板
您好,欢迎到访网站!
  查看权限
网站分类
最新留言