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. opencv 图像矫正

    四个坐标系的转换:https://blog.csdn.net/humanking7/article/details/44756073 标定和矫正:https://blog.csdn.net/u0134 ...

  2. Django框架第一篇基础

    一个小问题: 什么是根目录:就是没有路径,只有域名..url(r'^$') 补充一张关于wsgiref模块的图片 一.MTV模型 Django的MTV分别代表: Model(模型):和数据库相关的,负 ...

  3. mybatis的批量删除操作

    需求描述:将符合某条件的几条记录删除 解决思路:对于多个id,可以使用sql关键词 in ,只要满足数据库的id在你的id集合或者list中,就删除,从而实现批量删除.循环delete方法是在是low ...

  4. jquery----Ajax补充

    jquery实现ajax请求 <script> //$.ajax的两种使用方式: //$.ajax(settings); //$.ajax(url,[settings]); $(" ...

  5. 微信录音文件上传到服务器以及amr转化成MP3格式,linux上转换简单方法

    微信公众号音频接口开发 根据业务需求,我们可能需要将微信录音保存到服务器,而通过微信上传语音接口上传到微信服务器的语音文件的有效期只有3天,所以需要将文件下载到我们自己的服务器. 上传语音接口 wx. ...

  6. 集腋成裘-01 sublime常用的快捷键

    sublime使用的快捷键 1:Html 结构代码  : Html:xt + tab键 2:补全标签代码   : tab键 3:快速复制一行代码 : Ctrl+shift+d 4:快速选中一行代码 : ...

  7. 目标检测算法之YOLOv1与v2

    YOLO:You Only Look Once(只需看一眼) 基于深度学习方法的一个特点就是实现端到端的检测,相对于其他目标检测与识别方法(如Fast R-CNN)将目标识别任务分成目标区域预测和类别 ...

  8. linux 系统备份和恢复

    Linux不像windows,它不限制根用户存取任何东西,因此,你完全可以把一个分区上每一个的文件放入一个TAR文件中. 使用root用户切换到根目录 然后,使用下面的命令备份完整的系统: tar c ...

  9. Give root password for maintenance(or type control -D to continue)

    2017-09-30 18:12:08 1:错误如图,本来开机准备用一下虚拟机,就出现一个这,为啥记录一下呢,因为网上好多不是很靠谱. 原因可能是之前关闭虚拟机的时候不小心出现异常了: 2:解决办法: ...

  10. 基于nopcommerce b2c开源项目的精简版开发框架Nop.Framework

    http://www.17ky.net/soft/70612.html?v=1#0-sqq-1-39009-9737f6f9e09dfaf5d3fd14d775bfee85 项目详细介绍 该开源项目是 ...