2

If my Linux installation has three registered user accounts, is possible to check the history of the commands introduced by each one, and how?

0

4 Answers 4

7

You can login as the user or simply su from root to the user and run the command

history 

you can also search history quite easily

history | grep "what ever"

Finally you can use

ctrl+r {whatever}
6

You can read ~/.bash_history file in users folder if you are admin or have special permissions.

2

Why do you want to see what was executed?

If you are just curious, or trying to help a novice recover from a blunder or trying to share complex command lines, the other answers mostly work (with the caveat that each shell uses its own history file), but if you are auditing or something related to security or legal, you must realize that all shell history mechanisms can be bypassed. For audit type logging, see How can you log every command typed.

1

Showing history of commands is very simple! Just type following command on terminal:

history

This will show you all commands you have used!

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .