Problem Description
Linux CentOS7 system, -bash: ifconfig: command not found
solution
1. Execute yum search ifconfig (search which installation package ifconfig is in):
yum search ifconfig
1.1 If you encounter the following error:
Solution:
vi /etc/resolv.conf
Insert the following two lines, save and exit to solve:
nameserver 8.8.8.8
nameserver 8.8.4.4
If inserting the above two lines fails to solve the problem, it may be that the network card is not turned on during installation, resulting in the inability to connect to the network. For the solution, refer to conveyor belt
2. Execute yum search ifconfig again (search which installation package ifconfig is in):
yum search ifconfig
The execution effect is as shown in the figure below:
3. Execute the following command to download net-tools.x86_64:
yum install net-tools.x86_64
------------------ So far, the ifconfig command can be executed normally ---------------------