Differences
This shows you the differences between two versions of the page.
linux_wiki:boot_systems_into_different_targets_manually [2016/03/01 22:08] billdozor [Other Systemctl Commands] |
linux_wiki:boot_systems_into_different_targets_manually [2019/05/25 23:50] |
||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== Boot Systems Into Different Targets Manually ====== | ||
- | |||
- | **General Information** | ||
- | |||
- | There are no longer runlevels; systemd uses " | ||
- | |||
- | ---- | ||
- | |||
- | ===== Systemd Units ===== | ||
- | |||
- | Unit configuration file locations | ||
- | * / | ||
- | * / | ||
- | |||
- | \\ | ||
- | Show available unit types | ||
- | <code bash> | ||
- | systemctl -t help | ||
- | </ | ||
- | |||
- | ---- | ||
- | |||
- | ===== Systemd Targets ===== | ||
- | |||
- | Some common targets | ||
- | * poweroff.target => power off the system | ||
- | * emergency.target => single user (root), root file system mounted, do not mount any other file systems, no network services. | ||
- | * Used if the system cannot be repaired in rescue.target | ||
- | * rescue.target => single user environment (root), mount local file systems, with minimum services loaded, no network services. | ||
- | * multi-user.target => Multi-user non-graphical, | ||
- | * graphical.target => GUI environment, | ||
- | * reboot.target => reboot the system | ||
- | |||
- | \\ | ||
- | What target is the system currently in? | ||
- | <code bash> | ||
- | systemctl -t target | ||
- | </ | ||
- | * Look for either emergency, rescue, multi-user, or graphical. | ||
- | |||
- | \\ | ||
- | Current default target | ||
- | <code bash> | ||
- | systemctl get-default | ||
- | </ | ||
- | |||
- | \\ | ||
- | Set default to graphical target | ||
- | <code bash> | ||
- | systemctl set-default graphical.target | ||
- | </ | ||
- | |||
- | \\ | ||
- | List loaded unit files (systemctl) of type target (--type=target) whether they are active or not (--all) | ||
- | <code bash> | ||
- | systemctl --type=target --all | ||
- | </ | ||
- | * systemctl list-units => " | ||
- | * --type=target => show loaded, active units of the target type | ||
- | * --all => show all loaded unit files, even if they are not active | ||
- | |||
- | \\ | ||
- | List all installed unit files on the system | ||
- | <code bash> | ||
- | systemctl list-unit-files | ||
- | </ | ||
- | |||
- | \\ | ||
- | View a target' | ||
- | <code bash> | ||
- | systemctl list-dependencies multi-user.target | ||
- | </ | ||
- | * List what will start upon entering multi-user.target | ||
- | |||
- | \\ | ||
- | Move from graphical target to multi-user (command prompt) | ||
- | <code bash> | ||
- | systemctl isolate multi-user.target | ||
- | </ | ||
- | * Stops all GUI services, goes to command line login prompt | ||
- | |||
- | ---- | ||
- | |||
- | ===== Other Systemctl Commands ===== | ||
- | |||
- | **Note:** By default, systemctl commands will only show the active configuration files unless you pass the " | ||
- | |||
- | * systemctl --type=service => list all loaded and active only service unit config files | ||
- | * systemctl --type=service --all => list all loaded and active or inactive units | ||
- | * systemctl is-active servicename => check if service is active or inactive | ||
- | * systemctl is-enabled servicename => check if service is enabled or disabled | ||
- | * systemctl --failed --type=service => list all failed services | ||
- | * systemctl list-unit-files --type=service => view enabled and disabled settings for all units installed on the OS of the service type | ||
- | |||
- | ---- | ||
- | |||
- | ===== Boot to rescue mode ===== | ||
- | |||
- | To boot to something other than the default target, such as the rescue target, during boot: | ||
- | - Interrupt boot process at grub menu | ||
- | - Press " | ||
- | - Navigate to the " | ||
- | - Append " | ||
- | - Ctrl+x to continue boot process | ||
- | |||
- | ---- | ||