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@shoggoth ~]# systemctl get-default graphical.target [root@shoggoth ~]# who -r run-level 5 2014-12-24 07:49 [root@shoggoth ~]# systemctl isolate multi-user [root@shoggoth ~]# systemctl get-default graphical.target [root@shoggoth ~]# who -r run-level 3 2014-12-24 08:12 last=5 [root@shoggoth ~]# systemctl default [root@shoggoth ~]# systemctl get-default graphical.target [root@shoggoth ~]# who -r run-level 5 2014-12-24 08:12 last=3 [root@shoggoth ~]#
What's the correct command?
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@shoggoth ~]# systemctl get-default graphical.target [root@shoggoth ~]# who -r run-level 5 2014-12-24 07:49 [root@shoggoth ~]# systemctl isolate multi-user [root@shoggoth ~]# systemctl get-default graphical.target [root@shoggoth ~]# who -r run-level 3 2014-12-24 08:12 last=5 [root@shoggoth ~]# systemctl default [root@shoggoth ~]# systemctl get-default graphical.target [root@shoggoth ~]# who -r run-level 5 2014-12-24 08:12 last=3 [root@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
On 12/24/2014 09:09 AM, Sérgio Basto wrote:
cd /etc/systemd/system ll default.target lrwxrwxrwx 1 root root 36 Dez 24 15:07 default.target -> /lib/systemd/system/graphical.target
Yeah, I get that this is the default target. What I want to know is, what's the *current* target, i.e. what's the systemd way of querying runlevel. I understand that the concept doesn't apply exactly in systemd, so a better way to ask might be "of those targets which correspond to runlevels, which is the highest one that's running?"
For example, normally "systemctl list-units --type=target" shows both multi-user and graphical running, but after "systemctl isolate multi-user.target", graphical is no longer listed (adding --all shows it as "inactive").
I suppose you could hack up a script based on the runlevel* symlinks in /usr/lib/systemd/system, but surely there's a better way?
ls -l /etc/systemd/default.target or something like that should suffice. Or check journald for the last target loaded. That should also help.. On Dec 24, 2014 7:45 PM, "Glenn Holmer" shadowm@lyonlabs.org 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@shoggoth ~]# systemctl get-default graphical.target [root@shoggoth ~]# who -r run-level 5 2014-12-24 07:49 [root@shoggoth ~]# systemctl isolate multi-user [root@shoggoth ~]# systemctl get-default graphical.target [root@shoggoth ~]# who -r run-level 3 2014-12-24 08:12 last=5 [root@shoggoth ~]# systemctl default [root@shoggoth ~]# systemctl get-default graphical.target [root@shoggoth ~]# who -r run-level 5 2014-12-24 08:12 last=3 [root@shoggoth ~]#
What's the correct command?
-- Glenn Holmer (Linux registered user #16682) "After the vintage season came the aftermath -- and Cenbe." _______________________________________________ kde mailing list kde@lists.fedoraproject.org https://admin.fedoraproject.org/mailman/listinfo/kde New to KDE4? - get help from http://userbase.kde.org