Skip to Content
Running Linux, Third Edition
book

Running Linux, Third Edition

by Matthias Kalle Dalheimer, Lar Kaufman, Matt Welsh
August 1999
Beginner
760 pages
23h 55m
English
O'Reilly Media, Inc.
Content preview from Running Linux, Third Edition

Typing Shortcuts

If you’ve been following along this tutorial at the terminal, you may be tired of typing the same things over and over again. It can be particularly annoying when you make a mistake and have to start over again. Here is where the shell really makes life easier. It doesn’t make Unix as simple as a point-and-click interface, but it can help you work really fast in a command environment.

This section discusses command-line editing. The tips here work if your shell is bash, ksh, tcsh, or zsh. Command-line editing treats the last fifty or so lines you typed as a buffer in an editor. You can move around these lines and change them the way you’d edit a document. Every time you press the Return key, the shell executes the current line.

Word Completion

First, let’s try something simple that can save you a lot of time. Type the following, without pressing the Return key:

$ cd /usr/inc

Now press the Tab key. The shell will add lude to complete the name of the directory /usr/include. Now you can press the Return key, and the command will execute.

The criteria for specifying a filename is “minimal completion.” Type just enough characters to distinguish a name from all the others in that directory. The shell can find the name and complete it—up to and including a slash, if the name is a directory.

You can use completion on commands too. For instance, if you type:

$ ema

and press the Tab key, the shell will add the cs to make emacs (unless some other command in your path begins ...

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.
Start your free trial

You might also like

Running Linux, 5th Edition

Running Linux, 5th Edition

Matthias Kalle Dalheimer, Matt Welsh
Linux Under the Hood

Linux Under the Hood

Sander van Vugt

Publisher Resources

ISBN: 156592469XCatalog PageErrata