:~$ sudo systemctl restart NetworkManager
~$ cd /etc/network/interfaces.d/
:~$ cat /etc/network/interfaces
:~$ sudo systemctl stop NetworkManager
:~$ sudo vim /etc/network/interfaces
:~$ ifconfig
:~$ sudo reboot
:~$ sudo su
:~$ ifconfig -a
:~$ ifconfig enps50 up
:~$ ifconfig enps50 1
:~$ sudo ifconfig enps50 1
:~$ ifconfig
25 systemctl disable NetworkManager #禁用网络管理器
26 /etc/init.d/networking start # 启动网络
27 /etc/init.d/networking restart
28 systemctl status networking
29 reboot
30 vim /etc/network/interfaces
31 systemctl status NetworkManager
32 systemctl status networking
33 vim /etc/network/interfaces
34 systemctl status networking
35 systemctl stop networking
36 systemctl start networking
37 systemctl status networking
38 ifconfig
39 ping www.baidu.com
40 cat /etc/resolv
41 cat /etc/resolv.conf
42 vim /etc/network/interfaces
43 reboot
44 vim /etc/network/interfaces
45 systemctl restart networking
46 ifconfig
47 vim /etc/network/interfaces
48 systemctl restart networking
49 ifconfig
50 reboot
51 history
:/home/wuliang# vim /etc/network/interfaces
*****# interfaces(5) file used by ifup(8) and ifdown(8)****
auto lo
iface lo inet loopback
auto enp5s0
iface enp5s0 inet dhcp # 自动获取IP
#iface enp5s0 inet static # 设置静态ip
#address 172.16.16.2
#netmask 255.255.255.240
#gateway 172.16.16.14
auto enx00e04c680050
iface enx00e04c680050 inet static
address 192.168.1.205
netmask 255.255.255.0*
ubuntu16.04配置双网卡静动态ip命令
于 2022-05-27 16:41:29 首次发布