In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-30 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly introduces the Linux system if Centos does not have a network card eth0 configuration file how to do, the article introduces in great detail, has a certain reference value, interested friends must read it!
Temporary solution
1. We all know that setting ip under linux is an ifconfig command.
The IP address can be temporarily set with the following command.
Ifconfig device name IP address (ifconfig eth0 192.168.1.117)
2. It will take effect immediately after it is set. You do not need to restart the Nic service (do not restart the Nic service, otherwise the one you just set up is gone) ifconfig can check the IP address of the current ENI.
Permanent solution / step 2
1. The above is a temporary solution. If you want to solve it completely, you need to generate a network card configuration file.
Copy Settings Profil
Generally speaking, if there is no network card eth0 configuration file, you will have an ifcfg-lo loopback interface configuration file under the network card configuration item / etc/sysconfig/network-scripts/, and copy a copy
2. After copying a lo configuration file, change the file IP address and parameters to eth0 and save it.
3. Write configuration files
The file copied by the above method is incomplete and can be completed by vi editing. Or enter the settings manually. For more information, please see the following figure and list.
A special reminder.
If you want to set the mac address, you can check it by ifconfig first. You can see the mac address.
4. Restart the network service
After setting up the network card configuration, you need to restart the network service. Enter the following command
Service network restart
If there is no error, it means that there is basically no problem with setting the format.
5. If the MAC address is set incorrectly, the following message will be prompted.
You can check ifconfig first, you can check the correct MAC address, of course, you can also directly remove the mac address setting column.
These are all the contents of this article "what to do if Centos does not have a network card eth0 configuration file in the Linux system". Thank you for reading! Hope to share the content to help you, more related knowledge, welcome to follow the industry information channel!
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.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.