WSL-Ubuntu 安装、移动

阿里云国内75折 回扣 微信号:monov8
阿里云国际,腾讯云国际,低至75折。AWS 93折 免费开户实名账号 代冲值 优惠多多 微信号:monov8 飞机:@monov6
    • 设置” 启用或者关闭Windows功能“勾选如下选项。

Hyper-v若存在灰色可进入BIOS-ConfigurationIntel Virtual Technology设置Enable

重启

2、安装Ubuntu

3、移动。Ubuntu默认安装C盘。

  • 首先D盘创建移动的目录例如D:\Ubuntu

  • Windows 终端执行导出命令

wsl --export Ubuntu D:\Ubuntu\ubuntu.tar
  • 注销原来的Ubuntu

wsl --unregister Ubuntu
  • 从 D:\Ubuntu 导入

wsl--import Ubuntu D:\Ubuntu\ubuntu.tar

4、打开终端以 Windows Terminal

  • 选择Ubuntu等待installing...

  • 输入用户名、密码、root密码等

5、更换镜像源修改 /etc/apt/sources.list

  • 备份原文件

sudo cp /etc/apt/sources.list /etc/apt/sources.list.bak
  • 修改文件内容使用vimEsc切换命令行i进入编辑

sudo vi /etc/apt/sources.list

阿里源镜像

deb https://mirrors.aliyun.com/ubuntu/ trusty main restricted universe multiverse
deb-src https://mirrors.aliyun.com/ubuntu/ trusty main restricted universe multiverse
deb https://mirrors.aliyun.com/ubuntu/ trusty-security main restricted universe multiverse
deb-src https://mirrors.aliyun.com/ubuntu/ trusty-security main restricted universe multiverse

deb https://mirrors.aliyun.com/ubuntu/ trusty-updates main restricted universe multiverse
deb-src https://mirrors.aliyun.com/ubuntu/ trusty-updates main restricted universe multiverse

deb https://mirrors.aliyun.com/ubuntu/ trusty-backports main restricted universe multiverse
deb-src https://mirrors.aliyun.com/ubuntu/ trusty-backports main restricted universe multiverse

## Not recommended
# deb https://mirrors.aliyun.com/ubuntu/ trusty-proposed main restricted universe multiverse
# deb-src https://mirrors.aliyun.com/ubuntu/ trusty-proposed main restricted universe multiverse

ZZ保存退出

  • 更新源

sudo apt update

sudo apt-get upgrade

6、安装常用工具

sudo install make openssl wget vim
阿里云国内75折 回扣 微信号:monov8
阿里云国际,腾讯云国际,低至75折。AWS 93折 免费开户实名账号 代冲值 优惠多多 微信号:monov8 飞机:@monov6
标签: Ubuntu