Home > System Tutorial > LINUX > body text

What is the command to restart the network card in Linux?

下次还敢
Release: 2024-04-11 21:09:14
Original
773 people have browsed it

You can restart the network card in the Linux system through the following command: shut down the network card: sudo ifdown start the network card: sudo ifup <network card name>

What is the command to restart the network card in Linux?

Linux command to restart the network card

In Linux system, you can restart the network card through the following command:

<code class="shell">sudo ifdown <网卡名称> && sudo ifup <网卡名称></code>
Copy after login

Among them:

  • <Network Card Name> Replace with the name of the network card to be restarted, such as eth0.

Detailed explanation of steps:

  1. Close the network card: ifdown <Network card name> Command The specified network card will be shut down.
  2. Start the network card: ifup <network card name> The command will restart the specified network card.

Example:

The following command will restart the network card eth0:

<code class="shell">sudo ifdown eth0 && sudo ifup eth0</code>
Copy after login

Note:

  • Executing this command requires root privileges, so please use sudo.
  • If the network card has been configured to start automatically, the network card will also start automatically after restarting the system.
  • You can also use the service networking restart command to restart all network services, including the network card.

The above is the detailed content of What is the command to restart the network card in Linux?. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Articles by Author
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template