accton command in Linux with Examples

accton is one of important Linux/Unix command which is used by the administrator to monitor user activities. It is used to turn on or turn off the process for accounting or change info process accounting file. When the command is run in the terminal without any argument, it stops the process accounting.


accton [OPTION] on|off| file_name

Here, file_name is the name of the file where process accounting information is to save.

The system’s default process accounting file is saved in ‘/var/log/account/pacct‘. The default path of the file might change with different Linux platform i.e. it might be different for Red Hat or other Linux based platform. Usually, the process accounting is enabled automatically at boot time by the system itself.

Example 1: To turn on the process for accounting.



Example 2: To turn off the process for accounting.



Example 3: To save process accounting in a particular file let’s say the file name is geeksforgeeks.txt we can use the following command.

accton geeksforgeeks.txt




  • -h, –help: Shows help and exit.

  • -V, –version: Show version and exit.

My Personal Notes arrow_drop_up

Check out this Author's contributed articles.

If you like GeeksforGeeks and would like to contribute, you can also write an article using or mail your article to See your article appearing on the GeeksforGeeks main page and help other Geeks.

Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.