Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Is that possible to start a screen session on login of any users in Linux system and log each and every activity done by him in a file for later review or email that after his logout..

Basically, I want to see what an user does on the system what were the output of all the commands he ran.

I came across, script and sudosh tools but still working on them to configure them properly. If anyone has the experience with them, please guide me...

Thanks Ramesh

share|improve this question

migrated from Sep 25 '11 at 9:54

This question came from our site for professional and enthusiast programmers.

up vote 3 down vote accepted

There's the script command in most Linux distributions which will record anything happening in the respective shell session.

What exactly was your problem with script? What kind of shell actions do you want to record?

share|improve this answer
I want to record all the commands run on shell and output as well. Any URL or reference manual would be much appreciated!! – Ramesh Kumar Sep 25 '11 at 8:47
I'm not sure what problem you're facing. You can simply use script as login shell for the users whose session you want to record. For trying it simply run the script command, do some things in that session, and after exiting it take a look at the file typescript. – joschi Sep 25 '11 at 9:04

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.