1 环境变量篇

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学习笔记 1 环境变量 2 vi命令的更多相关文章

  1. linux —— 学习笔记(环境变量的设置)

    目录 环境变量概要 与环境变量相关的文件 设置环境变量 注意以及相关 1.环境变量概要 环境变量,简单来说,是储存了环境信息的变量.它可以让你在不指明全部路径的情况下执行某脚本或某应用程序,比如在 l ...

  2. Linux学习,path,环境变量的配置

    方法一: 1.查看当前环境变量配置的所与信息 echo $PATH 注意: echo是输出的意思 加$表示它是一个变量 2.配置环境命令 PATH="$PATH":comdir 注 ...

  3. Linux学习笔记——切换并取代用户身份命令——su

        再次从头好好的学习Linux,本着以免轻易忘记,以备后用的原则,将我觉得常用或者好玩的linux命令记录在这,注意:我的实验环境是 Ubuntu 14.04.1 su 这个命令我经常使用,因为 ...

  4. Linux学习笔记之ubuntu如何在vi中写入中文注释

    点击左边设置system settings,再点击Language Suppotr 点击Remind Me Later 选择ibus 然后关闭,在终端写入ibus-setup,弹出设置框,选择INPU ...

  5. Linux学习笔记(一):常用命令

    经过统计Linux中能够识别的命令超过3000种,当然常用的命令就远远没有这么多了,按照我的习惯,我把已经学过的Linux常用命令做了以下几个方面的分割: 1.文件处理命令 2.文件搜索命令 3.帮助 ...

  6. linux学习笔记:1.基础知识和命令行基本操作

    初次学习linux系统,想在这里记录自己的学习痕迹,如发现有不足之处,希望能指出,谢谢啦,之后的学习是在虚拟机VMware 10下的Red Hat Enterprise linux 6 的操作. 一. ...

  7. Linux学习笔记(一):常用命令(1)

    经过统计Linux中能够识别的命令超过3000种,当然常用的命令就远远没有这么多了,按照我的习惯,我把已经学过的Linux常用命令做了以下几个方面的分割: 1.文件处理命令 2.文件搜索命令 3.帮助 ...

  8. Linux学习笔记 (六)用户管理命令

    一.用户帐号 1.超级用户:具有操作系统中的最高权限,用来管理和维护操作系统.root用户. 2.普通用户:由root用户来创建,在宿主目录中具有完全权限. 3.程序用户:由应用程序添加,维护某个应用 ...

  9. Linux学习笔记(八)权限管理命令

    权限管理命令 权限位含义 chmod chown chgrp umask默认权限 权限位含义 第1位代表文件类型 "-":普通文件 "b":块设备文件 &quo ...

随机推荐

  1. JAVA项目中常用的异常处理情况总结

    JAVA项目中常用的异常知识点总结 1. java.lang.nullpointerexception这个异常大家肯定都经常遇到,异常的解释是"程序遇上了空指针",简单地说就是调用 ...

  2. 拓扑排序基础 hdu1258,hdu2647

    由这两题可知拓扑排序是通过“小于”关系加边建图的 hdu2647 /* 拓扑排序的原则是把“小于”看成有向边 此题反向建图即可 并且开num数组来记录每个点的应该得到的权值 */ #include&l ...

  3. Java 写一段字符到指定的文本文档中,如果该文本文档不存在,则创建该文本文档

    写一段字符到指定的文本文档中,如果该文本文档不存在,则创建该文本文档 import java.io.File; import java.io.FileNotFoundException; import ...

  4. spring coud Feign常用配置

    Ribbon配置 在Feign中配置Ribbon非常简单,直接在application.properties中配置即可,如: # 设置连接超时时间 ribbon.ConnectTimeout=500 ...

  5. angular-cli ng build 打包完成后 打开文件显示空白

    将index.html 里面的<base href="/"> 改为<base href="./"> 前面加一个 点 就好了,然后再次打包 ...

  6. 饮冰三年-人工智能-Python-12之利其器pycharm

    1:下载.安装.与激活这里不再介绍了.需要注意的是激活时需要修改C:\Windows\System32\drivers\etc\hosts文件 2:工具使用 2.1 HelloWorld  File& ...

  7. 一脸懵逼学习hadoop之HDFS的java客户端编写

    1:eclipse创建一个项目,然后导入对应的jar包: 鼠标右击项目,点击properties或者alt+enter快捷键--->java build path--->libraries ...

  8. 一脸懵逼加从入门到绝望学习hadoop之 org.apache.hadoop.ipc.RemoteException(org.apache.hadoop.security.AccessControlException): Permission denied: user=Administrator, access=WRITE, inode="/":root:supergroup:drwxr-xr报错

    1:初学hadoop遇到各种错误,这里贴一下,方便以后脑补吧,报错如下: 主要是在window环境下面搞hadoop,而hadoop部署在linux操作系统上面:出现这个错误是权限的问题,操作hado ...

  9. 原 HTML5 requestFullScreen&exitFullscreen全屏兼容方案

                         摘要: html5 video全屏实现方式 首先来说,这个标题具有误导性,但这样设置改标题也是主要因为video使用的比较多 在html5中,全屏方法可以适用 ...

  10. 【AtCoder】ARC072

    ARC072 C - Sequence 直接认为一个数是正的,或者第一个数是负的,每次将不合法的负数前缀和改成+1正数前缀和改成-1 #include <bits/stdc++.h> #d ...