1. 程式人生 > >[Linux] 命令簡稱/縮寫

[Linux] 命令簡稱/縮寫

su:Swith user 切換使用者,切換到root使用者
cat: Concatenate 串聯
uname: Unix name 系統名稱
df: Disk free 空餘硬碟
du: Disk usage 硬碟使用率
chown: Change owner 改變所有者
chgrp: Change group 改變使用者組
ps:Process Status 程序狀態
tar:Tape archive 解壓檔案
chmod: Change mode 改變模式
umount: Unmount 解除安裝
ldd:List dynamic dependencies 列出動態相依
insmod:Install module 安裝模組
rmmod:Remove module 刪除模組
lsmod:List module 列表模組
alias :Create your own name for a command
bash :GNU Bourne-Again Shell linux核心
grep:global regular expression print
httpd :Start Apache
ipcalc :Calculate IP information for a host
ping :Send ICMP ECHO_Request to network hosts
reboot: Restart your computer
sudo:Superuser do

/bin = BINaries
/dev = DEVices
/etc = 存放配置檔案的地方。配置檔案的目錄
Editable Text Configuration 初期etcetra directory(ETCetera),後來"Editable Text Configuration" 或者 “Extended Tool Chest”。
/opt = Optional application software packages
pwd = print working Directory (列印工作目錄)。
/lib = LIBrary
/proc = PROCesses
/sbin = Superuser BINaries
/tmp = TeMPorary
/usr = Unix Shared Resources
/var = VARiable ? 是儲存各種變化的檔案,比如log等等
FIFO = First In, First Out
GRUB = GRand Unified Bootloader
IFS = Internal Field Seperators
LILO = LInux LOader
MySQL = My最初作者的名字SQL = Structured Query Language
PHP = Personal Home Page Tools = PHP Hypertext Preprocessor
PS = Prompt String
Perl = “Pratical Extraction and Report Language” = “Pathologically Eclectic Rubbish Lister”
Python Monty Python’s Flying Circus
Tcl = Tool Command Language
Tk = ToolKit
VT = Video Terminal
YaST = Yet Another Setup Tool
apache = “a patchy” server
apt = Advanced Packaging Tool
ar = archiver
as = assembler
bash = Bourne Again SHell
bc = Basic (Better) Calculator
bg = BackGround
cal = CALendar
cat = CATenate
cd = Change Directory
chgrp = CHange GRouP
chmod = CHange MODe
chown = CHange OWNer
chsh = CHange SHell
cmp = compare
cobra = Common Object Request Broker Architecture
comm = common
cp = CoPy
cpio = CoPy In and Out
cpp = C Pre Processor
cups = Common Unix Printing System
cvs = Current Version System
daemon = Disk And Execution MONitor
dc = Desk Calculator
dd = Disk Dump
df = Disk Free
diff = DIFFerence
dmesg = diagnostic message
du = Disk Usage
ed = editor
egrep = Extended GREP
elf = Extensible Linking Format
elm = ELectronic Mail
emacs = Editor MACroS
eval = EVALuate
ex = EXtended
exec = EXECute
fd = file descriptors
fg = ForeGround
fgrep = Fixed GREP
fmt = format
fsck = File System ChecK
fstab = FileSystem TABle
fvwm = F*** Virtual Window Manager
gawk = GNU AWK
gpg = GNU Privacy Guard
groff = GNU troff
hal = Hardware Abstraction Layer
joe = Joe’s Own Editor
ksh = Korn SHell
lame = Lame Ain’t an MP3 Encoder
lex = LEXical analyser
lisp = LISt Processing = Lots of Irritating Superfluous Parentheses
ln = LiNk
lpr = Line PRint
ls = list
lsof = LiSt Open Files
m4 = Macro processor Version 4
man = MANual pages
mawk = Mike Brennan’s AWK
mc = Midnight Commander
mkfs = MaKe FileSystem
mknod = MaKe NODe
motd = Message of The Day
mozilla = MOsaic GodZILLa
mtab = Mount TABle
mv = MoVe
nano = Nano’s ANOther editor
nawk = New AWK
nl = Number of Lines
nm = names
nohup = No HangUP
nroff = New ROFF
od = Octal Dump
passwd = PASSWorD
pg = pager
pico = PIne’s message COmposition editor
pine = “Program for Internet News & Email” = “Pine is not Elm”
ping = Packet InterNet Grouper
pirntcap = PRINTer CAPability
popd = POP Directory
pr = pre
printf = PRINT Formatted
ps = Processes Status
pty = pseudo tty
pushd = PUSH Directory
pwd = Print Working Directory
rc = runcom = run command, shell
rev = REVerse
rm = ReMove
rn = Read News
roff = RunOFF
rpm = RPM Package Manager = RedHat Package Manager
rsh, rlogin, = Remote
rxvt = ouR XVT
sed = Stream EDitor
seq = SEQuence
shar = SHell ARchive
slrn = S-Lang rn
ssh = Secure SHell
ssl = Secure Sockets Layer
stty = Set TTY
su = Substitute User
svn = SubVersioN
tar = Tape ARchive
tcsh = TENEX C shell
telnet = TEminaL over Network
termcap = terminal capability
terminfo = terminal information
tr = traslate
troff = Typesetter new ROFF
tsort = Topological SORT
tty = TeleTypewriter
twm = Tom’s Window Manager
tz = TimeZone
udev = Userspace DEV
ulimit = User’s LIMIT
umask = User’s MASK
uniq = UNIQue
vi = VIsual = Very Inconvenient
vim = Vi IMproved
wall = write all
wc = Word Count
wine = WINE Is Not an Emulator
xargs = eXtended ARGuments
xdm = X Display Manager
xlfd = X Logical Font Description
xmms = X Multimedia System
xrdb = X Resources DataBase
xwd = X Window Dump
yacc = yet another compiler compiler

/var 包含系統一般執行時要改變的資料。通常這些資料所在的目錄的大小是要經常變化或擴充的。原來 /var 目錄中有些內容是在 /usr 中的,但為了保持 /usr 目錄的相對穩定,就把那些需要經常改變的目錄放到 /var 中了。每個系統是特定的,即不通過網路與其他計算機共享。下面列出一些重要的目錄 ( 一些不太重要的目錄省略了 ) 。

  1. /var/catman : 包括了格式化過的幫助 (man) 頁。幫助頁的原始檔一般存在 /usr/man/catman 中;有些 man 頁可能有預格式化的版本,存在 /usr/man/cat 中。而其他的 man 頁在第一次看時都需要格式化,格式化完的版本存在 /var/man 中,這樣其他人再看相同的頁時就無須等待格式化了。 (/var/catman 經常被清除,就像清除臨時目錄一樣。 )
  2. /var/lib : 存放系統正常執行時要改變的檔案。
  3. /var/local : 存放 /usr/local 中安裝的程式的可變資料 ( 即系統管理員安裝的程式 ) 。注意,如果必要,
    即使本地安裝的程式也會使用其他 /var 目錄,例如 /var/lock 。
  4. /var/lock : 鎖定檔案。許多程式遵循在 /var/lock 中產生一個鎖定檔案的約定,以用來支援他們正在使用某個特定的裝置或檔案。其他程式注意到這個鎖定檔案時,就不會再使用這個裝置或檔案。
  5. /var/log : 各種程式的日誌 (log) 檔案,尤其是 login (/var/log/wtmplog 紀錄所有到系統的登入和登出 ) 和 syslog (/var/log/messages 紀錄儲存所有核心和系統程式資訊 ) 。 /var/log 裡的檔案經常不確定地增長,應該定期清除。
  6. /var/run : 儲存在下一次系統引導前有效的關於系統的資訊檔案。例如, /var/run/utmp 包含當前登入的使用者的資訊。
  7. /var/spool : 放置 “ 假離線 (spool)” 程式的目錄,如 mail 、 news 、列印佇列和其他佇列工作的目錄。每個不同的 spool 在 /var/spool 下有自己的子目錄,例如,使用者的郵箱就存放在 /var/spool/mail 中。
  8. /var/tmp : 比 /tmp 允許更大的或需要存在較長時間的臨時檔案。注意系統管理員可能不允許 /var/tmp 有很舊的檔案。

/etc 檔案系統
/etc 目錄包含各種系統配置檔案,下面說明其中的一些。其他的你應該知道它們屬於哪個程式,並閱讀該程式的 man 頁。許多網路配置檔案也在 /etc 中。

  1. /etc/rc 或 /etc/rc.d 或 /etc/rc?.d : 啟動、或改變執行級時執行的指令碼或指令碼的目錄。
  2. /etc/passwd : 使用者資料庫,其中的域給出了使用者名稱、真實姓名、使用者起始目錄、加密口令和使用者的其他資訊。
  3. /etc/fdprm : 軟盤引數表,用以說明不同的軟盤格式。可用 setfdprm 進行設定。更多的資訊見 setfdprm 的幫助頁。
  4. /etc/fstab : 指定啟動時需要自動安裝的檔案系統列表。也包括用 swapon -a 啟用的 swap 區的資訊。
  5. /etc/group : 類似 /etc/passwd ,但說明的不是使用者資訊而是組的資訊。包括組的各種資料。
  6. /etc/inittab : init 的配置檔案。
  7. /etc/issue : 包括使用者在登入提示符前的輸出資訊。通常包括系統的一段短說明或歡迎資訊。具體內容由系統管理員確定。
  8. /etc/magic : “file” 的配置檔案。包含不同檔案格式的說明, “file” 基於它猜測檔案型別。
  9. /etc/motd : motd 是 message of the day 的縮寫,使用者成功登入後自動輸出。內容由系統管理員確定。常用於通告資訊,如計劃關機時間的警告等。
  10. /etc/mtab : 當前安裝的檔案系統列表。由指令碼 (scritp) 初始化,並由 mount 命令自動更新。當需要一個當前安裝的檔案系統的列表時使用 ( 例如 df 命令 ) 。
  11. /etc/shadow : 在安裝了影子 (shadow) 口令軟體的系統上的影子口令檔案。影子口令檔案將 /etc/passwd 檔案中的加密口令移動到 /etc/shadow 中,而後者只對超級使用者 (root) 可讀。這使破譯口令更困難,以此增加系統的安全性。
  12. /etc/login.defs : login 命令的配置檔案。
  13. /etc/printcap : 類似 /etc/termcap ,但針對印表機。語法不同。
  14. /etc/profile 、 /etc/csh.login 、 /etc/csh.cshrc : 登入或啟動時 bourne 或 cshells 執行的檔案。這允許系統管理員為所有使用者建立全域性預設環境。
  15. /etc/securetty : 確認安全終端,即哪個終端允許超級使用者 (root) 登入。一般只列出虛擬控制檯,這樣就不可能 ( 至少很困難 ) 通過調變解調器 (modem) 或網路闖入系統並得到超級使用者特權。
  16. /etc/shells : 列出可以使用的 shell 。 chsh 命令允許使用者在本檔案指定範圍內改變登入的 shell 。提供一
    臺機器 ftp 服務的服務程序 ftpd 檢查使用者 shell 是否列在 /etc/shells 檔案中,如果不是,將不允許該使用者登入。
  17. /etc/termcap : 終端效能資料庫。說明不同的終端用什麼 “ 轉義序列 ” 控制。寫程式時不直接輸出轉義
    序列 ( 這樣只能工作於特定品牌的終端 ) ,而是從 /etc/termcap 中查詢要做的工作的正確序列。這樣,多數的程式可以在多數終端上執行。