How to Delete Command History in Linux

In Linux, the shell is the computer program that controls the interaction between the user and the computer. The Linux operating system uses the bash shell as its default shell. The bash shell keeps a list of the recent commands executed at the command prompt by each user in the ".bash_history" file that is held in each user's home directory. The complete command history can be viewed using the "history" command. The "history" command includes a command to delete the list.

Instructions

    • 1

      Open a terminal window. The terminal window application is found under the "Accessories," "System" or "Utilities" sub-menu of the main menu.

    • 2

      Type the command "history" to view the complete command history.

    • 3

      Type the command "history -c" to clear the command history.

    • 4

      Type the command "history" a second time to ensure that the entire history has been deleted.

    • 5

      Type the command "exit" to close the terminal window.

Related Searches:

References

Comments

You May Also Like

Related Ads

Featured