Question: 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: そのようなファイルやディレクトリはありません
environment
- 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.
reference
https://forum.mxlinux.org/viewtopic.php?t=45848
$ touch /var/log/btmp
$ touch /var/log/wtmp