← ../

linux common user configuration files

here are some useful keyboard shortcuts and shell tricks.

! - repeat specified command (get the command number you want to run with "history") (e.g : !33)

!! - repeat previous command

^^ - repeat previous command with substitution (e.g : echo "I am cool";^cool^tall)

& - run a program in background mode (eg : sudo ls -laR &) (you can bring it back in foreground by typing "fg")

[Tab][Tab] - prints a list of all available commands. This is just an example of autocomplete with no restriction on the first letter.

x[Tab][Tab] - prints a list of all available completions for a command, where the beginning is ``x''

[Alt][Ctrl][F1] - switch to the first virtual text console

[Alt][Ctrl][Fn] - switch to the nth virtual text console. Typically, there are six on a Linux PC system.

[Alt][Ctrl][F7] - switch to the first GUI console, if there is one running. If the graphical console freezes, one can switch to a nongraphical console, kill the process that is giving problems, and switch back to the graphical console using this shortcut.

[ArrowUp] - scroll through the command history (in bash)

[Shift][PageUp] - scroll terminal output up. This also works at the login prompt, so you can scroll through your boot messages.

[Shift][PageDown] - scroll terminal output down

[Ctrl][Alt][BkSpc] - kill the current X server. Used when normal exit is not possible.

[Ctrl][Alt][Del] - shut down the system and reboot

[Ctrl]c - kill the current process

[Ctrl]d - logout from the current terminal

[Ctrl]s - stop transfer to current terminal

[Ctrl]q - resume transfer to current terminal. This should be tried if the terminal stops responding.

[Ctrl]z - send current process to the background (you can bring it back in foreground by typing "fg")

reset - restore a terminal to its default settings

[Middlemousebutton] - Copies text from the text buffer and inserts it at the cursor location. With a two-button mouse, click on both buttons simultaneously.