Linux学习笔记 1 环境变量 2 vi命令
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命令的更多相关文章
- linux —— 学习笔记(环境变量的设置)
目录 环境变量概要 与环境变量相关的文件 设置环境变量 注意以及相关 1.环境变量概要 环境变量,简单来说,是储存了环境信息的变量.它可以让你在不指明全部路径的情况下执行某脚本或某应用程序,比如在 l ...
- Linux学习,path,环境变量的配置
方法一: 1.查看当前环境变量配置的所与信息 echo $PATH 注意: echo是输出的意思 加$表示它是一个变量 2.配置环境命令 PATH="$PATH":comdir 注 ...
- Linux学习笔记——切换并取代用户身份命令——su
再次从头好好的学习Linux,本着以免轻易忘记,以备后用的原则,将我觉得常用或者好玩的linux命令记录在这,注意:我的实验环境是 Ubuntu 14.04.1 su 这个命令我经常使用,因为 ...
- Linux学习笔记之ubuntu如何在vi中写入中文注释
点击左边设置system settings,再点击Language Suppotr 点击Remind Me Later 选择ibus 然后关闭,在终端写入ibus-setup,弹出设置框,选择INPU ...
- Linux学习笔记(一):常用命令
经过统计Linux中能够识别的命令超过3000种,当然常用的命令就远远没有这么多了,按照我的习惯,我把已经学过的Linux常用命令做了以下几个方面的分割: 1.文件处理命令 2.文件搜索命令 3.帮助 ...
- linux学习笔记:1.基础知识和命令行基本操作
初次学习linux系统,想在这里记录自己的学习痕迹,如发现有不足之处,希望能指出,谢谢啦,之后的学习是在虚拟机VMware 10下的Red Hat Enterprise linux 6 的操作. 一. ...
- Linux学习笔记(一):常用命令(1)
经过统计Linux中能够识别的命令超过3000种,当然常用的命令就远远没有这么多了,按照我的习惯,我把已经学过的Linux常用命令做了以下几个方面的分割: 1.文件处理命令 2.文件搜索命令 3.帮助 ...
- Linux学习笔记 (六)用户管理命令
一.用户帐号 1.超级用户:具有操作系统中的最高权限,用来管理和维护操作系统.root用户. 2.普通用户:由root用户来创建,在宿主目录中具有完全权限. 3.程序用户:由应用程序添加,维护某个应用 ...
- Linux学习笔记(八)权限管理命令
权限管理命令 权限位含义 chmod chown chgrp umask默认权限 权限位含义 第1位代表文件类型 "-":普通文件 "b":块设备文件 &quo ...
随机推荐
- python之dict与set实现原理之hash算法
理解不透彻,下回分解 http://www.cnblogs.com/pengsixiong/p/5326893.html https://blog.csdn.net/zhao_crystal/arti ...
- css固定表头,表单内容可以滑动
<html><head> <meta charset="utf-8"> <title>Table</title&g ...
- Android Studio xml文件中的布局预览视图
操作系统:Windows 10 x64 IDE:Android Studio 3.3.1 更新了Android Studio之后,xml文件中的布局预览视图变得如此简洁! 原因是没有勾选Show La ...
- 不显示TensorFlow加速指令警告
vim ~/.bashrc 在打开的文件中追加: export TF_CPP_MIN_LOG_LEVEL= 最后再执行 source ~/.bashrc
- 初学python 遇到的坑
这最近人工智能比较火,看了一下大多都是python的代码,最近看看python 的代码,一出来就遇到了坑,空格的问题先不说了直接上代码吧 # coding = utf-8 import urllib. ...
- openCV 备忘
yum install python-devel numpy cmake gcc gcc-c++yum install gtk2-devel libdc1394-devel libv4l-devel ...
- 试验IFTTT同步发微博
没啥 测试下同步发微博
- [转]Maven与nexus关系
开始在使用Maven时,总是会听到nexus这个词,一会儿maven,一会儿nexus,当时很是困惑,nexus是什么呢,为什么它总是和maven一起被提到呢? 我们一步一步来了解吧. 一.了解Mav ...
- 【Android】android文件的写入与读取---简单的文本读写context.openFileInput() context.openFileOutput()
最终效果图,点击save会保存到文件中,点击show会从文件中读取出内容并显示. main.xml <?xml version="1.0" encoding="ut ...
- ArcObjects 中连接geodatabase
参考资料: 1. http://help.arcgis.com/en/sdk/10.0/arcobjects_net/conceptualhelp/index.html#/d/0001000003s8 ...