Change runlevels, boot targets and shutdown (3) Flashcards

Objective 101.3 Weight 3

1
Q

Which of the following locations are potential locations for systemd unit files?

  1. /usr/lib/systemd/
  2. /run/systemd/
  3. /etc/systemd/
  4. /etc/init.d/
  5. /etc/systemd/init.d/
  6. /lib/systemd/
A
  1. /usr/lib/systemd/
  2. /run/systemd/
    AND
  3. /etc/systemd/

The systemd unit files may reside in /usr/lib/systemd/, /run/systemd/, or /etc/systemd/. Though some distributions do not have the /run/systemd/ directory.

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

Which of the following commands will shut down the system completely and power it off, if it is a systemd system?

  1. systemctl isolate reboot
  2. systemctl isolate poweroff
  3. systemctl isolate halt
  4. shutdown
  5. halt
  6. poweroff
A
  1. systemctl isolate poweroff
  2. systemctl isolate halt
  3. shutdown
  4. halt
    AND
  5. poweroff

All the commands, except systemctl isolate reboot, will shut down the system completely and power it off, if it is a systemd system, and super user privileges.

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

Which of the following command will move the system from its current systemd target to the emergency target on a systemd system?

  1. init 1
  2. telinit 1
  3. systemctl isolate emergency
  4. systemctl isolate emergency.target
  5. systemd isolate emergency
  6. systemd isolate emergency.target
A
  1. systemctl isolate emergency
    AND
  2. systemctl isolate emergency.target

Because you don’t need to add the .target to the command, both the systemctl isolate emergency and the systemctl isolate emergency.target commands will move the system from its current systemd target to the emergency target on a systemd system, if you have super user privileges. The init and telinit commands are used on SysVinit systems, and not those that use systemd system initialization.

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

Which of the following SysVinit runlevels were for systems that needed network services started, and a Graphical User Interface provided?

  1. runlevel 1
  2. runlevel 2
  3. runlevel 3
  4. runlevel 4
  5. runlevel 5
  6. runlevel 6
A
  1. runlevel 2
    AND
  2. runlevel 5

Most SysVinit distributions used runlevel 5 to provide both network and GUI services. However, before it switched to Upstart and then systemd for system initialization, Ubuntu used runlevel 2 instead of runlevel 5 to provide network and GUI services.

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

What command should be executed after modifying /etc/inittab?

A

telinit q or telinit Q should be executed. This command tells init to reload its configuration. If not reloaded, the system may halt due to an incorrect /etc/inittab configuration

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