Get the App
SLTechnology News&Howtos  ›  Servers  › 

Use the ifdown command of linux to disable the network interface

Shulou Source: shulou.com Published: 2022-06-02 20:07:07 09月22日 Update

This article mainly introduces the use of linux ifdown command to disable the network interface, the article is very detailed, has a certain reference value, interested friends must read it!

The ifdown command is used to disable the specified network interface. This command reads the configuration file of the relevant network interface in the / etc/sysconfig/network-scripts/ directory and shuts down the network interface according to the contents of the configuration file.

Note: the network interface name must be set in the / etc/sysconfig/network-scripts/ directory configuration file. If you change the network interface with the ifconfig command, the ifdown command will not recognize it. Because the ifdown command compares the parameters of the current network with the contents of the configuration file in / etc/sysconfig/network-scripts/.

Syntax format: ifdown [Network Interface]

Common parameters:

Network interface the network interface to be disabled

Reference example

Disable the network interface eth0:

[root@linuxcool ~] # ifdown eth0 above is using the ifdown command of linux to disable all the contents of the network interface, thank you for reading! Hope to share the content to help you, more related knowledge, welcome to follow the industry information channel!

Tags: Network interface command content file configuration parameter directory reference value interest farewell name instance partner common use more format knowledge Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Xiaomi Shulou Technology Shulou Information Redmi Huawei