Ask Ubuntu is a question and answer site for Ubuntu users and developers. 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 there a way to find a log of all the commands that have been run by a user on Ubuntu 11.10 Server? I need to find out what my friend ran to install a program.

share|improve this question
up vote 6 down vote accepted

If you use something like bash as a command interpreter, you could check the history.

more /home/user/.bash_history
share|improve this answer
How can i check the history with time-stamp? When each commands were used? – YumYumYum Jul 2 '13 at 8:13
Under what conditions are commands added to the log? I've read that the commands are only added to the log when you exit. I noticed my commands weren't being added so I thought maybe it was because I was being kicked rather than exiting. Then I tried existing and even the they weren't added. I ask because I'm only seeing a few commands from early on in my new Ubuntu installation. – mikato Jul 16 '14 at 17:38

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.