Home > Operation and Maintenance > CentOS > The ifconfig command cannot be used in centos system

The ifconfig command cannot be used in centos system

王林
Release: 2020-03-21 14:30:29
Original
2911 people have browsed it

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.

The ifconfig command cannot be used in centos system

#Then we enter the directory of the network card configuration file. Execute the command:

cd /etc/sysconfig/network-scripts/
Copy after login

(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.

The ifconfig command cannot be used in centos system

#Then execute the following command to restart the network card service.

service network restart
Copy after login

After the execution is completed, we execute the following command to check whether the IP address has been assigned

ip addr
Copy after login

The ifconfig command cannot be used in centos system

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
Copy after login

Then we execute the command ifconfig, we can see that it can be used, and the system network card information is displayed.

The ifconfig command cannot be used in centos system

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!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template