To Check Which Service is Running at Present in System what
is the Command?

Answer Posted / shanu

# service --status-all | grep -i "running"
crond (pid  3974) is running...
cupsd (pid  3895) is running...
gpm (pid  3965) is running...
hald (pid 3767) is running...
hidd (pid 3815) is running...
hpiod (pid 3864) is running...
hpssd (pid 3869) is running...

or else

to check if what services are set to run(or on) by default(at system boot)

use the below.
1.check the current run level using
# runlevel
N 5
2.check the list of services set to run at boot time
using
# chkconfig --list > /tmp/service.log

//the output will look like this
yum-updatesd    0:off   1:off   2:on    3:on    4:on    5:on    6:off

3.check the same using awk command according to your current run level
awk  '{if ($5 == "3:on") print $1}' /tmp/service.log

Thanks :)

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How do I start ms dos?

531


Which daemon is used for scheduling of the commands?

570


please advice me what i have to prepare for NIC Exam(22-feb- 09). send me the question pattern for the 2 hrs exam. please sent it to manivannan_it15@yahoo.co.in

1903


What does (cd dir && command) do?

542


Which command would you use to create a file system on a new hard drive?

578






What does f mean linux?

530


How does mkdir work in linux?

594


What does uname do in linux?

542


How do you kill a process in linux?

554


What is linux pwd (print working directory) command?

521


The ‘logout’ built in command is used to

764


Where is command history stored in linux?

535


How do I run whois command?

507


How do I find the linux version?

507


Explain shift command of linux?

576