Member-only story

Monitoring User Logins on Linux: A Comprehensive Guide

Mwiza Kumwenda
3 min readFeb 17, 2025

--

Photo by KeepCoding on Unsplash

Whether you are a Linux admin with multiple users under your watch or a regular Linux user, it is always good to be proactive in securing your system.

One of the ways you can actively secure your system is by monitoring user logins.

You should monitor four main types of logins on your system: successful logins, failed logins, SSH logins, and FTP logins.

1. last

last is a powerful command-line utility for monitoring previous logins on your system, including successful and failed logins. It also displays system shutdowns, reboots, and logouts.

Open your terminal and run the following command to display all login information.

last

2. lastlog

The lastlog utility displays login details of all users. Comprised of standard users, system users, and service account users.

sudo lastlog

--

--

Mwiza Kumwenda
Mwiza Kumwenda

No responses yet