to know users' time on the PC

About writing shell scripts and making the most of your shell
Forum rules
Topics in this forum are automatically closed 6 months after creation.
Locked
danbar
Level 2
Level 2
Posts: 52
Joined: Wed Sep 14, 2011 1:47 pm
Location: Malta, Europe

to know users' time on the PC

Post by danbar »

As my computer has several users, how would I know how many times and how long has each user been using the PC? I remember that there was a command line but I simply forgot. Any help?
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
User avatar
txba516
Level 4
Level 4
Posts: 207
Joined: Fri Aug 10, 2007 11:57 am
Location: Atlanta, GA

Re: to know users' time on the PC

Post by txba516 »

Hi danbar,

Perhaps you are thinking of the "w" command?

Cheers!
LM17.2 x64 Cinnamon
Help the forums get answers faster! Mark your fixed problem thread as [SOLVED]
danbar
Level 2
Level 2
Posts: 52
Joined: Wed Sep 14, 2011 1:47 pm
Location: Malta, Europe

Re: to know users' time on the PC

Post by danbar »

I thought it was last reboot or users but they are not the right commands.
Buzzsaw
Level 6
Level 6
Posts: 1318
Joined: Sat Aug 23, 2014 12:53 pm

Re: to know users' time on the PC

Post by Buzzsaw »

Code: Select all

last [username]
danbar
Level 2
Level 2
Posts: 52
Joined: Wed Sep 14, 2011 1:47 pm
Location: Malta, Europe

Re: to know users' time on the PC

Post by danbar »

I think that was the right answer. thanks. Problem solved.
Locked

Return to “Scripts & Bash”