systemd
systemd
systemd システム・サービスマネージャ
initの不満を解決するために作られた
code:mermaid
flowchart LR
BIOS/UEFI-->ブートローダー-->カーネル-->systemd
cgroupで動いているらしい
systemdが目指したもの
システム起動時間の短縮
シェルスクリプトはシリアル(直列)に実行されるので起動処理に時間がかかっていた
起動処理を並列化できるようにしている
システム構成の動的変更
プロセス停止処理を標準機能で搭載
デーモンの実行環境を制御
/usr/lib/systemd/systemd(systemdの本体)が起動
/etc/systemd/system/
Unitの操作
Unitの一覧表示
$ systemctl list-unit-files
Unitの自動起動、無効化
$ systemctl enable/disable <UNIT>
Unitの手動起動、停止
$ systemctl start/stop <UNIT>
systemdのUnit
initからsystemdへの切り出し
SysVinit/Upstartでは/sbin/initを最初に実行
systemdでは/sbin/systemdが最初に実行
systemd-timesyncd
確認用
Q. systemdとは
Q. systemdの良いところ
Q. systemdの設定ファイルの場所
Q. systemdのUnitの一覧表示
Q. systemctlのenable/disable、start/stopの違いは何か
Q. Unitの自動起動、無効化
Q. Unitの手動起動、無効化
参考
これからSystemd入門する - Qiita
Linux女子部 systemd徹底入門
Rethinking PID 1
オールドタイプLinux管理者の為のsystemdの使い方と、新規サービスの登録方法 – UbuntuによるEco Linuxサーバ構築記
systemdによる自動起動(Linux) | そう備忘録
systemd(1) — Arch Linux マニュアルページ
systemd.service
systemd.unit(5)
systemd.socket(5)
systemd.exec(5)
関連
xinetd
init
メモ
10.6. systemd のユニットファイルの作成および変更 | システム管理者のガイド | Red Hat Enterprise Linux | 7 | Red Hat Documentation
#Linux