linux下启动和关闭网卡命令

linux下启动和关闭网卡命令,第1张

网卡配置后可以用多种方式启动和关掉网卡

1、服务形式开关网卡

启动:service network start

关闭:service network stop

2、还可以在这里开关网络服务

启动网络服务:/etc/init.d/network start

停止网络服务:/etc/init.d/network stop

2、ifconfig开关网卡

启动:ifconfig eth网卡编号 up

关闭:ifconfig eth网卡编号 down

ifconfig -a (不加-a参数,只能查启用的网卡)

例如:网卡名 eth0

启用网卡命名 ifconfig eth0 up

禁用网卡命名 ifconfig eth0 down

验证了 suse系统/redhat系统/ubuntu系统/Frdora系统/CentOS系统,均能使用。

https://linuxconfig.org/how-to-configure-static-ip-address-on-ubuntu-18-10-cosmic-cuttlefish-linux

service network restart


欢迎分享,转载请注明来源:内存溢出

原文地址:https://54852.com/yw/7281865.html

(0)
打赏 微信扫一扫微信扫一扫 支付宝扫一扫支付宝扫一扫
上一篇 2023-04-03
下一篇2023-04-03

发表评论

登录后才能评论

评论列表(0条)

    保存