Solution for command not found in Redhat Linux

Solution to command not found in Linux

 

  1. Launch the Linux terminal from the graphical interface.
  2. 2

    Type su at the command line and press Enter. Then enter the boot user password (note that it is not displayed on the screen), press Enter, and log in to the boot user.

  3. 3

    Enter gedit /etc/profile at the command line and press Enter. This opens a text editor for editing the profile file.

  4. 4

    On the last line of the file, add PATH=$PATH:/sbin, then save and close the file. Note, it is important to remember to save the file.

  5. 5

    Continue to enter source /etc/profile on the command line and press Enter to make the changed configuration file take effect. Note that / in front of etc cannot be omitted.

  6. 6

    Now, it's all done. Immediately try to execute the shutdown -h now shutdown command, is there no error message?

    END

Baidu experience: jingyan.baidu.com

Precautions

  • The shutdown command must be executed by the boot user, and ordinary users cannot execute this command.

 

 

 

 

 

 

 

 

 

http://jingyan.baidu.com/article/6079ad0e64d5f728ff86dbc8.html

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=327099813&siteId=291194637