Linux

[Linux] Service Enabled/Disabled

Richard.Ryu 2024. 4. 24. 16:03
반응형

보통 서버를 구축한 후, 서비스를 재시동해도 해당 서비스가 자동으로 올라오도록 enabled

또는 필요없는 서비스의 경우는 Disabled 를 해두기는 합니다.

 

그런데 어떤 서비스를 Enable 했는지, Disable 했는지를 하나하나 기억 할 수는 없습니다.

 

서버에서 현재 Enable 상태인 service를 확인하고자 하면, 

[root@localhost ~]# systemctl list-unit-files | grep enabled
auditd.service                                enabled
autovt@.service                               enabled
chronyd.service                               enabled
crond.service                                 enabled
-----
postfix.service                               enabled
rhel-autorelabel-mark.service                 enabled
rhel-autorelabel.service                      enabled
rhel-configure.service                        enabled
rhel-dmesg.service                            enabled
rhel-domainname.service                       enabled
rhel-import-state.service                     enabled
rhel-loadmodules.service                      enabled
rhel-readonly.service                         enabled
rsyslog.service                               enabled
sshd.service                                  enabled
systemd-readahead-collect.service             enabled
systemd-readahead-drop.service                enabled
systemd-readahead-replay.service              enabled
remote-fs.target                              enabled
runlevel2.target                              enabled
runlevel3.target                              enabled
runlevel4.target                              enabled
-----

 

Disable 상태는 grep 을 Disabled 로 변경하여 확인합니다.

[root@localhost ~]# systemctl list-unit-files | grep disabled
tmp.mount                                     disabled
brandbot.path                                 disabled
arp-ethers.service                            disabled
blk-availability.service                      disabled
chrony-wait.service                           disabled
console-getty.service                         disabled
console-shell.service                         disabled
containerd.service                            disabled
cpupower.service                              disabled
debug-shell.service                           disabled
ebtables.service                              disabled
firewalld.service                             disabled
iprdump.service                               disabled
iprinit.service                               disabled
iprupdate.service                             disabled
nmb.service                                   disabled
plymouth-halt.service                         disabled
plymouth-kexec.service                        disabled
반응형

'Linux' 카테고리의 다른 글

[Linux] Parallel-ssh(PSSH)  (0) 2024.12.03
[Linux] Audit : backlog limit exceeded  (0) 2024.04.24
[Linux] SAMBA  (0) 2024.03.19
[Linux] tree  (0) 2024.03.19
[Linux] userdel  (0) 2024.03.11