Boot, reboot, shutdown using systemd Flashcards

1
Q

Reboot in 5 minutes with messsage
Reboot at midnight
Reboot immediately

A

shutdown -r +5 System is going down for a reboot
shutdown -r 00:00
shutdown -r now

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Shutdown

A

shutdown -P
systemctl poweroff
systemctl halt
shutdown -h +5 system will be shut down in 5 minutes

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Cancel planned reboot

A

shutdown -c

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Show running units with type=target

A

systemctl list-units -t target

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Show the list of unit types

A

systemctl -t help

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

List dependencies

A

systemctl list-dependencies

systemctl list-dependencies multi-user.target

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Main targets on the system

A
multi-user.target
graphical.target
rescue.target
reboot.target
emergency.target
(A special target unit that starts an emergency shell on the main console. This target does not pull in any services or mounts. It is the most minimal version of starting the system in order to acquire an interactive shell; the only processes running are usually just the system manager (PID 1) and the shell process. )
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Switch to another target

A

systemctl isolate multi-user.target

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Get default target

Set default target

A

systemctl get-default

systemctl set-default graphical.target

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Load into specified target while booting

A

press e to enter into grub menu
go to linux line and in the of the line append:
systemd.unit=multi-user.target
press Ctrl+x to continue the boot process

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Recover lost root password

A

when rebooting press ‘e’ to enter grub menu

  1. add rd.break into the end of linux line
  2. ctrl-x -to continue booting into a single mode
  3. ls =>sysroot dir
  4. mount -o remount,rw /sysroot
  5. chroot /sysroot
  6. enter ‘passwd root’ to set up new root password
  7. touch /.autorelabel
  8. reboot -f
How well did you know this?
1
Not at all
2
3
4
5
Perfectly