
正文
linux禁用网卡命令,ubuntu禁用网卡命令
提示:扫一扫查出行【扫一扫了解最新限行尾号】
复制提示
linux配置网卡后,单独关掉网卡和重启网卡的命令是什么?
第一种:
/etc/init.d/network stop 关闭
/etc/init.d/network restart 重启
第二种:
ifup eth* *代表网卡,第一块网卡为0 ifup eth0开启,ifdown eth0 关闭
第三种:
service network stop/start 关闭 or 启动
service network restart 重启
望采纳,lznmvp
相关问答
Q1: 怎么在linux 系统下,禁用和启用网卡(up/down), setting IP
ifconfig -a (不加-a参数,只能查启用的网卡)
例如:网卡名 eth0
启用网卡命名 ifconfig eth0 up
禁用网卡命名 ifconfig eth0 down
验证了 suse系统/redhat系统/ubuntu系统/Frdora系统/CentOS系统,均能使用。
service network restart
Q2: Linux中要禁用网卡是:ifconfig eth0 down,那我使用:ifconfig ip地址 down可以吗?
不可以,ifconfig
后面必须加网卡名。你可以用ifdown
etho来禁用网卡eth0,如果你的机器只有一块网卡的,你还可以使用service
network
stop来禁掉网卡!如果是redhat
linux的话,你还可以通过system-config-network把激活的eht0禁用。
Q3: linux如何临时性关闭指定的网卡
ifconfig -a (不加-a参数,只能查启用的网卡) 例如:网卡名 eth0 启用网卡命名 ifconfig eth0 up 禁用网卡命名 ifconfig eth0 down 验证了 suse系统/redhat系统/ubuntu系统/Frdora系统/CentOS系统,均能使用。
Q4: linux下启动和关闭网卡命令
网卡配置后可以用多种方式启动和关掉网卡
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






