Enter a minimal single-user-like maintenance environment without rebooting.
Which command is appropriate?
rescue.target provides a single-user-like maintenance state, and isolate can switch the current system to it.
Detailed explanation
systemctl isolate graphical.targetIncorrect. graphical.target starts a GUI-oriented state.
Incorrect. graphical.target starts a GUI-oriented state.
systemctl set-default rescue.targetIncorrect. set-default changes a future boot default rather than the current target.
Incorrect. set-default changes a future boot default rather than the current target.
systemctl isolate rescue.targetCorrect. systemctl isolate rescue.target changes the current state.
Correct. systemctl isolate rescue.target changes the current state.
systemctl restart default.targetIncorrect. target units are not restarted as ordinary services in this way.
Incorrect. target units are not restarted as ordinary services in this way.
Try it yourself
An example you can run in a temporary verification environment.
systemctl cat rescue.target 2>/dev/null | head || trueExpected result
rescue.targetのunit定義の一部。切替は行わないKey points
- rescue.target
- Single-user
- Maintenance
Notes
- Environment: systemd unit定義の読み取り
- 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.