Debian 13: missing last command

root's picture

Missing `last` Command on a Fresh Debian 13 Installation

If you've just installed a fresh Debian 13 system and noticed that the last command is missing, you're not alone.

You may have already found multiple guides suggesting that installing sysvinit-utils is enough. However, on Debian 13, you might already have that package installed and still have no last command.

Don't worry—this is expected.


The Solution

The last command is now provided by the wtmpdb package.

Install it with:

sudo apt update
sudo apt install wtmpdb

Once the installation is complete, the command will be available immediately.

Verify the Installation

Check that the command exists:

which last

or

last --version

You can also verify which package provides it:

dpkg -S $(which last)

Expected output should reference the wtmpdb package.

Test the Command

Display the login history:

last

Show the last 10 logins:

last -n 10

Show reboot history:

last reboot

Show shutdown history:

last shutdown

Why This Happens

Older Debian releases and many online tutorials assume that the last utility comes from sysvinit-utils. In Debian 13, the command has been moved to the wtmpdb package, so older documentation no longer applies.

Hopefully this saves you some time searching through outdated guides!

Thou shalt not steal!

If you want to use this information on your own website, please remember: by doing copy/paste entirely it is always stealing and you should be ashamed of yourself! Have at least the decency to create your own text and comments and run the commands on your own servers and provide your output, not what I did!

Or at least link back to this website.

Recent content

root
root
root
root
root
root
root
root
root
root
root
root
root
root
root
root
root
root
root
root
root
root
root
root
root
root
root
root
root
root