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

How can I watch another user's shell session? I'd like to evaluate another user's behavior. I'm looking into using screen, but I don't know how to force his terminal to start a screen session.

Is there a way?

share|improve this question

You can set screen as the login shell for the user with

  usermod -s /usr/bin/screen guest

Logging can be set in /etc/screenrc

share|improve this answer
Will that only take effect when he logs in? Because he's already logged in, and I don't want to log him out thus disrupt his work, I just want to make sure he's not being naughty. – Rob Apr 29 '12 at 18:39
If a user has logged in, monitoring possibilities would vary even if everything she is doing is legitimate. You might look at shell history after she logs off, but if she runs a different shell or midnight commander, you would have to trace relevant history files as well. – Dmitri Chubarov Apr 29 '12 at 18:45
A key logger of some sort might be of help. – Dmitri Chubarov Apr 29 '12 at 19:25

You can try tailing the users bash history if you don't want to make them log off.

Log in, and run tail -f /home/<username>/.bash_history.

share|improve this answer

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.