--get your your Linux knowledge
> Linux Reviews > Beginners: Learn Linux >

Basic Keyboard Shortcuts

The most common use full Linux keyboard shortcuts

  1. tabulator - one of the most important keys
  2. shell shortcuts
  3. cut and paste
  4. I want to quit

1. tabulator - one of the most important keys

Tabulator is used to complete commands and filenames. The button is found on the left side of the keyboard and has two arrows (<- ->).

If your current working folder (check with pwd) contains the folder Documents (check with ls) and you want to change into it (with cd) you can type:

  cd Doc<tab>

This will complete the folder name and leave you with the command

  cd Documents 

If there are more than one folder beginning with Doc pressing tab will complete the first folder, sorted alphabetic. You can get all alternatives beginning with Doc by pressing tab a second time.

Tabulator work the same way with commands, but commands are not completed by the first tabulator press if there are more than one alternative. By typing gnome<tab><tab> you will get a list of all commands beginning with gnome.

Tab completion work with all file dialog boxes in KDE and Gnome and is a standard you will find that works with almost anything that asks you to give a filename or command. Tab is best pressed with the left little ("pinky") finger.

2. shell shortcuts

Shortcut Function
ctrl-d exit a terminal, same as typing `exit`
ctrl-l clears the screen, same as `clear`
ctrl-c breaks/cancels an ongoing operation
ctrl-z pauses (stops) an ongoing operation. Type `fg` (foreground) to resume it or `bg` (background) to continue the process in the background
shift-up Blar tilbake og se hva som har rullet over skjermen
shift-PageUp Blar tilbake og se hva som har rullet over skjermen, en side av gangen

3. cut and paste

You can highlight any text anywhere using the mouse and instantly paste it by pressing mouse button 3 (or both buttons on two button nice).

Applications also support selecting text and pressing `ctrl-c` to copy it or `ctrl-x` to cut it to the clipboard. Press `ctrl-v` or `shift-insert` to paste.

3.1. screen

When using the full screen window manager screen you can enter "scroll back mode" with `ctrl-a esc`. In this mode you can mode the cursor with the arrows and mark text by pressing `space bar` at the beginning and end of the text you want. The text you selected can now be pasted with `ctrl-a ]`.

4. I want to quit

Generally `q` (console) or in X `ctrl-q` (quit) or `ctrl-x`. Ctrl-w will close your the current window, but not the application if it has more windows.

vi: `:q`

ctrl-c may also do the job

`/quit` in irc clients

q eller esc to quit pagers (more, less)

If you are desperate to quit a console application: `ctrl-z` then `kill -9 %1 ; fg`

Meet new people