To clear history Bash in Linux
If you want to clear the history of commands executed on our server, we can do this in a very fast way.
The following command will remove the story so that bash.
1 | cat /dev/null > ~/.bash_history && history -c && exit |
What do these commands?
Komenda 'cat’ empties file .bash_history currently logged in user.
Command “history -c” clean the history for the current user session.
Command “exit” the current session ends.
Related entries:
████████████████████████████████ 3.10 ████████████████████████████████ 11
The following tutorial describes how to install Snapd package manager on AlamaLinux 8
how to pack and unpack files on the server - ZIP TAR TAR.GZ
Failed to set locale, defaulting to C.UTF-8 Solution Centos 8
Changing the Hostname in Ubuntu 20.04 and Debian 11





