On a SysVinit system, switch the current runlevel to 3.
Send the runlevel-change request to init using a compatibility command.
Which command is correct?
telinit 3 asks SysVinit's init to switch to runlevel 3. On systemd systems, a compatibility implementation may translate the request.
Detailed explanation
runlevel 3Incorrect. runlevel reports state and does not request a transition.
Incorrect. runlevel reports state and does not request a transition.
wall 3Incorrect. wall broadcasts a message and does not change a runlevel.
Incorrect. wall broadcasts a message and does not change a runlevel.
telinit 3Correct. telinit 3 requests the move to runlevel 3.
Correct. telinit 3 requests the move to runlevel 3.
shutdown 3Incorrect. shutdown schedules a halt or reboot rather than selecting a SysV runlevel.
Incorrect. shutdown schedules a halt or reboot rather than selecting a SysV runlevel.
Try it yourself
An example you can run in a temporary verification environment.
telinit --help 2>&1 | head || trueExpected result
telinitまたは互換実装の使用法。ランレベル変更は行わないKey points
- telinit requests init changes
- The number is the runlevel
- Notify users before changing state
Notes
- Environment: Linux / SysVinitまたはsystemd互換telinit
- Command output formatting can vary slightly by distribution or tool version.
- Run the example in a temporary directory or process when possible.
Foundation review
Read the scope first
Check whether the command acts on the current shell, a new process, an existing process, or a file.
Verify the observable result
Use the supplied command and compare the output with the expected result.