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