操作网络服务命令 (需要权限,普通用户+sudo)service networking start/stop/status/restart
systemctl start/stop/status/restart/ networking
/etc/init.d/networking start/stop/status/restart
网络管理操作命令service network-manager start/stop/status/restart
systemctl start/stop/status/restart/ network-manager
/etc/init.d/network-manager start/stop/status/restart
操作网卡命令ifdown 网卡名称
ifup 网卡名称
ifconfig 网卡名称 down
ifconfig 网卡名称 up
配置网络
Ubuntu网络配置文件地址:/etc/network/interfaces
域名服务IP配置文件地址:
/etc/resolv.conf
wired unmanaged不能上网
/etc/NetworkManager/NetworkManager.conf
修改managed=true
然后重启网络管理systemctl restart network-manager