Switch the current systemd session to a non-graphical multi-user state with networking.
Do not change the default target for future boots.
Which command is correct?
systemctl isolate changes the currently active target. Unlike set-default, it does not change the target selected on the next boot.
Detailed explanation
systemctl set-default multi-user.targetIncorrect. set-default changes the future default rather than only the current state.
Incorrect. set-default changes the future default rather than only the current state.
systemctl enable multi-user.targetIncorrect. enable manages unit links and does not perform the requested immediate target switch.
Incorrect. enable manages unit links and does not perform the requested immediate target switch.
systemctl isolate multi-user.targetCorrect. isolate multi-user.target changes the current target.
Correct. isolate multi-user.target changes the current target.
systemctl mask graphical.targetIncorrect. mask prevents activation and is not the target-switch operation.
Incorrect. mask prevents activation and is not the target-switch operation.
Try it yourself
An example you can run in a temporary verification environment.
systemctl --help | grep -E 'isolate|Start one unit and stop all others'Expected result
isolateの説明。実際のターゲット切替は行わないKey points
- isolate changes current state
- multi-user is the non-GUI multi-user target
- It differs from set-default
Notes
- Environment: Linux / systemd 255以降
- 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.