Vadim Prudnikov
Vadim Prudnikov

Reputation: 11

Why doesn't WSL create /run/user/${uid} directory?

I wonder why there is no directory like /run/user/1000 when using WSL2 with Ubuntu 18.04 image?

How can I fix this (if possible)?

Upvotes: 1

Views: 2688

Answers (1)

rhb
rhb

Reputation: 21

The user runtime directory /run/user/$UID is a tmpfs created and mounted by systemd on user login.

Since WSL instances do not support systemd, there is no daemon that creates this directory. This also implies that systemd/systemctl commands do not run on your WSL boxes. Please refer to why systemd is disabled in WSL? for more details and discussions on how to hack systemd into your WSL box.

Upvotes: 2

Related Questions