check service status all code example Example: check service status in linux $ sudo service httpd status httpd is stopped