sed -ri 's/http://(cn.)?archive.ubuntu.com/ubuntu//https://mirrors.tuna.tsinghua.edu.cn/ubuntu//g' /etc/apt/sources.list apt-get update
Ubuntu 修改IP
vi /etc/netplan/xx.yaml netplan apply
Ubuntu16.04 修改IP
#删除ip ip addr del 192.168.0.1 dev eth0 #修改ip vi /etc/network/interfaces auto eth0 iface eth0 inet static address 192.168.5.205 netmask 255.255.255.0 gateway 192.168.5.1 dns-nameservers 192.168.5.28 172.30.44.20
#修改DNS vi /etc/resolvconf/resolv.conf.d/base #如果本Server为DNS服务器,可以加上这一句,如果不是,可以不加 search localdomain nameserver 172.16.3.4
systemctl stop [servicename] systemctl disable [servicename] rm /etc/systemd/system/[servicename] rm /etc/systemd/system/[servicename] # and symlinks that might be related rm /usr/lib/systemd/system/[servicename] rm /usr/lib/systemd/system/[servicename] # and symlinks that might be related systemctl daemon-reload systemctl reset-failed