In linux, the following error occurs: bash: service: commandnotfound.

Source: Internet
Author: User
In linux, the following error occurs: bash: service: commandnotfound1. This usually occurs when the suroot command is used to perform the operation. Su or suroot only acts as the root user. the actual system environment is not switched to the root user environment ,... in linux, the following error occurs: bash: service: command not found 1. this usually occurs when the su root command is used for operation. The su or su root operation is equivalent to the root user. the actual system environment is not switched.
To the root user environment, but only the current login user;
Su-,-l, and -- login are all completely switched to the root environment, which is equivalent to completely logging on with the root user. The service command directory is in/sbin/, so there are two ways to solve this problem: a. directly use su-root to switch to the root user, use service B, use su root to switch to the root user, and use/sbin/service at the same time, such as/sbin/service mysql restart.
Related Article

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.