Systemd vs SysVinit Cheatsheet
description
Transcript of Systemd vs SysVinit Cheatsheet
-
Systemd SysVinitSystemd SysVinitVSService Related Commands
Miscellaneous Commands
Systemd New Commands
Runlevels
Comments
Comments
Comments
Comments
Systemd
Systemd
Systemd
Systemd
SysVinit
SysVinit
SysVinit
Start a serviceStop a serviceRestart a serviceReload a serviceService statusRestart a service if already runningEnable service at startupDisable service at startupCheck if a service is enabled at startupCreate a new service file or modify configuration
Note : New version of systemd support systemctl start dummy format.
System haltPower off the systemRestart the systemSuspend the systemHibernateFollow the system log file
Execute a systemd command on remote hostCheck boot timeKill all processes related to a serviceGet logs for events for todayHostname and other host related informationDate and time of system with timezone and other information
System haltSingle user modeMulti userMulti user with NetworkExperimentalMulti user, with network, graphical modeRebootEmergency ShellChange to multi user runlevel/target
Set multi-user target on next boot
Check current runlevelChange default runlevel
service dummy startservice dummy stopservice dummy restartservice dummy reloadservice dummy statusservice dummy condrestartchkconfig dummy onchkconfig dummy offchkconfig dummychkconfig dummy --add
haltpoweroffrebootpm-suspendpm-hibernatetail -f /var/log/messages or tail -f /var/log/syslog
systemctl dummy.service start -H user@hostsystemd-analyze or systemd-analyze timesystemctl kill dummyjournalctl --since=todayhostnamectltimedatectl
01, s, single23456emergencytelinit 3
sed s/^id:.*:initdefault:/id:3:initdefault:/
runlevelsed s/^id:.*:initdefault:/id:3:initdefault:/
systemctl start dummy.servicesystemctl stop dummy.servicesystemctl restart dummy.servicesystemctl reload dummy.servicesystemctl status dummy.servicesystemctl condrestart dummy.servicesystemctl enable dummy.servicesystemctl disable dummy.servicesystemctl is-enabled dummy.servicesystemctl daemon-reload
systemctl haltsystemctl poweroffsystemctl rebootsystemctl suspendsystemctl hibernatejournalctl -f
runlevel0.target, poweroff.targetrunlevel1.target, rescue.targetrunlevel2.target, multi-user.targetrunlevel3.target, multi-user.targetrunlevel4.target, multi-user.targetrunlevel5.target, graphical.targetrunlevel6.target, reboot.targetemergency.targetsystemctl isolate multi-user.target (OR systemctl isolate runlevel3.target)ln -sf /lib/systemd/system/multi-user.target /etc/systemd/system/default.targetsystemctl get-defaultsystemctl set-default multi-user.target
Systemd Commands: http://linoxide.com/linux-command/linux-systemd-commands/
Brought to you by LinOxide Team