Why is the last command failing on my fresh install of Alpine 3.12?

$ last
couldn't open file '/dev/null/wtmp': Not a directory

wtmp begins Thu Jan  1 00:00

(on a Linode server if that matters)

1 Answer 1


That's a long known issue. Alpine uses libmusl instead of glibc. It seems that

musl does not use or even support /dev/null/utmp or /dev/null/wtmp (and nothing appears to get written to /var/log/wtmp); so I guess there might not be a way to fix this.


There is an open issue for it on the Alpine Linux page and apparently it is a milestone for the 3.14.0 release of Alpine Linux. Until than there is probably no workaround for this.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.