Linux command history: Choosing what to remember and how

Linux command history: Choosing what to remember and how

Linux history – the record of commands that you’ve used on the command line – can simplify repeating commands and provide some very useful information when you’re trying to track down how recent system or account changes might have come about. Two things you need to understand before you begin your sleuthing, however, are that the shell’s command memory can be selective and that dates and times for when commands were run are optional.

Basic Linux history

Let’s first look at how dates and times are recorded when commands are entered on the command line. By default, they are not. The history command simply provides a list of previously used commands. That’s all that is saved in the history file. For bash users, this information all gets stuffed into the .bash_history file; for other shells, it might be just .history.

To read this article in full, please click here

div#stuning-header .dfd-stuning-header-bg-container {background-image: url(https://safevoip.co.uk/wp-content/uploads/2017/04/slider.jpg);background-size: initial;background-position: top center;background-attachment: initial;background-repeat: no-repeat;}#stuning-header div.page-title-inner {min-height: 650px;}