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 ...
随机推荐
- 各数据库连接maven配置
Derbydb driver maven dependency<dependency> <groupId>org.apache.derby</groupId> &l ...
- python的IDE工具-- Pycharm
我们可以在python的交互环境下编写执行代码,但这只是适合短的代码,当有长的代码时在这里编写就不方便, Python有自带的IDE,根据自己使用的情况来看,感觉Pycharm这款IDE比自带的IDE ...
- ?:,reverse,vector的基本小结
#include <cstdio> //此代码为网上所复制 #include <iostream> #include <string> #include <s ...
- WebStorm中常用的快捷键及使用技巧
------------------------------------- 近期整理了如下个人觉得比较常用的快捷键,也请前辈给予补充.多多指教. --------------------------- ...
- beego获取用户请求参数的方法
我们经常需要获取用户传递的数据,包括 Get.POST 等方式的请求,beego 里面会自动解析这些数据,你可以通过如下方式获取数据: GetString(key string) string Get ...
- 用ffmpeg把视频编码格式转为h.264
command: ffmpeg -i infile.mp4 -an -vcodec libx264 -crf 23 outfile.h264
- Python深度学习案例2--新闻分类(多分类问题)
本节构建一个网络,将路透社新闻划分为46个互斥的主题,也就是46分类 案例2:新闻分类(多分类问题) 1. 加载数据集 from keras.datasets import reuters (trai ...
- 实现虚拟机VMware上Centos操作系统与主机windows之间互相复制与粘贴
1.启动你的虚拟机,然后点击虚拟机,如下所示(未安装的话,显示的是安装VMware Tools): 2.点击安装Vmware tools以后显示如下所示: 3.VMwareTools-9.9.2-24 ...
- 一脸懵逼学习Zookeeper(动物园管理员)---》高度可靠的分布式协调服务
1:Zookeeper是一个分布式协调服务:就是为用户的分布式应用程序提供协调服务 A.zookeeper是为别的分布式程序服务的 B.Zookeeper本身就是一个分布式程序(只要有半数以上节点存活 ...
- UE4 ShooterGame Demo的开火的代码
之前一直没搞懂按下鼠标左键开火之后,代码的逻辑是怎么走的,今天看懂了之前没看懂的部分,进了一步 ShooterCharacter.cpp void AShooterCharacter::OnStart ...