Understanding Bash history
Speaking of history, let's dive right into that concept. Bash keeps track of all the commands you enter, so that if you need to recall a previously entered command, you can definitely do so. History also serves another purpose, and that is seeing what other users have been up to. However, since users can edit their own history to cover their tracks, it's not always useful for that purpose unless you have a spiteful user that is also sloppy.
You may have already seen Bash's history feature in some form, if you've ever pressed the up and down arrows on the shell to recall a previously-used command. If you didn't already know you can do that, you know now. Go ahead and give it a try, you should see that by pressing ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access