centos 8 如何重啟網絡 service network restart - systemctl restart network 失效的解決辦法


systemctl restart network centos8失效了
重啟網絡可使用以下命令

nmcli networking off && nmcli networking on 
ifdown eth0 && ifup eth0 
nmcli con down eth0 && nmcli con up eth0 

注意一定要使用&&一起執行,否則關閉網絡后,會無法遠程連接到服務器

ps:
你可以通過圖形化工具來設置網絡

nmtui

參考:
https://www.centos.org/forums/viewtopic.php?p=302319
https://access.redhat.com/discussions/3791081
https://www.osetc.com/en/how-to-start-stop-restart-network-service-on-centos-8-or-rhel-8.html
https://www.tecmint.com/set-static-ip-address-in-rhel-8/
https://www.tecmint.com/configure-network-connections-using-nmcli-tool-in-linux/
https://www.certdepot.net/rhel7-configure-ipv4-addresses/


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM