top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

How to findout the services enabled at boot in Linux?

+2 votes
430 views

Can someone share the command if its there?

posted Mar 11, 2014 by Salil Agrawal

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

+2 votes
 
Best answer

Use the following command to list all services enabled at boot:

#chkconfig --list | grep $(runlevel | awk '{ print $2}'):on
Sample output:

acpid           0:off   1:off   2:on    3:on    4:on    5:on    6:off
atd             0:off   1:off   2:off   3:on    4:on    5:on    6:off
auditd          0:off   1:off   2:on    3:on    4:on    5:on    6:off
cloud-init      0:off   1:off   2:on    3:on    4:on    5:on    6:off
crond           0:off   1:off   2:on    3:on    4:on    5:on    6:off
dkim-milter     0:off   1:off   2:on    3:on    4:on    5:on    6:off
httpd           0:off   1:off   2:off   3:on    4:off   5:on    6:off
ip6tables       0:off   1:off   2:on    3:on    4:on    5:on    6:off
iptables        0:off   1:off   2:on    3:on    4:on    5:on    6:off
irqbalance      0:off   1:off   2:off   3:on    4:on    5:on    6:off
lvm2-monitor    0:off   1:on    2:on    3:on    4:on    5:on    6:off
mdmonitor       0:off   1:off   2:on    3:on    4:on    5:on    6:off
messagebus      0:off   1:off   2:on    3:on    4:on    5:on    6:off
netfs           0:off   1:off   2:off   3:on    4:on    5:on    6:off
network         0:off   1:off   2:on    3:on    4:on    5:on    6:off
ntpd            0:off   1:off   2:on    3:on    4:on    5:on    6:off
ntpdate         0:off   1:off   2:on    3:on    4:on    5:on    6:off
rsyslog         0:off   1:off   2:on    3:on    4:on    5:on    6:off
sendmail        0:off   1:off   2:on    3:on    4:on    5:on    6:off
sshd            0:off   1:off   2:on    3:on    4:on    5:on    6:off
udev-post       0:off   1:on    2:on    3:on    4:on    5:on    6:off

The first column of above output is the name of a service which is currently enabled at boot. You need to review each service.

Enable a service:

# chkconfig {service-name} on

Disable a service:

# chkconfig {service-name} off
answer Mar 11, 2014 by Meenal Mishra
Similar Questions
+2 votes

I am used to traditional update-rc.d et all.

Now I wonder how to add a a script that used to called by init.d (with start/sop ..) to the new "service start xx" regime.

All the tutorials I found talk about how to use update-rc.d..

+1 vote

I want to install ubuntu 17.2.
But after inserting my bootable pendrive I get this message on my screen.
Setup Error: end kernel panic - not syncing: vfs: unable to mount root fs on unknown block(2,0).
Please anyone problem?

+1 vote

I want to execute

ethtool -s wan0 advertise 00c

at system boot, before networking comes up. The only thing I can come up with is to throw a systemd service, WantedBy=basic.target.

But wondering if there isn't anything already that runs at system boot, whose purpose is something like that. Anyone know of a better way? rc-local.service runs after network.target, that's too late, here.

+1 vote

How does one put a Boot sector on a SD card to boot off it.
The .img file has been install on SD card.

...