Some Goofy Yet Useful Fun with the Command Terminal

A rather cool thing about typing in the command Terminal is that it has what you might call short-term memory. Try it by typing the word cherry and then pressing enter. Ignoring the command-not-found message, go on and type vanilla, and press enter. Now type gelato, and press enter. So far, so dumb, right? Well, not really. Let's type everything we've typed thus far again, but this time let's do it with only one key.

Huh?

Yes, just press the up arrow key once, and what do you see? That's right—the last command you typed appears, which in this case would be gelato. Press the up arrow key again, and the command that you typed before that will appear—vanilla. One more time? Yes, cherry. And one more ...

Get Ubuntu for Non-Geeks, 4th Edition 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.