Linux指令笔记(更新...)

来源:互联网 发布:腾讯视频评论源码 编辑:程序博客网 时间:2024/06/08 00:37

Linux指令笔记


查看Linux版本

linux:~ # cat /proc/version

Linux version 2.6.32.12-0.7-default (geeko@buildhost) (gcc version 4.3.4 [gcc-4_3-branch revision 152973] (SUSE Linux) ) #1 SMP 2010-05-20 11:14:20 +0200


linux:~ # uname -a

Linux linux 2.6.32.12-0.7-default #1 SMP 2010-05-20 11:14:20 +0200 x86_64 x86_64 x86_64 GNU/Linux


linux:~ # lsb_release -a
LSB Version:    core-2.0-noarch:core-3.2-noarch:core-4.0-noarch:core-2.0-x86_64:core-3.2-x86_64:core-4.0-x86_64:desktop-4.0-amd64:desktop-4.0-noarch:graphics-2.0-amd64:graphics-2.0-noarch:graphics-3.2-amd64:graphics-3.2-noarch:graphics-4.0-amd64:graphics-4.0-noarch
Distributor ID: SUSE LINUX
Description:    SUSE Linux Enterprise Server 11 (x86_64)
Release:        11

Codename:       n/a

查看用户

cat /etc/passwd :查看所有用户

cat /etc/group :查看用户组

groups xxx :查看用户 x 所在用户组

id xxx :查看xxx用户的组信息

whoami:查看当前用户


查看Oracle信息

linux:/etc # cat /etc/oraInst.loc
inventory_loc=/opt/oraInventory
inst_group=oinstall

查看inventory_loc目录下的 inventory.xml文件

linux:/etc # cat /opt/oraInventory/ContentsXML/inventory.xml


vi编辑器

Ctrl+u: 向上翻半屏
Ctrl+f: 向上翻一屏
Ctrl+d: 向下翻半屏
Ctrl+b: 向下翻一屏

:w ——保存当前文件
:wq —— 存盘退出(与指令 :x 功能相同)
:q —— 直接退出,如已修改会提示是否保存
:q! ——不保存直接退出






原创粉丝点击