Linux指令筆記 更新

2021-08-04 20:27:58 字數 1453 閱讀 5315

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 *** :檢視使用者 x 所在使用者組

id *** :檢視***使用者的組資訊

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! ——不儲存直接退出

Linux 常用指令(個人筆記,持續更新)

linux命令格式 命令名稱 命令引數 命令物件 ps 命令名稱 命令引數 命令物件 之間用空格鍵分隔 命令物件一般是指要處理的檔案 目錄 使用者等資源 命令引數可以用長格式 完整的選項名稱,用 作為字首 eg man help 也可以用短格式 單個字母的縮寫,用 作為字首 eg man h常用命令...

Linux指令,更新中

列舉檔案。ls txt 列舉所有txt字尾的資料夾。建立檔案。touch asd.txt fgh.txt touch love shiyanlou.txt 建立名為love 1.txt,love 2.txt.love 10.txt的檔案。按鍵作用 ctrl d 鍵盤輸入結束或退出終端 ctrl s ...

Linux指令,更新中

列舉檔案。ls txt 列舉所有txt字尾的資料夾。建立檔案。touch asd.txt fgh.txt touch love shiyanlou.txt 建立名為love 1.txt,love 2.txt.love 10.txt的檔案。按鍵作用 ctrl d 鍵盤輸入結束或退出終端 ctrl s ...