第一种方法
[email protected]:/etc/network# [email protected]:/etc/network# sudo /etc/init.d/networking restart
stop: Job failed while stopping
start: Job is already running: networking
[email protected]:/etc/network# sudo NetworkManager restart
NetworkManager (pid 782)
[email protected]:/etc/network# sudo kill -9 782
[email protected]:/etc/network# sudo NetworkManager restart
即可更新网卡
第二种方法
sudo service network-manager restart
参考:https://askubuntu.com/questions/441619/how-to-successfully-restart-a-network-without-reboot-over-ssh