How to Clean History in linux

Step 1: Check the History

In order to check the executed shell commands in linux, use the history command

# history
  366  cd ..
  367  make
  368  cd posix-local/
  369  cd app/
  370  less Makefile
  371  ls -l
  372  cd bin/

Step 2: Clear the History

To clear all your history, use

# history -c

To delete a single line, use

# history -d linenumber
0 replies

Leave a Reply

Want to join the discussion?
Feel free to contribute!

Leave a Reply

Your email address will not be published. Required fields are marked *