I want to know why / var / log / wtmp is not on MX Linux

Question: Question:


As a Linux novice, I recently studied and tried the last command and found that /var/log/wtmp does not exist on my PC as shown below.
I want to know the reason and how to deal with it.

$ last
last: cannot open /var/log/wtmp: そのようなファイルやディレクトリはありません


  • OS: MX Linux

Answer: Answer:

The reason for checking the login record with the last command etc. is that Linux is traditionally used by multiple users, but
On the other hand, since only one person logs in to a PC with an OS installed, it is widely used for personal purposes.
It seems that the file does not exist by default in MX Linux.

To be able to see the login record with the last command, simply create a log file.


$ touch /var/log/btmp
$ touch /var/log/wtmp
Scroll to Top