Summary of Linux/Unix shortcut keys (Development and Management)

Source: Internet
Author: User
Tags clear screen

 

All of the following commands are valid in Linux/Unix shell. Bash is the main command here. In case of any discrepancy, your own server shall prevail. Linux mentioned in this article mainly refers to RHEL/centos, and Unix refers to FreeBSD, which is also the most used version on the server.

CTRL + a switch to the command line

This operation has the same result as home, but home cannot be used in some UNIX environments, so this combination can be used. Vim in Linux is also effective. In addition, this is also effective in many file editors in windows.

CTRL + e switch to the end of the command line

The result of this operation is the same as that of end, but the end key cannot be used in some UNIX environments. Vim in Linux is also valid. In addition, this is also effective in many file editors in windows.

CTRL + l clear screen content, equivalent to clear

CTRL + u clear the content before cutting the cursor

This command is useful in NSLookup. I sometimes see my colleague deleting shell commands with one word at a time, which is very bad! In fact, it can be done with a Ctrl + U.

CTRL + k cut the content after clearing the cursor

CTRL + y paste the deleted character

This command is powerful. The characters to be deleted may be strings, but it is very likely to be a line of command.

CTRL + R search in History commands(This is very easy to use. Input keywords to call up previous commands)

I strongly recommend this command. Sometimes there are too many History commands to find a complicated one. Here, shell will automatically find and call the command, which is very convenient.

CTRL + C terminate command

CTRL + D Exit shell, logout

CTRL + z transferred to the background for running

However, the process transferred from Ctrl + Z to the backend will be terminated after the current user exits. Therefore, it is better to use the nohup command &, the role of the nohup command is that the process continues to run after the user exits, and many scripts and commands require that the process remain valid when the root user exits.

I am not familiar with the following operations:

!!Repeat the last command

HistoryDisplays the numbers and History commands you have executed. This can be used together! Edit to execute XX command

Values (CTRL + p)Display the previous command

Values (CTRL + n)Display the next command

! $Displays the latest system parameter.

Finally this is useful, for example, I first use CAT/etc/sysconfig/network-scripts/ifconfig-eth0, and then I want to edit it with vim. In general, first use the terminal command to display the last command, then use home to move to the beginning of the command, delete cat, and then enter the vim command. In fact, we can use vim! $.

After the development and administrator master the above usage, the work will be very efficient. At the end of the use, you will inadvertently find that you can easily handle a lot of complicated commands between fingers.

 

Appendix: shortcuts for Linux desktop environments

The following commands are valid in the Linux/Unix desktop environment (gnome). For any discrepancies, refer to your own server:

Alt + F1Similar to the Windows win key, open the "application" menu (applications) in gnome)

Alt + F2Similar to Windows win + R keys, running applications in GNOME

CTRL + ALT + dSimilar to Windows + D keys, display Desktop

CTRL + ALT + LLock the desktop and start the Screen Saver

Alt + TabThe same as the Alt + TAB keys in windows, switching between different program windows

PrintscreenFull screen capture

Alt + printscreenCapture current window

CTRL + ALT + →/↓Switch between different workstations

CTRL + ALT + Shift + →/↓Move the current window to different workstation

CTRL + ALT + Shift + FNTerminal N or analog terminal n (n and n are numbers 1-6)

CTRL + ALT + Shift + F7Back to desktop

CTRL + ALT + Shift + F8Unknown (terminal or analog Terminal)

Window operation shortcut

Alt + F4Close Window

Alt + F5Cancel the maximization window (restore the original size of the window)

Alt + F7Move the window (Note: It is invalid when the window is maximized)

Alt + F8Change the window size (Note: It is invalid when the window is maximized)

Alt + F9Minimize window

Alt + F10Maximize window

Alt + SpaceOpen the control menu of the window (click the menu icon in the upper left corner of the window)

Common shortcut keys in applications

The following does not apply to all programs. Similar to the shortcut keys in Windows:

CTRL + nNew window

CTRL + xCut

CTRL + cCopy

CTRL + VPaste

CTRL + zUndo the previous operation

CTRL + Shift + zRedo the Undo step operation.

CTRL + SSave

File Browser

CTRL + HShow Hidden Files (switch key)

CTRL + TCreate tag

CTRL + page upPrevious tag

CTRL + Page downNext tag

Alt + nSwitch to the nth tag (N is a number)

 

 

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.