Install Lastb On A Debian, Ubuntu, Alpine, Arch, Kali, CentOS, Fedora, Raspbian And MacOS
Install lastb
-
Debian
apt-get install util-linuxClick to copy -
Ubuntu
apt-get install util-linuxClick to copy -
Alpine OS
apk add util-linuxClick to copy -
Arch Linux
pacman -S util-linuxClick to copy -
Kali Linux
apt-get install util-linuxClick to copy -
CentOS
yum install sysvinit-toolsClick to copy -
Fedora
dnf install util-linuxClick to copy -
Raspbian
apt-get install util-linuxClick to copy -
macOS
brew install util-linuxClick to copy
Show a listing of last logged in users.
How to use lastb?
Below are few example commands for lastb that you can use in the terminal.
Show a list of all last logged in users:sudo lastbClick to copyShow a list of all last logged in users since a given time:sudo lastb --since YYYY-MM-DDClick to copyShow a list of all last logged in users until a given time:sudo lastb --until YYYY-MM-DDClick to copyShow a list of all logged in users at a specific time:sudo lastb --present hh:mmClick to copyShow a list of all last logged in users and translate the IP into a hostname:sudo lastb --dnsClick to copy
Installing lastb command is simple. just copy one of the above commands for your operating system and paste it into terminal. This command is available for Debian, Ubuntu, Alpine, Arch, Kali, CentOS, Fedora, Raspbian and macOS operating systems. Once you run the command it will install the latest version of lastb 2026 package in your OS.




