标签:ubunt nss update file apt ns3 tools ssh ror
新安装的ubuntu没有vim,使用vi修改自己的IP地址root@doupai-KVM:~# cat /etc/network/interfaces
# interfaces(5) file used by ifup(8) and ifdown(8)
auto lo
iface lo inet loopback
auto ens3
iface ens3 inet static
address 192.168.200.7
netmask 255.255.255.0
gateway 192.168.200.1
dns-nameserver 192.168.200.200
ubuntu系统如何修改apt源,使用aliyun源为例:
将旧版本内容做好备份。
root@doupai-KVM:~# cp /etc/apt/sources.list /etc/apt/sources.list_bak
添加以下内容
root@doupai-KVM:~# cat /etc/apt/sources.list
deb-src http://archive.ubuntu.com/ubuntu xenial main restricted #Added by software-properties
deb http://mirrors.aliyun.com/ubuntu/ xenial main restricted
deb-src http://mirrors.aliyun.com/ubuntu/ xenial main restricted multiverse universe #Added by software-properties
deb http://mirrors.aliyun.com/ubuntu/ xenial-updates main restricted
deb-src http://mirrors.aliyun.com/ubuntu/ xenial-updates main restricted multiverse universe #Added by software-properties
deb http://mirrors.aliyun.com/ubuntu/ xenial universe
deb http://mirrors.aliyun.com/ubuntu/ xenial-updates universe
deb http://mirrors.aliyun.com/ubuntu/ xenial multiverse
deb http://mirrors.aliyun.com/ubuntu/ xenial-updates multiverse
deb http://mirrors.aliyun.com/ubuntu/ xenial-backports main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ xenial-backports main restricted universe multiverse #Added by software-properties
deb http://archive.canonical.com/ubuntu xenial partner
deb-src http://archive.canonical.com/ubuntu xenial partner
deb http://mirrors.aliyun.com/ubuntu/ xenial-security main restricted
deb-src http://mirrors.aliyun.com/ubuntu/ xenial-security main restricted multiverse universe #Added by software-properties
deb http://mirrors.aliyun.com/ubuntu/ xenial-security universe
deb http://mirrors.aliyun.com/ubuntu/ xenial-security multiverse
更新自己的源,即可
root@doupai-KVM:~# apt update
root@doupai-KVM:~# apt-get update
接下来验证源是否正常使用:
root@doupai-KVM:~# apt install -y openssh-server vim net-tools lrzsz
标签:ubunt nss update file apt ns3 tools ssh ror
原文地址:https://blog.51cto.com/12131824/2406971