systemd: how to get current target

Sérgio Basto sergio at serjux.com
Wed Dec 24 15:09:33 UTC 2014


On Qua, 2014-12-24 at 08:14 -0600, Glenn Holmer wrote: 
> This page:
> 
> https://fedoraproject.org/wiki/Systemd#How_do_I_know_the_current_target.3F
> 
> says to use "systemctl get-default", but that's clearly wrong:
> 
> [root at shoggoth ~]# systemctl get-default
> graphical.target
> [root at shoggoth ~]# who -r
>          run-level 5  2014-12-24 07:49
> [root at shoggoth ~]# systemctl isolate multi-user
> [root at shoggoth ~]# systemctl get-default
> graphical.target
> [root at shoggoth ~]# who -r
>          run-level 3  2014-12-24 08:12                   last=5
> [root at shoggoth ~]# systemctl default
> [root at shoggoth ~]# systemctl get-default
> graphical.target
> [root at shoggoth ~]# who -r
>          run-level 5  2014-12-24 08:12                   last=3
> [root at shoggoth ~]#
> 
> What's the correct command?

cd /etc/systemd/system
ll default.target
lrwxrwxrwx 1 root root 36 Dez 24 15:07 default.target
-> /lib/systemd/system/graphical.target

To change I used :

ln -s /lib/systemd/system/graphical.target default.target -f

ll /lib/systemd/system/*target

-- 
Sérgio M. B.



More information about the kde mailing list