/Sbin/Service Not Found on Ubuntu
来源:互联网 发布:淘宝网如何找货源 编辑:程序博客网 时间:2024/05/17 22:47
平时工作中遇到的相关问题解决方案,感觉不错,转载过来分享一下。
By Kristen Waters, eHow Contributor
If you attempt to use the command "sudo /sbin/service service_name start" on a Ubuntu computer, the message "/sbin/service: No such file or directory" will appear. The /sbin/service script is the script used by Red Hat-based Linux distributions to control system services. This script is not found in the same location in the Ubuntu Linux distribution. Instead, Ubuntu has a different method for starting and stopping services. Have a question? Get an answer from online tech support now!
Services Explained
A service is a program that runs in the background performing essential tasks or waiting to respond to a request. Services are typically started during the boot process and are owned by the root user. Common services include the "apache2," "mysql," "cron" and "gdm" services. Services can be started and stopped manually by the system administrator. Typically, they are only stopped or restarted when the administrator makes configuration changes to the service or if it is not functioning properly.
Using /etc/init.d Commands
The traditional way to manage services on Ubuntu is with the "/etc/init.d/service_name" command, where "service_name" is the name of the service that you want to start. The "/etc/init.d" directory is where the scripts that start the services were traditionally located. Since version 6.10, this directory contains scripts which make the replacement service management method backwards compatible.
The syntax for managing services using the "/etc/init.d" method is:
sudo /etc/init.d service_name start|stop|restart
The command "sudo /etc/init.d service_name start" starts the service. The command "sudo /etc/init.d service_name stop" stops the service. The command "sudo /etc/init.d service_name restart" stops, then restarts the service. The command "ls /etc/init.d" produces a list of all the services.
Using the "service" Command
In Ubuntu 6.10, the method for managing services was changed to the "service" command. The syntax is:
sudo service service_name start|stop|restart
The command "sudo service service_name start" starts the service. The command "sudo service service_name stop" stops the service. The command "sudo service service_name restart" stops then restarts the service. The command "service --status-all" is used to show the status of all the services. You do not have to use the "sudo" command to view the services.
Using the Graphical User Interface
The Ubuntu desktop edition provides a GUI for disabling unwanted services. Click on the "System" menu, highlight the "Administration" option and click on "Services" to open the utility. This starts the Services Settings utility. A list of services appears with a check mark next to the enabled services. Click the "Unlock" button and type the administrator password into the text box to make changes to the services. Place a check mark next to any services you want enabled and remove the check mark next to any services you want to disable. Click the "Close" button to save the changes.
Read more : http://www.ehow.com/info_12024559_sbin-service-not-found-ubuntu.html
- /Sbin/Service Not Found on Ubuntu
- /Sbin/Service Not Found on Ubuntu
- centos没有/sbin/service命令的恢复方法(-bash: service: command not found)
- EPStoPDF file not found error on Ubuntu
- Android adb error: “device not found” on Ubuntu
- ubuntu 出现 Not Found The requested URL /phpmyadmin/ was not found on this server.
- linux 配置网络/sbin/ifup: configuration for eth0 not found
- ubuntu 配置nfs 出现Failed to start nfs.service: Unit nfs.service not found
- ubuntu phpmyadmin not found
- ubuntu command-not-found
- the authentication endpoit username was not found on the configured secure token service
- bash: service: command not found
- bash: service: command not found
- bash: service: command not found
- bash: service: command not found
- crontab service command not found
- bash: service: command not found
- bash: service: command not found
- JavaWeb项目获取Spring自动装配的Bean对象
- 动作手游技术漫谈-引擎选择
- 设计模式——六大原则
- Android实现下载及播放音乐
- Impala 教程
- /Sbin/Service Not Found on Ubuntu
- ubuntu下安装apache服务器
- 20150206 调试终端LDO 故障
- 【图像处理】图像自动对比度
- java1.7安装与配置(windows & linux)
- 黑马程序员——其他对象
- Android 防止多次点击提交数据(文章或评论)代码片段
- Leetcode Repeated DNA Sequences
- 转载------给程序员介绍一些C++开源库