Bash basics: How to use (and scrub) your shell’s command history

Click here to visit Original posting

For many users who get started with the command line in Linux, there’s a good chance they’re using Bourne Again Shell, or Bash. Bash is the default shell on Mac OS X, and Windows users can use Bash through the Windows Subsystem for Linux.

While Bash generally works just fine with little to no configuration, there are some features that can really make the shell more useful. One of those commands is history.

Looking back in time

If you’ve ever looked at your web browser’s history, you already have a good idea of how history works. Bash’s history stores the history of commands that have been entered on the command line. This can be useful if you’ve ever wondered how you did something earlier.

To read this article in full or to leave a comment, please click here