Linux Administration
medium

Questão de Linux Administration #019e3987

Enunciado da Questão
Linux Administration
#sysvinit
#runlevel
#init
#telinit
#single-user-mode
Médio

Which of the following commands brings a system running SysV init into a state in which it is safe to perform maintenance tasks? (Choose TWO correct answers.)

A

shutdown -R 1 now

B

shutdown -single now

C

init 1

Correta
D

telinit 1

Correta
E

runlevel 1

Explicação Oficial / Explicações da Comunidade

Summary

To bring a system running SysV init into a safe state for maintenance tasks, you need to switch to runlevel 1 (single-user mode). The correct commands are init 1 and telinit 1, as they directly change the runlevel to 1.

How It Works

SysV init uses runlevels to define system states. Runlevel 1 is the single-user mode, which provides a minimal environment with only essential services, allowing maintenance tasks without interference from other users or services. The init command is the traditional way to change runlevels; telinit is a symbolic link or alternative that communicates with the init process to change runlevels. Both commands effectively tell the init process to switch to runlevel 1.

Why the Correct Answers Are Right

  • init 1: This command directly instructs the init process to change to runlevel 1. It is the standard method for switching runlevels in SysV init systems.
  • telinit 1: This command sends a message to the init process to change to runlevel 1. It is functionally equivalent to init 1 and is often used in scripts or by administrators.