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