For those users that might have configured a desktop at install but no longer use it, what would be the correct command(s) to disable the desktop?
Found below:
pi@ph5b:~ $ man systemd
[..]
On boot systemd activates the target unit default.target whose job is
to activate on-boot services and other on-boot units by pulling them
in via dependencies. Usually, the unit name is just an alias
(symlink) for either graphical.target (for fully-featured boots into
the UI) or multi-user.target (for limited console-only boots for use
in embedded or server environments, or similar; a subset of
graphical.target). However, it is at the discretion of the
administrator to configure it as an alias to any other target unit.
See systemd.special(7) for details about these target units.
pi@ph5b:~ $ man systemctl
[..]
get-default
Return the default target to boot into. This returns the
target unit name default.target is aliased (symlinked) to.
set-default TARGET
Set the default target to boot into. This sets (symlinks) the
default.target alias to the given target unit.
But its confusing bc it says graphical.target
instead of multi-user
on my Pi without desktop:
pi@ph5b:~ $ systemctl get-default
graphical.target
Out if interest, I switched back and forth successfully just now with above on my Debian laptop with desktop:
dehakkelaar@laptop:~$ sudo systemctl set-default multi-user.target
Created symlink /etc/systemd/system/default.target → /lib/systemd/system/multi-user.target.
dehakkelaar@laptop:~$ sudo reboot
dehakkelaar@laptop:~$ systemctl get-default
multi-user.target
dehakkelaar@laptop:~$ sudo systemctl set-default graphical.target
Removed /etc/systemd/system/default.target.
Created symlink /etc/systemd/system/default.target → /lib/systemd/system/graphical.target.
dehakkelaar@laptop:~$ sudo reboot
dehakkelaar@laptop:~$ systemctl get-default
graphical.target
This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.