Bash

GNU Bash (a.k.a. Bourne Again SHell) is the default shell in Gentoo. This article will explain its usage.

Keyboard shortcuts

 * CTRL + a Moves at the beginning of the line
 * CTRL + e Moves at the end of the line
 * CTRL + k Clear text after the cursor
 * CTRL + u Clear text before the cursor
 * CTRL + l Clear the screen
 * CTRL + f Moves forward the cursor of one character
 * CTRL + b Moves backward the cursor of one character
 * META + f Moves forward the cursor of one word
 * META + b Moves backward the cursor of one word


 * META + BACKSPACE Cuts the word before the cursor
 * META + d Cuts the word after the cursor

Environment
To get a list of all currently defined environment settings, type the following:

To get aliases and their definitions. (Usually defined within a user's $HOME/.bashrc)

To unalias a command or all aliases

All the above, and more, including Bash Scripting can be found within the fine Manfile!

TIPS
Customized prompt showing return value and smiley:

More meaningful xtrace output by adding script name and line number:

External References

 * Bash Homepage
 * Bash Reference Manual (HTML PSPDF)


 * Bash Guide for Beginners
 * BASH Programming - Introduction HOW-TO
 * Advanced Bash-Scripting Guide


 * Bash (Unix shell) Wikipedia


 * Bash Quick Reference PDF

Bash