Skip to content

Loginctl No such File or Directory

[myuser@arch ~]$ loginctl enable-linger myuser

Could not enable linger: No such file or directory

Why? Extra points if you can answer why there is such a fascination with ridiculous vague errors.

EDIT: Solution is to ditch loginctl and just do it yourself.

sudo mkdir -p /var/lib/systemd/linger/

sudo touch /var/lib/systemd/linger/$USER

Edited 6 May 2019. We only hold this version.

2 points6 comments
Open on Reddit
About this post
Posted
Archived
Edited
Score
2 · 100% up
Kind
Text
ID
bl9vcf

Author

4
posts
13
comments
0
media
View profile

8 comments

loginctl list-sessions

1 points

[myuser@arch ~]$ loginctl list-sessions

SESSION UID USER SEAT TTY

1 1000 myuser

3 1000 myuser pts/1

4 1000 myuser pts/2

​

3 sessions listed.

1 points

Could not enable linger: No such file or directory

Why? Extra points if you can answer why there is such a fascination with ridiculous vague errors.

...apparently the following folder didn't exist, /var/lib/systemd/linger

LOL

1 points

At no point was the folder mentioned in any error, syslog, or context. I found this on a completely unrelated bug report. It should have created this folder on its own if it did not exist or mentioned it in the error. Even after fixing it the command STILL did not function. Worth pointing out the the final solution was to just bypass it and do what the command was suppose to do manually.

2 points

After

sudo mkdir -p /var/lib/systemd/linger/

sudo touch /var/lib/systemd/linger/$USER

I got

Could not enable linger: Read-only file system

1 points

Keyboard shortcuts

Move and act

jork
Next / previous post or comment
Enteroro
Open the post
f
Open the media viewer
s
Save
h
Hide (the toast has Undo)
Tab
Right after an action: the toast's Undo
x
Collapse the comment
v
Next layout: cards, compact, grid

Go to

/
Search
gthenh
Home
gthena
All
gthens
Subreddits
gthenl
Library
?
This list
Esc
Close a menu or this list

In the viewer

←or→
Previous / next file
↑or↓
Previous / next post
korj
Previous / next post
Space
Play / pause
m
Mute
z
Zoom
s
Save
o
Open the post (on its own page: back to it)
Esc
Close

Keys do nothing while you type in a box.