When using the command line as root in Debian I get last commands executed as root. Where are those saved, what is the default file path and how can I find it?
thanks
When using the command line as root in Debian I get last commands executed as root. Where are those saved, what is the default file path and how can I find it?
thanks
If you're using bash (default shell in Debian) you can see all your recent history in the file ~/.bash_history
(so .bash_history file in your local user)
Also from the command line you can type history
and it'll also show you all your recent command history
What others have said about .bash_history is right and proper, but it won't pick up commands executed as root with sudo. Those will be in the individual users' ~/.bash_history
files (or other files, if they use other shells than bash).
Executing command with space in front, wont store command in history also.