Delivered each Tuesday, TechRepublic's free Linux NetNote provides tips, articles, and other resources to help you hone your Linux skills. Automatically sign up today!
The bash shell offers a lot of power for interacting with the command line. By default, the shell uses an Emacs-like mode to edit lines, which you can change to a vi-like mode. The mode you choose largely depends on which editor you're most comfortable with.
For example, when using the default Emacs-like mode, you can use a number of [Ctrl] or [Esc] key combinations to navigate and manipulate text when you're working on a lengthy command. Here's a list of some of your options:
You can also use a command to search through your history. Press [Ctrl]R to perform a reverse search through your history for a given command. When you've located the command, press [Enter] to reexecute it, or edit the command to change it.
If you frequently work from the command line, using these shortcuts can save you a lot of time.
Vincent Danen works on the Red Hat Security Response Team and lives in Canada. He has been writing about and developing on Linux for over 10 years and is a veteran Mac user.