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
What is the makefile in c?
What is FC command?
What does the command env do?
How do I run a script in linux?
What is a make target?
What is grep command?
What does kill in linux?
What command do you type to find help about the command who?
What is du -s * | sort -k1,1rn | head command used for?
What is sudo bash command?
What is difference between free and available memory in linux?
What is in mkdir command?
How do you sort cpu in top command?
How do I find the linux version?
Which are the linux directory commands?