How to edit/clear Ubuntu Terminal commands history ?


Read {count} times since 2020

This simple trick will help you to clear or edit terminal commands you entered in Terminal of Ubuntu.
Open the file /home/user/.bash_history (Replace red text with your username.

To make it simple Go to your home folder and Press CTRL + H. It will show hidden files.
search for the file .bash_history
Edit the file.
You can see all the commands you entered in Terminal.

Remove what you don’t want and save.

Show Comments