Linux学习笔记 1 环境变量 2 vi命令
2015-01-21 20:34
393 查看
1 环境变量篇
1.1 修改 查看 生效 系统环境变量
1 涉及系统环境变量的文件 --> .bash_profile
--> /etc/profile
2 该文件位置 /root/.bash_profile
3 文件编辑器打开 vi .bash_profile
4 文件末尾加入
1.1 修改 查看 生效 系统环境变量
1 涉及系统环境变量的文件 --> .bash_profile
--> /etc/profile
2 该文件位置 /root/.bash_profile
3 文件编辑器打开 vi .bash_profile
4 文件末尾加入
JAVA_HOME = /usr/share/jdk 1.6.0 PATH = $JAVA_HOME/bin:$PATH CLASS_PATH=.$JAVA_HOME/lib/dt.jar: $JAVA_HOME/lib/tools.jar export JAVA_HOME export PATH export CLASSPATH 5 文件生效 source /root/.bash_profile 6 验证环境变量 export JAVA_HOME echo $JAVA_HOME
VI 命令篇章 输入指令 a 退出指令 :q 强退:q! 保存且退出 :wq 存成新文件 :w newfile 查找指令 : ?____ <要查找的单词> / ____ 要查的词 n finding the dedicate word then moving to the next N oppersite direction :set nu <---show the line number :set nonu <---remove line number direction : k h j l input: i insert in front of the cursor a insert behind the cursor o insert in the next line of the cursor delete: x:delete the char of the cursor X :delete the char of the cursor dd:delete the current row 5dd:delete the currrent line and the next 5 line :1,5d delete1 to 5 line x delete one charactor vi substitute :s /cici/titi replace the line cici with titi :s/cici/titi/g replace all the cici with titi in the current line :n,$s/cici/titi the line n to the last line.each line cici replace with titi :n,$s /cici/titi/g the line n to the last line.each line cici replace with titi :.,$s/cici/titi replace all the words in the passages from the first line to the last line repalce confirmation command.adding character c behind the comma :s/cici/titi/gc all the cici replace with titi + confirmation show line number :set nu dw delete current words 3dw delete 3 words copy and attach yw copy word y5w copy all 5 words yy copy all the line 5yy copy 5 lines p copy after the current line :1,2co3 copy from line1 to line2 after line 3 :4,5m6 1 1 2 2 3 3 4 6 5 4 6 5 location command gg moving to the front of the file G moving to the end of file :20 moving to line 20 J merge 2 line shift + 8 : finding the word which is in the position of cursor
相关文章推荐
- 【Linux学习笔记】36:其它环境变量配置文件
- LINUX系统学习笔记管道符和作业控制 ,shell变量 , 环境变量配置文件
- Linux学习笔记_终端提示符编辑方法(set查看环境变量,.bashrc文件)
- Linux学习笔记——环境变量
- Java学习笔记--解析JDK与IDE(Linux下Java环境变量的配置)
- Linux-shell学习笔记--环境变量
- 【Linux学习笔记】27:环境变量中的语系变量
- 【Linux学习笔记】34:登录时生效的环境变量配置文件 上
- LINUX C 学习笔记-2-从环境变量开始-高级篇
- 实验楼linux学习笔记(五) 环境变量与文件查找
- linux学习笔记入门之环境变量和文件查找
- 实验楼Linux学习笔记(四)之环境变量与文件查找
- Linux学习笔记一:Linux配置java环境变量
- 【Linux学习笔记】33:环境变量配置文件简介
- linux学习笔记-读《Linux编程技术详解》-进程与进程环境
- Java基础学习笔记(一)环境变量配置,数据类型,运算符,控制语句,循环语句
- debian学习笔记2,vim中$VIMRUNTIME,runtimepath的环境变量设置.
- Java学习笔记--Lesson1(Java跨平台原理的剖析和Java环境变量的配置
- [Linux学习]linux下环境变量的设置
- Linux+Apache+PHP+MYSQL环境配置学习笔记