This is small collection of tips for the command line. The Linux default command line is bash. These tips mostly refers to bash. Actually are these commands, I’d like to use more often, but forget about it regularly. Especially the first one, searching the bash_history is extremely helpful.
Searchs in the history of your command line
doubles your default history size of 500
do not repeat commands, which are equal.
Kills text before your cursor in the command line
Kills text after your cursor in the command line
xmodemap -e "remove lock = Caps Lock"
disables the Caps Lock key. This command needs a display (running X server)
FIXME same for usage without an X-server
<Esc>+v in the editor vi
Its vi’s visual mode. Hit ‘v’ and select text, the way you are used to select text e.g. with notepad. Now you can copy it with ‘y’ and ‘p’, or indent the selected section by pressing ‘>’ or ‘<‘
Extremely usefull if using ssh in a console. Why using a single session. Create as may sessions in one tty as you like. Just hit
Ctrl+a;c on your keyboard. Invoke ‘screen’ first.
- Ctrl+a ; c
- Ctrl+a ; Space
Switchs between the last two sessions
- Ctrl+a; d
- screen -RRD
reattach with full force (if all other fails)
creates a new session
if you want wo pimp your screen with additional information in a nifty pannel, use byobu (default Ubuntu) – it’s a must have!