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

The ifconfig command cannot be used in centos system

王林
王林 Original
2020-03-21 14:30:29 2818browse

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/

(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

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

ip addr

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

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!

Statement:
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