what are the commands to view / stop & start a service in linux

Hi,  a service has stopped on a linux server and I wish to restart it.  Could someone let me know the commands to view, stop and restart and particular service in linux
Arsenal01Asked:
Who is Participating?
 
santoshmotwaniConnect With a Mentor Commented:
/etc/init.d/servicename status

for example apache :

/etc/init.d/httpd restart

/etc/init.d/httpd status
0
 
santoshmotwaniCommented:
/etc/init.d/servicename {start|stop|status|restart}
0
 
Arsenal01Author Commented:
Got it!! Thank you very much for your quick reply!!
0
 
TintinCommented:
Depending on your Linux distro, you can just do

service apache status
service apache restart

etc
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.