Sponsored Link
If you have experience with Red Hat, Fedora, and CentOS servers you might be knowing about service command this is very useful command to start,stop and restart a service simple way.
Service Syntax
sudo service <service name> start/stop/restart
Service command Examples
For example if you want to restart apache server use the following command
sudo service apache2 restart
One more
sudo service named restart
If you want to show the status of all services on your ubuntu server use the following command
sudo service
--
status-all
This command is very useful for server administrators.
Ah! I see the good ol’ service command is finally in debian 😛
AFAIK
sudo /etc/init.d/ [start|stop|restart|status|???]
does the same thing, and comes with tab-completion in case you forget the name of the service (or you’re too lazy to type it).
there is also “sudo invoke-rc.d start/stop/restart, also with tab completions
As Thomas has said /etc/init.d does the same thing…what is the point of using the service command, what benefits can it provide? Does it bypass the need for init.d scripts?
Does Ubuntu provide a GUI tool that does the same?
System->Administration->Services can set the state of services (i.e. whether or not to start them).
There’s no GUI tool I know of to bounce them (other than Konsole 🙂
The service commands make things simpler imo. The service command offers tab completion as well. It saves keystrokes compared to the ‘traditional’ way but thats just my 2 cents.