Post selection for commands not found in ifconfig

Source: Internet
Author: User

I enter ifconfig etho up under root, but the prompt is that I do not have the ifconfig command... What is this?
-------------
N has encountered such a problem recently.

The reason for this problem is that when you switch from a common user to a root userSu or su RootIf this is the case, the root user's private setting file will not be read! Therefore, the path of the environment variable does not contain directories such as/sbin/usr/sbin. Therefore, when you directly enter commands in these directories, you will be prompted that the command cannot be found!
The first one is recommended for solving the problem.
1. UseSu-, Su-root, or Su-l Root!
2. Add the full path when executing the command on the first floor.

3. Enter export Path = $ path:/sbin before execution, and then enter the ifconfig command you want to execute in the next line.

 

Su-root reads the root configuration file, that is, I am a root user, path, and other variables.

If Su root only reaches the root user, and all the variables such as path are still owned by the current user

 

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.