Determining the init system in linux


برای این که بفهمیم init از چه معماری یا سیستمی استفاده می کند کافیست فایل زیر را ls و یا stat کنیم :

همان طور که می بینید فایل /sbin/init یک فایل symbolic link به فایل اجرایی systemd است پس می توان نتیجه گرفت این سیستم از systemd استفاده می کند.
همچنین می توان فایل زیر را خواند و فهمید که سیستم با چه نوع معماری ای بوت شده است :


In general, you can determine which init system is installed by checking whether the /sbin/init file is a symlink. If it’s not a symlink, then sysvinit is probably in use. If it’s a symlink pointing to /lib/systemd/systemd then systemd is in use. If it’s a symlink pointing to /lib/sysvinit/init then sysvinit is in use.

If you suspect that the init system may have been changed without a reboot, you may also cat /proc/1/comm to see which command name was used for the init daemon during the most recent boot. source


تست شده بر روی Debian 9

Initialization process concept in Linux

Does debian use systemd ?