Install Lastb On A Debian, Ubuntu, Alpine, Arch, Kali, CentOS, Fedora, Raspbian And MacOS

Install Lastb On A Debian, Ubuntu, Alpine, Arch, Kali, CentOS, Fedora, Raspbian And MacOS

lastb

Show a listing of last logged in users.

Maintainer: LaMont Jones


Section: utils

Install lastb

  • Debian apt-get install util-linux Click to copy
  • Ubuntu apt-get install util-linux Click to copy
  • Alpine OS apk add util-linux Click to copy
  • Arch Linux pacman -S util-linux Click to copy
  • Kali Linux apt-get install util-linux Click to copy
  • CentOS yum install sysvinit-tools Click to copy
  • Fedora dnf install util-linux Click to copy
  • Raspbian apt-get install util-linux Click to copy
  • macOS brew install util-linux Click 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 copy
Show a list of all last logged in users since a given time:
sudo lastb --since YYYY-MM-DDClick to copy
Show a list of all last logged in users until a given time:
sudo lastb --until YYYY-MM-DDClick to copy
Show a list of all logged in users at a specific time:
sudo lastb --present hh:mmClick to copy
Show 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.