How do you set the network card to start up automatically in Linux?

To set the network card to start up automatically in a Linux system, you can follow these steps:

  1. Open the terminal and log into the system using superuser privileges.
  2. You can edit the network configuration file using text editors like vi or nano. Common paths for network configuration files include:
  3. Configuration file for the network interface eth0 in CentOS/RHEL systems can be found at /etc/sysconfig/network-scripts/ifcfg-eth0.
  4. Ubuntu/Debian operating system: /etc/network/interfaces
  5. Open the corresponding network configuration file and locate the network card configuration information, usually presented in a format similar to the following.
DEVICE=eth0
ONBOOT=yes
  1. Ensure that the value of ONBOOT is set to “yes” to enable the network card to start automatically on boot.
  2. Save the file and exit the editor.
  3. Reboot the system and check if the network card has been set to start up automatically.

With the above steps, you can easily configure the network card to automatically start up in the Linux system.

广告
Closing in 10 seconds
bannerAds