1. Problem: I just installed centos7 at the minimum and want to check the local IP address. Then run ifconfig, and an error popped up as a result.
2. Troubleshooting: First of all, we understand whether it is caused by not turning on the network card? We can check through the following 3 methods;
1) Ping Baidu to find out whether the network card is enabled
2) Confirm whether the network card is enabled by entering ip addr to check whether the IP address can be obtained
3) Through cat /etc/sysconfig/network-scripts/ifcfg-enp0s3 (ifcfg-enp0s3 is the name of the network card, different machines are different.) Whether NBOOT is turned on (meaning whether the network card is turned on).
3. Conclusion of troubleshooting
1) If it can be pinged, it means that the network card is enabled and can obtain an IP address to access the Internet. (If not, you can use vi /etc/sysconfig/network-scripts/ifcfg-enp0s3 to change ONBOOT to yes. Change BOOTPROTO to dhcp, or to obtain the IP address manually, see Centos7 network configuration for details) Note: After modification Need to restart the network card (command: service network restart)
2) The obtained IP address can be checked through ip addr, which proves that the network card is enabled. If you can’t get it, please modify the network configuration file. Note: You need to restart the network card after modification (command: service network restart)
3) Check whether the network card is enabled through cat /etc/sysconfig/network-scripts/ifcfg-enp0s3, if not, use vi /etc/sysconfig/network-scripts/ifcfg-enp0s3 to modify the network configuration file.
Summary: At this time, it can be determined that ifconfig related tools are not installed.
4. Use yum provides ifconfig to check which package to improve ifconfig, and install it.
Then execute yum install net-tools
Then enter: ifconfig command to test
The version of the net-tools package can be displayed here, and the information related to the IP address can be viewed.
- Solution of device eth0 does not see to be present, delaying initialization. Error in network card under Linux
- [Solved] Job for network.service failed because the control process exited with error code. See “systemctl st
- Error report when executing ifconfig under centos7
- How to set fixed IP address for Raspberry Pie
- Linux: Configure Network address through Netplan
- linux yum Error: PYCURL ERROR 6 – “Couldn’t resolve host ‘mirrorlist.centos.org’”
- DNS server reported an error and shut down IPv6 and directory permissions
- Errors encountered when configuring static ip on Ubuntu 18.04
- How to Solve Ubuntu “Failed to fetch” Error
- Install and start the tftp-server server and possible solutions to Redirecting to /bin/systemctl restart xinetd.service problems
- How to Use Apt get Command Under Mac OSX
- [Solved] Linux error: SSH_exchange_identification: read: Connection reset by peer
- ls: cannot access /com: Host is down
- Restart and stop of nginx in Linux service
- Solve the problem of 404 Not Found error in nginx accessing dynamic interface
- CentOS 7 composer install error: phpunit/phpunit 4.8.35 requires ext-dom *
- CentOS Yum error: cannot retrieve repository metadata (repomd.xml) for repository:
- Nginx realizes the same background service for portal and business
- Linux yum Error: All mirror URLs are not using ftp
- How to Fix Linux sub process /usr/bin/dpkg returned an error code (1)