使用nmcli工具重启网络 sudo nmcli networking on nmcli是NetworkManager的一个命令行工具,也是目前Centos比较强大的网络管理命令行工具(目前适用于大多数linux发行版)。