How do I individually restart a specific network card on CentOS 7?

To individually reboot a network card, you can follow these steps:

  1. Use the ifconfig or ip addr command to view all available network interfaces and their respective interface names. Find the interface name of the network card you want to restart.
  2. Execute the following command to restart a specific network card (assuming the network card interface is named eth0):
sudo ifdown eth0
sudo ifup eth0

The first command ifdown is used to deactivate a specified network card, while the second command ifup is used to activate a specified network card. When executing these two commands, you may need administrative privileges (using sudo).

  1. Wait for a while to make sure the network card has restarted and is functioning properly.

Please note that the above command will disconnect and restart the specified network card, which may affect any network connections currently using that card. If you are remotely connected to the server via SSH, make sure to execute the command through a different network card or physical terminal or remote management console to avoid unexpected disconnection.

bannerAds