Answer the question
In order to leave comments, you need to log in
Is it possible to know what commands I sent to Ubuntu 20?
Hello. I'm setting up a VPS here, or rather I'm trying ... At least to understand how it's done ... In short, I accidentally closed the console. Is it possible to somehow raise the history of the commands that I did?
Well, if the console was still open. It would be possible through the "up arrow" to simply rewrite all the commands. What if everything is closed? In general, information about the entered commands is stored somewhere?
I tried history , but it only showed me the commands of the current session, and the previous ones did not.
Answer the question
In order to leave comments, you need to log in
If the session was terminated, then the history will not be saved.
The history of commands entered in bash is stored in ~/.bash_history
To prevent such excesses from happening, use tmux
It depends on which shell was accepting the commands. For example, when working through Deco Commander, upon exiting the shell program, the command history is cleared. But shells like bash or csh store the command history in a file, the details depend on the settings.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question