1、配置网卡
[test@localhost network-scripts]$ pwd
/etc/sysconfig/network-scripts
[test@localhost network-scripts]$ cat ifcfg-ens192
TYPE=Ethernet
BOOTPROTO=static
DEFROUTE=yes
PEERDNS=yes
PEERROUTES=yes
NAME=ens192
DEVICE=ens192
ONBOOT=yes
IPADDR=192.168.x.xx
NETMASK=255.255.252.0
GATEWAY=192.168.x.x
DNS1=x.x.x.5
2、配置DNS
vi /etc/systemd/resolved.conf
DNS=8.8.8.8
systemctl restart systemd-resolved.service
3、配置
pc@pc:~/桌面$ cat /etc/apt/sources.list
deb http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse