博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
Linux学习笔记 1 环境变量 2 vi命令
阅读量:5952 次
发布时间:2019-06-19

本文共 2436 字,大约阅读时间需要 8 分钟。

1 环境变量篇

1.1  修改 查看 生效 系统环境变量

    1 涉及系统环境变量的文件   -->  .bash_profile

               --> /etc/profile

    2 该文件位置 /root/.bash_profile

    3 文件编辑器打开  vi .bash_profile

    4 文件末尾加入 

                    

JAVA_HOME = /usr/share/jdk 1.6.0PATH = $JAVA_HOME/bin:$PATHCLASS_PATH=.$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jarexport JAVA_HOMEexport PATHexport CLASSPATH5 文件生效       source /root/.bash_profile6 验证环境变量      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 numberdirection : k h j linput: 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 charactorvi 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 + confirmationshow line number :set nudw delete current words3dw delete 3 wordscopy and attachyw copy wordy5w copy all 5 wordsyy copy all the line 5yy copy 5 linesp 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 5location 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

 

转载于:https://www.cnblogs.com/cici-new/p/4239997.html

你可能感兴趣的文章
趣文:舌尖上的程序猿
查看>>
[LeetCode] 3Sum
查看>>
Mina工具类v1.5
查看>>
Golang在Linux环境下的POSIX风格socket编程
查看>>
白话经典算法系列之中的一个 冒泡排序的三种实现
查看>>
Android四大组件之——Activity(一)定义、状态和后退栈(图文详解)
查看>>
详细解读Android中的搜索框(二)—— Search Dialog
查看>>
经常使用的webservice接口
查看>>
SAP ABAP第一,两,三代出口型BADI实现 解释的概念
查看>>
mybatis完美的实战教程
查看>>
What is the difference between DAO and DAL?
查看>>
java抓取动态生成的网页
查看>>
从零开始山寨Caffe·叁:全局线程管理器
查看>>
Ubuntu 修复windows启动项
查看>>
LCA在线算法ST算法
查看>>
PowerShell 导出SharePoint管理中心解决方式
查看>>
java操作mongodb(连接池)(转)
查看>>
Android入门(十一)SQLite CURD
查看>>
一个双线程下同一时候操作指针变量导致野指针出现的问题总结
查看>>
Servlet过滤器和监听器
查看>>