ubuntu16.04优麒麟配置

电脑坏了需要重新安装linux虚拟机,但是上次配置没记录下来,又需要查很多资料,这次就一劳永逸吧。

首先,改变文件更新源的地址,不然下载速度可能会很慢 systemsetting中
或者

sudo gedit /etc/apt/sources.list

然后添加以下内容之一:

#阿里源(此行不复制)  
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 http://mirrors.aliyun.com/ubuntu/ xenial-proposed 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    
##测试版源    
deb-src http://mirrors.aliyun.com/ubuntu/ xenial-proposed main restricted universe multiverse    
# Canonical 合作伙伴和附加    
deb http://archive.canonical.com/ubuntu/ xenial partner    
deb http://extras.ubuntu.com/ubuntu/ xenial main    

#中科大的源(此行不粘贴)  
deb http://mirrors.ustc.edu.cn/ubuntu/ precise-updates main restricted  
deb-src http://mirrors.ustc.edu.cn/ubuntu/ precise-updates main restricted  
deb http://mirrors.ustc.edu.cn/ubuntu/ precise universe  
deb-src http://mirrors.ustc.edu.cn/ubuntu/ precise universe  
deb http://mirrors.ustc.edu.cn/ubuntu/ precise-updates universe  
deb-src http://mirrors.ustc.edu.cn/ubuntu/ precise-updates universe  
deb http://mirrors.ustc.edu.cn/ubuntu/ precise multiverse  
deb-src http://mirrors.ustc.edu.cn/ubuntu/ precise multiverse  
deb http://mirrors.ustc.edu.cn/ubuntu/ precise-updates multiverse  
deb-src http://mirrors.ustc.edu.cn/ubuntu/ precise-updates multiverse  
deb http://mirrors.ustc.edu.cn/ubuntu/ precise-backports main restricted universe multiverse  
deb-src http://mirrors.ustc.edu.cn/ubuntu/ precise-backports main restricted universe multiverse  
deb http://security.ubuntu.com/ubuntu precise-security main restricted  
deb-src http://security.ubuntu.com/ubuntu precise-security main restricted  
deb http://security.ubuntu.com/ubuntu precise-security universe  
deb-src http://security.ubuntu.com/ubuntu precise-security universe  
deb http://security.ubuntu.com/ubuntu precise-security multiverse  
deb-src http://security.ubuntu.com/ubuntu precise-security multiverse  

,然后:

sudo apt-get update
sudo apt-get install openssh-server
ifconfig//命令查看ip地址并使用Xshell连接。
sudo apt install vim//安装vim

设置vim解决乱码和行号问题

vim ~/.vimrc  

set fileencodings=utf-8,gb2312,gbk,gb18030  
set termencoding=utf-8  
set fileformats=unix  
set encoding=prc
set number

你可能感兴趣的:(配置)