Linux Learning Note 1

Source: Internet
Author: User

1environment variable Chapter1.1Modify view effective system environment variables1>files that involve system environment variables. Bash_profile2> The file location/root/. Bash_profile3>file Editor opens VI. bash_profile another file/etc/ Profile4>add Java_home to end of file=/usr/share/jdk1.6.0PATH= $JAVA _home/bin: $PATH class_path=. $JAVA _home/lib/dt.jar: $JAVA _home/lib/Tools.jar export java_home export PATH export CLASSPATH5>make file effective source/root/. Bash_profile Validating environment Variables export java_home export $JAVA _home

VI Command Chapter

Input directive A

Exit instruction: Q Strong back: q!

Save and exit: Wq Save As new file: W newfile

Find instructions:? _ to find the word __

/__ the word to find __

N is found but then down an n opposite direction

: Set NU Displays line number

: Set Nonu Remove line number

Direction

K

[h] [j] [L]

Input I cursor before inserting a cursor position after inserting O cursor next line insert

Delete x Delete cursor character x delete cursor before character

Delete

DD Delete Current line 5DD Delete the current row and the following 5 lines: 1,5d Delete 1 to 5 rows x Delete one character

DW Delete Current Word

3DW Delete 3 words

Copy paste

YW copy Word

y5w copy of 5 words

YY Copy Line

5yy Copy 5 rows

P Paste below current line

: 1,2co3 after first to second row to third row

: 4,5M6

[1] [1]

[2] [2]

[3] [3]

[4] [6]

[5] [4]

[6] [5]

Positioning

GG Move to file header

G move to end of file

: 20 Move to Line 20th

J Merge two lines

Shift+8 search for the word at the cursor location

Linux Learning Note 1

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.