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.
systemctl set-default rescue.targetIncorrect. set-default changes a future boot default rather than the current target.
systemctl isolate rescue.targetCorrect. systemctl isolate rescue.target changes the current state.
systemctl restart default.targetIncorrect. 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定義の読み取り
- Use read-only commands or a disposable Linux instance when checking boot metadata.
- Exact unit names and command output can vary slightly by distribution.
Foundation review
Place the operation
isolate rescue.target changes the current state; setting it as the default would also affect later boots.
Check the side effect
Plan for network services to stop and keep console access available during maintenance.