linux:init-systems
Table of Contents
Init Systems
who -r ctl start # get current runlevel sudo runlevel # get current runlevel
systemd
config files
ls -al /lib/systemd/system/runlevel*
Commands
systemctl start grpwise.service # start service grpwise systemctl stop grpwise.service # stop service grpwise systemctl status grpwise.service # show status of service grpwise systemctl enable grpwise.service # enable service grpwise systemctl disable grpwise.service # disable service grpwise systemctl get-default # get default runlevel systemctl set-default multi-user.target # set gui as default (runlevel 3) systemctl set-default graphical.target # set cli as default (runlevel 5) systemctl isolate graphical.target # switch to gui systemctl isolate multi-user.target # switch to cli systemctl reboot # reboot (runlevel 6) systemctl poweroff # shutdown (runlevel 0)
sysvinit
Commands
chkconfig --list grpwise # list runlevel of service grpwise chkconfig --add grpwise # add service grpwise to all runlevels chkconfig --del grpwise # remove service grpwise from all runlevels chkconfig --level 235 grpwise on # enable service grpwise on runlevels 2,3,5 chkconfig --level 235 grpwise off # disable service grpwise on runlevels 2,3,5
linux/init-systems.txt · Last modified: 2025/04/09 13:06 by gsys