Skip to content

Check last successful/failed login user on Linux

1、查看当前系统的登录用户

w
who

2、查看成功登录历史记录

last -n

3、查看尝试登录失败的历史记录

lastb -n

4、显示每个用户的登陆信息

lastlog

utmpdump /var/log/wtmp

who /var/log/wtmp

Disclaimer
  1. License under CC BY-NC 4.0
  2. Copyright issue feedback me#imzye.me, replace # with @
  3. Not all the commands and scripts are tested in production environment, use at your own risk
  4. No privacy information is collected here
Try iOS App