How to recover a network card in Linux after it has been deleted.

To restore a deleted network card in Linux, follow these steps:

  1. Check the network card information in the current system using the “ifconfig -a” command to confirm whether the deleted network card still exists in the system. If the deleted network card no longer appears in the list, it means it has been successfully deleted.
  2. Open the network configuration file located at /etc/network/interfaces using a text editor such as vi or nano.
  3. Locate the configuration information of the deleted network card in the configuration file, usually appearing in the form of “iface eth0”. Restore the configuration information of the deleted network card to the file.
  4. Save and close the network configuration file.
  5. Use the ifconfig -a command to check the network card information in the system again, and confirm if the restored network card is displayed in the list.
  6. To restart the network service, you can use the following command:
  7. To restart the networking service on a Systemd system: systemctl restart networking.service.
  8. For SysV Init systems: restart the networking service by running /etc/init.d/networking restart.

After the recovery, you should be able to see the deleted network adapter reappear in the system and function properly.

Leave a Reply 0

Your email address will not be published. Required fields are marked *


广告
Closing in 10 seconds
bannerAds