Skip to content

I Have A PC

Tech Tips and How-To's Since 2010
Menu
  • Home
    • Tech
    • Apps
    • Misc
    • Linux
    • Windows
  • Giveaways and Freebies
  • Free Stuff
  • Sitemap
  • Copyright Policy
  • Cookie Policy
  • Contact
  • About
HomeLinuxLinux MintHow To Find Out Total Log In Time Of Users In Linux Mint / Ubuntu

How To Find Out Total Log In Time Of Users In Linux Mint / Ubuntu

March 20, 2011

If there are multiple users using Linux Mint / Ubuntu, often it becomes important to list out how much time (in hours) is a specific user actually logged in and other similar stats especially in work environment.

A simple tool for this especially for the Linux system administrators is the ac (short for accounting) which displays a report of total connect time of different users along with the total. This is a text based tool and nothing fancy but is powerful when one needs to use it in compiling user reports or include it in a shell script.

To install it first, type sudo apt-get install acct

Once installed, time to get some user auditing done 🙂

Typing ac -p lists the connect time of different users. (In this example, only one user uses the system).

Typing ac -d generates a daily connect time usage for all available users.

Combining specific user wise daily report is done by typing ac -pd.

(The way ac works is by reading the /var/log/wtmp file which keeps a record of user connect time in hours.This file is read by init and login processes).

As with all Linux Mint / Ubuntu commands, manual command is your best friend and typing man ac will be useful in getting ac to use as preferred. Related post about using man can be found here.

Happy user accounting.

Tags:find user login time linux, linux sys admin tips, linux terminal tips, user accounting tips linux

Related Posts

How To Set Custom Keyboard Shortcuts In Ubuntu 18.04

Classic Gnome Menu Indicator for Unity_005

How To Get Classic Gnome Menu In Ubuntu 11.10 Oneiric Ocelot’s Unity Desktop

Transform Your Linux Mint/Ubuntu Terminal Into A Geek Screen Just Like In The Movies

About The Author

admin

  • Bluesky
  • Email
  • Facebook
  • Twitter
  • YouTube

Free E-books

Linux Command-Line Cheatsheet
Linux Command-Line Basics
Linux Shell Scripting Primer

Free GWS Trial

Try Google Workspace free for 14 days

Archives

  • Bluesky
  • Email
  • Facebook
  • Twitter
© 2026 I Have A PC | WordPress Theme by Superb WordPress Themes
Back to Top ↑