lastcomm command not found

In this troubleshooting guide we learn how to fix lastcomm command not found error message

Introduction

When you run more command in linux terminal / console, you get the following error message

lastcomm: command not found

or when using sudo you get the following error message

sudo: lastcomm: command not found

Solutions to lastcomm: command not found

How To Fix lastcomm: command not found in Ubuntu / Debian / Kali Linux / Raspbian

In Ubuntu lastcomm is provided by acct package.

acct is:

GNU Accounting Utilities is a set of utilities which reports and summarizes data about user connect times and process execution statistics.

“Login accounting” provides summaries of system resource usage based on connect time, and “process accounting” provides summaries based on the commands executed on the system.

The ’last’ command is provided by the util-linux package and not included here.

To fix this problem, we can install more using the command below.

sudo apt-get -y install acct

This command might take some time to finish depending on your machine internet connection.

You can also use apt command to install acct.

sudo apt -y install acct

Or if you have aptitude installed you can use the following command.

sudo aptitude install acct

Summary

In this tutorial we learn how to fix lastcomm command not found error in Ubuntu / Debian / Kali Linux or Raspbian distribution.