Tips for using Linux

Source: Internet
Author: User
There are too many practical tips to explore. When I think of using a computer, I find a tip in computer lovers every day. If you find it, you will be lucky. I also saw that some people in my blog replied that they were not used to Ubuntu, but they still ran to win7. I thought that some people may need some tips for communication. The user wrote some for reference.

This article is suitable for beginners.

1. Terminal copy and paste

When using the gnome terminal, it is not convenient to copy and paste characters in windows. In fact, it is convenient to click and paste in the middle of the mouse. Double-click a sentence and select a row. Click paste.

Do not press Ctrl + C, leading to the exit of the command line program being executed.

2. scrolling

In character mode, use Shift + Pageup/Pagedown to view historical records on a scrolling screen.

3. History rollback of gnome Terminal

You can set the rollback value to around 4000 on the rolling tab of the configuration file of the gnome terminal.
Rows 4000 are enough to view the scrolling screen of several operations.

4. Windows Remote Desktop

Use Windows Remote Desktop in Linux, and use tsclient + rdesktop

5. How to Use the parameters of the previous command

The gnome terminal and character interface can both use Alt +.
Obtain the last parameter of the last command. Multiple times will become the last parameter of the previous command.

For example, back up logs to/var/log/XXX/YYY/ZZZ/myfile.

CP/var/log/myfile/var/log/XXX/YYY/ZZZ/myfile.1

The xxx/YYY/ZZZ directory does not exist. After creating these directories and executing the command, you can use Alt + to save on input.

6. How can I give up the commands that have been lost for half a day?

Shift + ALT + # You can annotate the command to retrieve it in the command history. If Ctrl + C is used, no record exists.

7. How to move a long string of command cursors in the command line

CTRL + a move to the beginning of the line, CTRL + e move to the end of the line. CTRL + left/right, move a word

8. Edit the command line

Modify the command

CTRL + k delete all parameters from the cursor to the end

9. Get the parameters of the previous command

Alt + n Alt + .,
N is the first parameter of the previous command. Starts from the command and starts counting at 0. Alt + 0, ALT +. Is the command itself, and so on.

10. History and Automatic completion

! + The command is the recently executed "command + parameter"

The up and down arrow keys can scroll History commands

History can view previous commands

The tab in the command line can be automatically completed. I believe everyone knows this.

What should I do if I cannot remember the command operation shortcut?

You can use info Readline and bind-P to view the information.

M indicates ALT, meaning Meta

C Indicates ctrl.

E Indicates ESC.

For example, \ c-c Indicates Ctrl + C.

\ M-. Indicates Alt +.

Some keyboards do not have meta, so you can use ESC instead of meta.

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.