[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 236
  • Last Modified:

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
0
Arsenal01
Asked:
Arsenal01
  • 2
1 Solution
 
santoshmotwaniCommented:
/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

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now