Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to enable and disable network cards in Linux (not comprehensive but easy to use)

2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/02 Report--

Enabling disabling the network card can be done in the following ways:

Ifconfig command: used to configure the network card, can provide a lot of information about the network card.

Common syntax for ifconfig:

# ifconfig [NIC_NAME] Down/Up

Execute the following command to disable the enp0s3 network card.

# ifconfig enp0s3 down

Execute the following command to enable the enp0s3 network card.

# ifconfig enp0s3 up

Ifdown/up command: the ifdown command is used to disable the network card, and the ifup command is used to enable the network card.

Common syntax for ifdown/ifup:

# ifdown [NIC_NAME]

# ifup [NIC_NAME]

Execute the following command to disable the eth2 network card.

# ifdown eth2

Execute the following command to enable the eth2 network card.

# ifup eth2

Ip command: used to manage the network card to replace the old, deprecated ifconfig command. The ip command is similar to the ifconfig command, but provides powerful features that many ifconfig commands do not have.

Nmcli command: a command-line tool that controls NetworkManager and reports the status of the network.

Nmtui command: a terminal UI application that interacts with NetworkManager and is based on curses graphics library.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report