Configure a systemd system to boot graphically by default in future boots.
Do not switch the current active state immediately.
Which command is appropriate?
systemctl set-default changes the default.target link for future normal boots without isolating the current system immediately.
Detailed explanation
systemctl isolate graphical.targetIncorrect. isolate changes the current target immediately.
systemctl set-default graphical.targetCorrect. set-default graphical.target changes the future default.
systemctl enable graphical.targetIncorrect. enable manages unit startup links but is not the default-target command.
systemctl start default.targetIncorrect. start requests a unit now and does not set the default.
Try it yourself
An example you can run in a temporary verification environment.
systemctl --help | grep -E 'set-default|set the default target'Expected result
set-defaultの説明。実際の既定値は変更しないKey points
- set-default is persistent configuration
- isolate changes current state
- Administrative permission is usually required
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.