Linux shortcut key __linux

Source: Internet
Author: User
It programmer development must-all kinds of resources download list, the most complete IT resources in history, personal collection summary.


Recently found in the work, many colleagues, especially our PHP developers, basically do not use Linux/unix shortcuts, serious impact on work efficiency, so special writing this article, after each usage I will be detailed comments.
All of the following commands are valid under the Linux/unix shell, where bash is the main. If there are discrepancies, take your own server as the subject. This article refers to the Linux mainly refers to the Rhel/centos,unix refers to the FreeBSD, which is the most frequently used version of the server.

Ctrl + a switches to command line start

This operation is the same as the result of home implementation, but home is not available in some UNIX environments and can use this combination; Vim under Linux is also valid, and in many Windows file editors, this is also valid.

Ctrl + e Switch to the end of the command line

This operation is the same as the end implementation, but it can be used in some UNIX environments, and it works with Vim in Linux, and it works in many Windows file editors as well.

Ctrl + L clears the screen and the effect is equal to clear

Ctrl + U Clear the contents before the clipping cursor

This command is useful and effective in nslookup. I sometimes see a co-worker with a word in the delete shell command, very crash. In fact, it can be done with a CTRL + U.

Ctrl + K-cut to clear the contents after the cursor

Ctrl + y Paste the character you just deleted

This command is strong, the deletion of the character may be a few strings, but most likely a line of commands.

Ctrl + R Find in the history command (this is very handy, the input keyword will call up the previous command)

I strongly recommend this command, sometimes history relatively long, want to find a more complex, directly here, the shell will automatically find and call, very convenient

Ctrl + C Abort command

Ctrl + D Exit shell,logout

Ctrl + Z to run in the background

However, a process that runs from CTRL + Z to the background terminates after the current user exits, so it's better to use the Nohup command, because the nohup command is the function that the process continues to run after the user exits, and many scripts and commands are now required to remain in effect when Root exits.

The following is not too familiar, I used more ways to operate:

!! Repeat execution of the last command

History displays all the numbered + history commands you have executed. This can be matched! Edit to execute so-and-so command

↑ (ctrl+p) Show previous command

↓ (CTRL + N) Displays the next command

!$ displays a recent parameter of the system

Finally this is more useful, for example, I use Cat/etc/sysconfig/network-scripts/ifconfig-eth0 first, then I want to use vim to edit. The general practice is to use ↑ to display the last command, and then move to the top of the command with home, delete the cat, and then enter the VIM command. In fact, you can use Vim!$ instead.

Development and management of the words, master the above usage, basically work is very efficient; In the end, you will inadvertently find that fingertips, many complex instructions you will be easy to handle.

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.