Help - Search - Members - Calendar
Full Version: Restart A Service
Linuxhelp > Support > Technical Support
usb
Hello, Can someone tell me how do restart a service? for example if I want to restart , sendmail , webserver, networkcard, etc.. or is there a way to find out all the process that are running on the computer and restart which ever i desideto restart?
Thanks, ph34r.gif
michaelk
It depends on the linux distribution and how the service is configured to run. The command:
ps ax

Will display a list of running processes. So what distribution are you running?
hughesjr
michaelk is correct, how you restart is dependant upon your distro ... but with most (not all) distros, the command would be:

/etc/init.d/service_name restart

(substitute the name of the service for service_name ... some service names are httpd(apache webserver), sendmail, etc.)

If you post your distro, we can help you more specifically.
usb
Thank you for four info. Im running Suse 9.0. So I have to go to /etc/init.d/ to restart a service?
also I went to /etc/init.d/ and I did not see sendmail and httpd so how do I restart those services>?
hughesjr
I don't have SuSE 9.0 ... I do have a 9.1 pro install.

Postfix is the default mail server for 9.1 ... probably also for 9.0.

apache2 is the name of the webserver for suse ...

so

/etc/init.d/postfix restart
/etc/init.d/apache2 restart
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2017 Invision Power Services, Inc.