Linux, centos, Bash: Service: Command not found
Check my operations .. [Forgottenp @ localhost ~] $ Service mysqld statusbash: Service: Command not found [forgottenp @ localhost ~] $ Supassword: [root @ localhost forgottenp] # service mysqld statusbash: Service: Command not found [root @ localhost forgottenp] # Su-l root [root @ localhost ~] # Service mysqld statusmysqld (PID 3039) is running... [root @ localhost ~] # A common user cannot use a service .... So I will log on with root... Or not .. Then I found this command on the Internet .. Su-l root (it should be the same as Su logon. = ..
The problem is that Su or su root only converts the current identity to root, and the user shell does not change. therefore, some system commands cannot be used. su-, Su-l, or Su-l root can completely convert the current environment to the root environment. as root login directly. second, the path of the service is/sbin/service. If the shell does not change, NO/sbin is found in your path by default. Therefore, no result is returned. If you use the Su-command environment to change to root, the path contains/sbin and you want to have a group.
Http://zhidao.baidu.com/question/143807707.html&__bd_tkn__=7bbb563f182182314f19b96fa6ae37b0990f82a78078338d51fed8133ea5c69d362ad36bb4bcda3b39bb3949f6bbe47087ac3af56e60b1f4e7eb60157958fe3a9d60aef8590f03de0125277ed036b0074803937e085abfffa049337b0729342ebf6203363fb5ada39c7c89accbdc8c09cb3624f44eaa