Review your favorite Linux distribution.
Go Back > Forums > Linux Forums > Linux - Software
User Name
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.


  Search this Thread
Old 04-13-2005, 11:40 PM   #1
Registered: Feb 2003
Location: Boise ID
Distribution: fedora
Posts: 156

Rep: Reputation: 30
start/stop service on the fly

Thx for all the help tonight guys. I have asked like 20 questions and you have been great. I am making a nice litte file for myself. One more question for tonight.

What is the command to start or stop a service. Suppose I wanted to stop apache or samba for some reason then start it again later. What would I type on the command line?
Old 04-13-2005, 11:42 PM   #2
LQ Guru
Registered: Nov 2003
Location: N. E. England
Distribution: Fedora, CentOS, Debian
Posts: 16,298

Rep: Reputation: 74
#service servicename start
#service servicename stop
#service servicename restart
those are the commands you need eg to start apache, you do "service httpd start".

Last edited by reddazz; 04-13-2005 at 11:43 PM.
Old 04-14-2005, 01:15 AM   #3
Harmaa Kettu
Registered: Apr 2005
Location: Finland
Posts: 196

Rep: Reputation: 30
Note that "service" command is distro-specific. "/etc/init.d/<servicename> start" is the standard way.
Old 04-14-2005, 03:30 AM   #4
LQ Guru
Registered: Nov 2003
Location: N. E. England
Distribution: Fedora, CentOS, Debian
Posts: 16,298

Rep: Reputation: 74
He is using Fedora, thats why I used the service command in my last post.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
auditd outputting errors at service start & stop cdhgee Fedora 8 08-08-2005 01:22 PM
How do i cleanly stop a service? n0vembr Linux - General 18 07-29-2005 04:11 AM
remotely start/stop service on WinNT PC from Linux cuzality Linux - Software 0 09-01-2004 01:48 PM
Is it possible to start stop and restart a linux service from a webpage? psychodreams Linux - Newbie 3 04-27-2004 01:24 PM
Mandrake - how to stop a service? taz76 Linux - Security 1 03-13-2003 06:31 AM

All times are GMT -5. The time now is 05:15 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration