标签:def net grub2 aml 主机 ystemd inux dns gui
Ubuntu网络配置默认ubuntu的网卡名称和Cent OS 7类似,如:ens33,ens38等
修改配置文件为下面形式
vi /etc/default/grub
GRUB_CMDLINE_LINUX="net.ifnames=0"
grub-mkconfig -o /boot/grub/grub.cfg :Centos里面是grub2
https://help.ubuntu.com/lts/serverguide/network-configuration.html.zh-CN
cat /etc/netplan/01-netcfg.yaml
network:
version: 2
renderer:networkd
ethernets:
ens33:
dhcp4: yes
cat /etc/netplan/01-netcfg.yaml
network:
version: 2
renderer: networkd
ethernets:
eth0:
addresses:
- 192.168.6.10/24
- 10.10.10.10/24
gateway4: 192.168.6.1
nameservers:
search: [mydomain, otherdomain]
addresses: [223.5.5.5, 8.8.8.8, 1.1.1.1]
ip addr
route -n
ls -l /etc/resolv.conf
lrwxrwxrwx 1 root root 39 Dec 12 11:36 /etc/resolv.conf -> ../run/systemd/resolve/stub-resolv.conf
systemd-resolve –status
hostnamectl set-hostname ubuntu1804
标签:def net grub2 aml 主机 ystemd inux dns gui
原文地址:https://blog.51cto.com/14228129/2374780