Saturday, May 7, 2011

Linux Shortcut

Graphical - Gnome


Ctrl + Alt + Right/Left arrow = Use these to change between workspace.

Windows + E = Show all workspace in thumbnail view. Double click on any to get into it.

Ctrl + Alt + d = Show desktop. Minimizes all windows, and gives focus to the desktop..

Alt + F2 = Run command.


Alt + F4 = Close active application.

Alt + F5 = Restore a programs window size.

Alt + tab = Switch between active applications.

Ctrl + q = Quit from active application.

Alt + F1 = Opens the Applicantions Menu .

Print Screen = Takes a screenshot.

Alt + Print Screen = Takes a screenshot of the window that has focus.

F1 = Starts the online help browser, and displays appropriate online Help.

Alt + tab = Switches between windows. When you use these shortcut keys, a list of windows that you can select is displayed. Release the keys to select a window.

F10 = Opens the first menu on the left side of the menubar.

Alt + spacebar = Opens the Window Menu .


Command line - Input


These shortcuts are really helpful and saves a lot of typing! Some of these even work at the LILO prompt and in some X applications.

Ctrl + u = Erase the current line. If you are working in a terminal, use this shortcut to clear the current line from the cursor all the way to the beginning of the line.

backspace or Ctrl + h = Erase one character.

Ctrl + p = Paste previous line.

Alt + ? = Show current completion list.

Alt + * = Insert all possible completions.

Alt + / = Attempt to complete filename.

Ctrl + k = Delete the line from the position of the cursor to the end of the line.

Ctrl + w = Delete the word before the cursor.

Ctrl + a = Moves cursor to the beginning of a line. This works in most text editors.

Ctrl + e = moves cursor to end of a line. This works in most text editors

Ctrl + f = Moves the cursor forward one character.

Ctrl + b = Moves the cursor backward one character.

Ctrl + t = Swap the last two characters before the cursor.

Esc + t = Swap the last two words before the cursor.

!mou = It will run the last command on your history that begins with mou (maybe mount /mnt/cdrom).

Ctrl + d = logout of (and close) shell prompt. Use this quick shortcut instead of typing exit or logout. See also the next command.

Ctrl + d = Send [End-of-File] to the current process. Don't press it twice else you also log out (see the previous command).

Ctrl + y = to paste it (as in delete and copy) all text in front of the cursor.


Command line - Output


Shift + PageUp = Scroll terminal output up.

Shift + PageDown = Scroll terminal output down.

Ctrl + l or 'clear' = The clear command clears all previously executed commands and their output from the current terminal.

Ctrl + s = Stop the transfer to the terminal. Stops all output on screen (XOFF).

Ctrl + q = Resume the transfer to the terminal. Try if your terminal mysteriously stops responding. Turns all output stopped on screen back on (XON).

reset = If you mess up your terminal, use the reset command. For example, if you try to cat a binary file, the terminal starts showing weird characters. Note that you may not be able to see the command when you're typing it.

Middle Mouse Button = pastes highlighted text. Use the left mouse button to highlight the text. Point the cursor to the spot where you want it pasted. Click the middle mouse button to paste it. This is the traditional way of copying and pasting in the X Window System, but it may not work in some X applications.
If you have a two-button mouse, pressing both of the buttons at the same time has the same effect as pressing the middle one. If it doesn't, you must enable 3-mouse-button emulation.

Ctrl + Alt + Backspace = Kill the X server. Use this if X crashes and you can't exit it normally. If you've configured your X Window System to start automatically at bootup, this restarts the server and throws you back to the graphical login screen. Use this if the normal exit procedure does not work.

Tab = command autocomplete. Use this command when using a shell prompt. Type the first few characters of a command or filename and then press the [Tab] key. It will automatically complete the command or show all commands that match the characters you typed.

UpArrow or Ctrl + p = Scroll up in the history and edit the previously executed commands. To execute them, press Enter like you normally do. When you see the command you want to use, press [Enter].

DownArrow or Ctrl + n = Scroll down in the history and edit the next commands. When you see the command you want to use, press [Enter].

Ctrl + r = Find the last command that contained the letters you're typing. For example, if you want to find out the last action you did to a file called "file42.txt", you'll press Ctrl + r and start typing the file name. Or, if you want to find out the last parameters you gave to the "cp" command, you'll press Ctrl + r and type in "cp".

Ctrl + c = Kill the current process.

Ctrl + z = Send the current process to background. This is useful if you have a program running, and you need the terminal for awhile but don't want to exit the program completely. Then just send it to background with Ctrl+z, do whatever you want, and type the command fg to get the process back.

Ctrl + d = Log out from the current terminal. If you use this in a terminal emulator under X, this usually shuts down the terminal emulator after logging you out.

Ctrl + Alt + Del = Reboot the system. Use only when the normal shutdown procedure does not work. You can change this behavior by editing /etc/inittab if you want the system to shut down instead of rebooting.

Ctrl + Alt + Fn = switches screens. [Ctrl]+[Alt] + one of the function keys displays an available screen. By default, [F1] through [F6] are shell prompt screens and [F7] is the graphical desktop screen.

Alt + Tab = switches tasks in a graphical desktop environment. If you have more than one application open at a time, you can use [Alt] + [Tab] to switch among open tasks and applications.

Ctrl + d or 'exit' = Logout. Type this at a shell prompt to logout of the current user or root account.

Press Scroll Lock = locks terminal input/output - allows to read console contents when output is going too fast. To unlock, press Scroll Lock once again.


Reference
Linux Shortcuts and Commands
Part 5: Linux Shortcuts and Commands
Linux Shortcuts and Commands
Assign Custom Shortcut Keys on Ubuntu Linux
Gnome / KDE Keyboard Shortcuts

No comments:

Post a Comment