Centos 7 ifconfig

Source: Internet
Author: User

Centos 7 ifconfig

Prompt-bash: ifconfig: command not found when running ifconfig in CentOS 7

Today, I have installed CentOS7 with VMWare and selected the minimal installation package mode. After installation, I want to check the local IP address and find an error.

# Ifcon
-Bash: ifconfig: commandnotfound

Google sorted out the solution

Check whether/sbin/ifconfig exists
Check whether the ifconfig command exists

If the ifconfig command exists, check the environment variable settings.

# Echo $ PATH

If the environment variable does not contain the path of the ifconfig command

Temporary environment variable modification: Enter

$ ExportPATH = $ PATH:/sbin

Then enter the ifconfig command, but it only temporarily changes the PATH in the shell. If the shell is closed, the modification disappears and the above operation needs to be repeated next time.

Permanently modify the PATH variable to include the/sbin PATH:

Open the/etc/profile file, enter export PATH = $ PATH:/sbin, save and restart X. In this way, the PATH is permanently modified, at any time in the future, you only need the ifconfig command in the book order.

3. If the ifconfig command does not exist

Yumupgrade
Yuminstallnet-tools

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.