cat /etc/sysconfig/network-scripts/ifcfg-eth0
cat /etc/netplan/01-netcfg.yaml
cat /etc/default/grub
grub2-mkconfig -o /boot/grub2/grub.cfg #centos系列
grub-mkconfig -o /boot/grub/grub.cfg #ubuntu系列
ifconfig
ip a s
nmcli con sh eth0
nmcli con modify eth0 con-name eth1 ifname eth1 type ethernet ipv4.addresses 10.0.0.111/24 ipv4.gateway 10.0.0.1 autoconnect yes
nmcli con reload
nmcli con up eth1
setup
nmtui
route
route -n
ip r
~]# ip a a 10.0.0.150/24 dev eth0:0
~]# ip a d 10.0.0.150/24 dev eth0:0
~]# route add default gw 10.0.0.2 dev eth0
~]# route add -net 172.16.0.0/16 gw 10.0.0.2 dev eth0
~]# cat /proc/sys/net/ipv4/ip_forward
netstat
ss