rh124_systemd

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
rh124_systemd [2026/10/20 16:15] – created rpjdayrh124_systemd [2026/10/30 10:19] (current) – [More] rpjday
Line 1: Line 1:
-====== RH1245 systemd ======+====== RH124 systemd ======
  
 ===== Links ===== ===== Links =====
  
-  * [[https://systemd.io/|System and Service Manager]] +  * [[https://systemd.io/]] 
-  * [[https://docs.redhat.com/en/documentation/red_hat_enterprise_linux/10/html/using_systemd_unit_files_to_customize_and_optimize_your_system/index|Using systemd unit files to customize and optimize your system]]+  * [[https://www.freedesktop.org/software/systemd/man/latest/systemd.html]] 
 +  * [[https://docs.redhat.com/en/documentation/red_hat_enterprise_linux/10/html/using_systemd_unit_files_to_customize_and_optimize_your_system/index]] 
 + 
 +===== systemd packages ===== 
 + 
 +<code> 
 +$ rpm -qa "*systemd*" 
 +systemd-libs-257-23.el10_2.1.alma.1.x86_64 
 +rpm-plugin-systemd-inhibit-4.19.1.1-23.el10.alma.1.x86_64 
 +systemd-pam-257-23.el10_2.1.alma.1.x86_64 
 +systemd-257-23.el10_2.1.alma.1.x86_64 
 +python3-systemd-235-11.el10.x86_64 
 +systemd-udev-257-23.el10_2.1.alma.1.x86_64 
 +$ 
 +</code> 
 + 
 +===== Start, stop and status check ===== 
 + 
 +<code> 
 +$ systemctl status sshd.service 
 +$ sudo systemctl stop sshd.service 
 +$ sudo systemctl start sshd.service 
 +</code> 
 + 
 +===== Enable and disable ===== 
 + 
 +<code> 
 +$ systemctl disable sshd.service 
 +$ systemctl enable sshd.service 
 +</code> 
 + 
 +===== /usr/lib/systemd/system/sshd.service ===== 
 + 
 +<code> 
 +[Unit] 
 +Description=OpenSSH server daemon 
 +Documentation=man:sshd(8) man:sshd_config(5) 
 +After=network.target sshd-keygen.target 
 +Wants=sshd-keygen.target 
 +# Migration for Fedora 38 change to remove group ownership for standard host keys 
 +# See https://fedoraproject.org/wiki/Changes/SSHKeySignSuidBit 
 +Wants=ssh-host-keys-migration.service 
 + 
 +[Service] 
 +Type=notify 
 +EnvironmentFile=-/etc/sysconfig/sshd 
 +ExecStart=/usr/sbin/sshd -D $OPTIONS 
 +ExecReload=/bin/kill -HUP $MAINPID 
 +KillMode=process 
 +Restart=on-failure 
 +RestartSec=42s 
 + 
 +[Install] 
 +WantedBy=multi-user.target 
 +</code> 
 + 
 +===== More ===== 
 + 
 +<code> 
 +$ systemctl --type help 
 +$ systemctl list-units --type=target 
 +$ systemctl get-default 
 +</code> 
 + 
 +How to add a "drop-in" ''override.conf'': 
 + 
 +<code> 
 +$ systemctl edit sshd.service 
 +</code>
  • rh124_systemd.1792512929.txt.gz
  • Last modified: 2026/10/20 16:15
  • by rpjday