初期設定 : サービスの設定2024/12/16 |
|
サービスの状態の確認や 有効化/無効化 は以下のように実行可能です。 |
|
| [1] | サービスの一覧を表示します。 |
|
# 稼働中のサービスの一覧 [root@dlp ~]# systemctl -t service
UNIT LOAD ACTIVE SUB DESCRIPTION >
atd.service loaded active running Deferred execu>
auditd.service loaded active running Security Audit>
chronyd.service loaded active running NTP client/ser>
crond.service loaded active running Command Schedu>
dbus-broker.service loaded active running D-Bus System M>
dracut-shutdown.service loaded active exited Restore /run/i>
firewalld.service loaded active running firewalld - dy>
getty@tty1.service loaded active running Getty on tty1
.....
.....
tuned.service loaded active running Dynamic System>
user-runtime-dir@0.service loaded active exited User Runtime D>
user@0.service loaded active running User Manager f>
Legend: LOAD → Reflects whether the unit definition was properly loaded.
ACTIVE → The high-level unit activation state, i.e. generalization of S>
SUB → The low-level unit activation state, values depend on unit typ>
44 loaded units listed. Pass --all to see loaded but inactive units, too.
To show all installed unit files use 'systemctl list-unit-files'.
# 全サービスの一覧 [root@dlp ~]# systemctl list-unit-files -t service UNIT FILE STATE PRESET arp-ethers.service disabled disabled atd.service enabled enabled audit-rules.service enabled enabled auditd.service enabled enabled autovt@.service alias - blk-availability.service disabled disabled bluetooth.service enabled enabled bolt.service static - capsule@.service static - chrony-wait.service disabled disabled chronyd-restricted.service disabled disabled chronyd.service enabled enabled ..... ..... tuned.service enabled enabled udisks2.service enabled enabled user-runtime-dir@.service static - user@.service static - 252 unit files listed. |
| [2] | 不要なサービスを止めるには以下のようにします。 例として、[nis-domainname] サービスを停止し、システムの起動時に自動的に起動しないように設定しています。 |
|
# 停止と無効化を同時に実行する場合は以下 [root@dlp ~]# systemctl disable --now nis-domainname
|
| Sponsored Link |
|
|