CHAPTER 6More About Shell History

You've learned about using the shell history in Chapter 4, but there's a good deal more to learn. We start by discussing how to ensure that the shell saves the history when you exit and restores the history when you start a new shell. Later, we cover the method of referring to entries in the history using the ! character in more detail, and look at how you can share history between shell sessions running at the same time.

Setting Up Variables

In order to enable the shell history feature, you need to know how to arrange for the shell to save the lines you've typed and restore them for subsequent sessions. This is done by setting variables to indicate the size of the history in lines (every time you get a new ...

Get From Bash to Z Shell: Conquering the Command Line now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.