Solve "Shutdown:command not found" problem under Linux

Source: Internet
Author: User

 When you shut down today, you use shutdown to do this, but a "Bash:shutdown:command not found" error message appears. This makes me very confused, this command in the system is sure to exist, but why this problem, after checking the data, found that the system did not find the path of the command.

For resolution of such problems, you need to look at the path to the command, and then modify the environment variable configuration file. bash_profile.

First look at the location of the shutdown command, the path, the input statement Whereis shutdown, and find its location.

Then look at the environment variable configuration file. Bash_profile, which is a hidden file under the user's home directory file, can be viewed using Ls-al. Take a look at whether the path path contains the paths that were previously found in the shutdown (which should not normally be). At the end of the file, add path= $PATH: xxxx. Where, "xxxx" for the path of shutdown, here note, add is the shutdown lookup path, not the absolute path, otherwise it is not found. That is, if shutdown in/sbin/shutdown, then xxxx is/sbin. Save exit.

Then execute the file with source ~/.bash_profile. This will allow the shutdown to be used normally.

Solve "Shutdown:command not found" problem under Linux

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.