2.2. Time-saving Tips

2.2.1. Tab Completion

The tab completion feature in bash permits typing a partial command name or path, then pressing the TAB key to auto-complete the sequence. When multiple completions are possible, pressing the TAB key again lists them all.

Try this!

Try these shortcuts on Odin. Your experience navigating throughout the system and working with commands will be significantly less frustrating if you take the time to learn and practice these shortcuts.

2.2.2. Command Prompt Shortcuts

Key

Description

C

CTRL (control)

M

META (meta): usually ALT, OPT or ESC

Shortcut

Description

C-a

Move the cursor to the beginning of the line.

C-e

Move the cursor to the end of the line.

C-f

Move the cursor forward (right) one character.

M-f

Move the cursor forward (right) one word.

C-b

Move the cursor backward (left) one character.

M-b

Move the cursor backward (left) one word.

Try this!

Try these shortcuts on Odin. Your experience navigating throughout the system and working with commands will be significantly less frustrating if you take the time to learn and practice these shortcuts.

2.2.3. Command History Shortcuts

The bistory feature of bash maintains a history of the commands that you type when using it. One way to access the history is by using the history command or some of the various keyboard shortcuts listed in the table below [BASHSEARCH].

Shortcut

Description

C-p

Backward one line through the command history.

C-n

Forward one line through the command history.

C-r

Reverse incremental search through command history.

C-s

Forward incremental search through command history.

C-< (C-S-,)

When in incremental search, move to beggining of command history.

C-> (C-S-.)

When in incremental search, move to end of command history.

Try this!

Try these shortcuts on Odin. Your experience navigating throughout the system and working with commands will be significantly less frustrating if you take the time to learn and practice these shortcuts.