Solve the problem that the ifconfig command in RedHat cannot be used

Source: Internet
Author: User

Solve the problem that the ifconfig command in RedHat cannot be used

In RedHat, open the terminal and run the "ifconfig" command. If the prompt is "command not found", we can solve the problem as follows:

1. Enter the absolute path of the ifconfig command. ifconfig is under the/sbin directory. Therefore, run the following command on the terminal:

/Sbin/ifconfig

2. You can also modify the profile file and add the/sbin directory to the path. In this way, you can run this command without entering an absolute path, regardless of the directory. The method is as follows:

A. Open the/etc/profile file with the root permission:

VI/etc/profile

Add the following code to the last line of the file, save the file, and exit.

Export Path = $ path:/sbin

Run the following commands on the terminal:

Source/etc/profile

Then enter "ifconfig" to run the command directly.

This article is from the "kingdba" blog, please be sure to keep this source http://kingdba.blog.51cto.com/801693/1539425

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.