Fedora 37  

 
Để bật hoặc tắt dịch vụ, hãy định cấu hình như sau.
[1] Hiển thị danh sách dịch vụ.
# the list of services that are active now
# to add [--all], display all included inactive servises
# to add [--no-pager], do not use pagers like [less/more]

[root@dlp ~]#
systemctl -t service

  UNIT                               LOAD   ACTIVE SUB     DESCRIPTION         >
  abrt-journal-core.service          loaded active running Creates ABRT problem>
  abrt-oops.service                  loaded active running ABRT kernel log watc>
  abrt-xorg.service                  loaded active running ABRT Xorg log watcher
  abrtd.service                      loaded active running ABRT Automated Bug R>
  atd.service                        loaded active running Deferred execution s>
  auditd.service                     loaded active running Security Auditing Se>

.....
.....

LOAD   = Reflects whether the unit definition was properly loaded.
ACTIVE = The high-level unit activation state, i.e. generalization of SUB.
SUB    = The low-level unit activation state, values depend on unit type.
52 loaded units listed. Pass --all to see loaded but inactive units, too.
To show all installed unit files use 'systemctl list-unit-files'.

# list of all services

[root@dlp ~]#
systemctl list-unit-files -t service

UNIT FILE                                  STATE           PRESET
abrt-journal-core.service                  enabled         enabled
abrt-oops.service                          enabled         enabled
abrt-pstoreoops.service                    disabled        disabled
abrt-vmcore.service                        enabled         enabled
abrt-xorg.service                          enabled         enabled
abrtd.service                              enabled         enabled
arp-ethers.service                         disabled        disabled
atd.service                                enabled         enabled
auditd.service                             enabled         enabled

.....
.....

user-runtime-dir@.service                  static          -
user@.service                              static          -
wpa_supplicant.service                     disabled        disabled

224 unit files listed.
[2] Dừng và TẮT cài đặt tự động khởi động cho một dịch vụ nếu bạn không cần.
Ví dụ dưới đây có nghĩa là dừng và tắt dịch vụ smartd.
[root@dlp ~]#
systemctl disable --now smartd