在window10玩Linux系统初体验

在window10上玩Linux

Window的Linux子系统的版本目前也有Ubuntu,kali,暂时没有centos具体的安装Linux子系统的步骤网上有很多,我这里就不演示如何安装Linux子系统了,如果是window10的话,安装起来不复杂。

更换Ubuntu的镜像源

默认的Linux子系统的镜像源为国外的,在apt-get update时候太慢了,所以需要更换为国内的镜像源。

步骤:

① 拷贝一份旧的镜像源,以保证万无一失。

更换权限为root

sudo su root

cp /etc/apt/sourses.list /etc/apt/sources.list_orgin

copy之后,打开新的文件

vim /etc/apt/sourses.list

输入以下内容:

1
2
3
4
5
6
7
8
9
deb http://mirrors.aliyun.com/ubuntu/ xenial main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ xenial-security main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ xenial-updates main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ xenial-backports main restricted universe multiverse

deb-src http://mirrors.aliyun.com/ubuntu/ xenial main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ xenial-security main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ xenial-updates main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ xenial-backports main restricted universe multiverse

更换之后,使用apt-get updateapt-get upgrade更新软件包就可以了。