常用命令
1.查看网络地址配置
ip address show 或者 ip a
centos 7 以前版本命令是 ifconfig
2.ping 命令
3.图形化界面修改网卡信息 nmtui
4.网卡服务命令
systemctl start network #启动网卡
systemctl restart network #重启命令
systemctl enable network #开机自动开启
systemctl disable network #开机不开启
systemctl stop network #停止网卡
systemctl status network #查看状态
service restart network #这是centos7 以前的版本
5.关机命令
命令 | 意思 |
---|---|
shutdown | 关机 |
shutdown -h 5 | 指定5分钟后关机 |
shutdown -c | 取消关机 |
shutdown -h now/0 | 立即关机 |
halt/poweroff | 直接关机 |
6.重启命令
命令 | 意思 |
---|---|
reboot | 直接重启 |
shutdown -r now/0 | 立即重启 |
shutdown -r 5 | 5分钟后重启 |