Linux accton Command

Turn on or off the accounting logging process of user activities on the system

Linux accton Command is used to turn on or turn off the accounting logging of a Linux machine. This Linux command ensures an additional security level for the system administrators. Using this small tool, all the user activity can be tracked in a specified text file.

The accton command basically used by Linux system administrators for logging the user activity for tracking unusual activities.

Enable Linux accton Command

To use accton command you have to install the acct package for ubuntu and psacct for RHEL by running;

RHEL:   $ yum install psacct
Ubuntu: $ sudo apt-get install acct

accton Command Line Options

$ accton -V  #checks the version
$ accton --version  #checks the version

$ accton -h  #list of commands and usage
$ accton --help  #list of commands and usage

$ accton on [arg]  #start account monitoring
$ accton off [arg]  #stop account monitoring


$ accton [OPTION] on/off [FILE_NAME]

Here FILE_NAME is the specified file where the log will be generated. It is an optional argument, if no file is specified then, by default the file will be written at /var/log/account/pacct. This location might be different on different flavors of Linux.

You can check the monitoring status by running

$ systemctl status psacct
$ systemctl status acct

If it is running then you should get something like below;

Linux accton Command

Linux MAN
Posted in

Leave a Reply

Your email address will not be published.