Home>Article>Operation and Maintenance> The ifconfig command cannot be used in centos system
Problem:
After installing the centos7 minimized system, you will find that the ifconfig command is executed, prompting that the command is not found.
Solution:
Use Ip add to check whether the network card configuration information has been assigned an IP. The result shows that the network information is not assigned.
#Then we enter the directory of the network card configuration file. Execute the command:
cd /etc/sysconfig/network-scripts/
(Recommended tutorial:centos usage tutorial)
Then check the following network card file, enter the local network card to modify the network card file, and find ONBOOT=no. It needs to be modified to ONBOOT=yes and then saved.
#Then execute the following command to restart the network card service.
service network restart
After the execution is completed, we execute the following command to check whether the IP address has been assigned
ip addr
You can see that the IP address has been assigned.
Then we execute the command to install the net-tools package, execute the command:
yum install net-tools
Then we execute the command ifconfig, we can see that it can be used, and the system network card information is displayed.
Related video tutorial recommendations:linux video tutorial
The above is the detailed content of The ifconfig command cannot be used in centos system. For more information, please follow other related articles on the PHP Chinese website!