Write in front:
In the past, I really didn't play Linux, and I always felt that my classmates who played Linux all day were Daniel. Today, internships in the company need to telnet to the Linux server, all the code is to be completed on the Development Board, so forced to have to set the heart to learn the Linux system of various operations. I now use the remote login software is putty, so a simple summary of the commonly used putty instructions, convenient for later review.
1. Putty Introduction
With the popularity of Linux in server-side applications, Linux system management is increasingly dependent on remote. Among the various Telnet tools, putty is one of the great tools. Putty is a free, Telnet, rlogin, and SSH client under the Windows 32 platform, but features no less than the business Telnet class tool.
using it to remotely manage Linux is very useful, and its main advantages are as follows:
- Completely free of charge;
- It works very well under the Windows system;
- Full support for SSH1 and SSH2;
- Green software, no need to install, after downloading on the desktop to build a shortcut can be used;
- Small size, only 0.5MB (0.63 version),: please click here;
- The operation is simple and all operations are implemented in one control panel.
2. Putty Settings
For a full detailed tutorial on using putty to connect a Linux VPS, see: Putty Chinese station.
3. Introduction of Putty common Operation instruction
Before introducing the instructions for Putty, let's briefly introduce the shell (not the shell sort here).
What is a shell? the main interface between the operating system and the outside is called the shell. Perhaps this is not a very good understanding, for a simple example. The most common cmd command line, which is a shell under the Windows operating system. To put it bluntly, my understanding of the shell is that the shell refers to the interface that the developer provides to the customer, which makes it easier for the customer to use their virtual hosting service better. The shell is divided into two categories: the graphical interface shell and the command-line shell. This article mainly deals with the command-line shell in Putty.
3.1 Basic Instruction Chapter
1)-ls list all contents under current folder
$ls-o Lists all content in the current folder, with details, but does not list group
$ls-L ibid., including group information
$ls-A lists all the contents of the current folder, including "." The file that starts with
$ls-t Sort by change time
$ls-V Sort by version
Note: In fact so much, the most commonly used is the LS command.
2)-cd [dir] into the folder
3)-pwd Display the current path
4)-mkdir [dir] new folder
5)-rm [file] Delete files/folders
$RM-F [file] forcibly deleted, ignoring nonexistent files, silent
$RM-R [file] recursively deletes all content
$RM-rf [file] to delete a directory
6)-CP Copy
$CP [Options] [source] [destination]--where [options] are:-f (forced copy) or-R (recursive copy)
7)-MV Rename or move
$MV [Options] [source] [destination]--where [options] is:-F (forcibly moved/renamed),-I (try before moving/renaming),-U (update)
For example: $MV wwwroot/cgi-bin. Move the/cgi-bin directory to the current directory (note that the current directory is represented as ".") )
$MV cronfile.txt myfile.txt rename Cronfile.txt to MyFile.txt
8)-vim Open file (red marked for common instructions)
$vim [file] to open a file where file can be a single file or multiple files
Vim mode:
Normal mode (press ESC or ctrl+[) the lower-left corner displays the file name or is empty
Insert mode (press the I key to enter) the lower left corner shows--insert--
Visual mode (press R key to enter) the lower left corner shows--visual--
Vim Navigation:
% brackets Match
Vim Lookup Command:
/text find text, press N to find the next, press N to find the previous one.
? text find text, reverse lookup, press N to find the next, press N to find the previous one.
There are some special characters in vim that need to be escaped when searching. *[]^%/?~$
: Set ignorecase ignores case-finding
: Set noignorecase does not ignore case-finding
Find a very long word, type trouble, you can move the cursor to the word, press the * or the # key to be able to search the word, equivalent/search. and the # command corresponds to a search.
: Set Hlsearch Highlight search results, all results are highlighted instead of just one match.
: Set Nohlsearch Close Highlight search display
: Nohlsearch turns off the current highlight, and if you search again or press N or N, it will be highlighted again.
: Set Incsearch stepwise search mode to search for characters that are currently typed without waiting for typing to complete.
: Set Wrapscan re-search, when searching to the head or end of the file, return to continue the search, by default open.
Vim Undo Command:
U undo (undo)
U undo the operation of the whole row
Ctrl + R Redo (Redo), that is, undo revocation.
Vim Exit Command:
: Wq Save and exit
ZZ Save and exit
: q! Force exit and Ignore all changes
: e! Discard all changes and open the original file
More detailed vim instructions can be found in:
Vim Command Collection
Introduction to Linux file viewing/editing methods
9) Ctrl+a+n window Toggle Command
Cat command
Cat File1.txt Displays the contents of the File1.txt file;
Cat File1.txt File2.txt Displays the contents of the file1.txt and file2.txt files;
Cat-n File1.txt Displays the contents of the File1.txt file while displaying the line number;
3.2
Copy and paste
1) Copy from Windows, paste in putty
Copy in Step1:windows: Select text directly, press CTRL + C;
STEP2: Click the right mouse button in the finish pasting in putty.
2) Copy from Putty, paste in Windows
Step1:putty with the left mouse button selected that has been placed on the Clipboard;
STEP2: Press CTRL + V to paste in another editor or input field in Windows.
3) Copy from Putty, paste in putty
Step1:putty with the left mouse button selected that has been placed on the Clipboard;
STEP2: Right mouse button, in Paste in Putty .
Note: putty selection and Replication tips
left mouse button press and drag selection, that is, has been copied. Double click the left mouse button, choose to copy a word, support Chinese. Double-click and press the second time, drag the left mouse button, will be selected by the word. Mouse Three Click, will select and copy a row. Mouse Three Click and drag on the last hit, will be selected by row. Press and hold left ALT, drag the left mouse button, will select the box. But the Putty menu of Windows (Windows)->move Hotkey (Mobile hotkey) left ALT + left drag should be canceled. Select to copy by by-election, you can press the middle button and drag. The by-election method is the same as the previous selection method, the by-election is by letter, and the by-election is by word. The three-shot by-election is by line. The by-Election of the window selection is the window selection.
"Wget Download Tool"
(not to be continued ...) )
[Linux] Putty Instruction Summary (continuous update ...)