Linux教程網
Linux教程網
Linux教程網
您现在的位置: Linux教程網 >> UnixLinux >  >> Unix知識 >> 關於Unix

最基本的 Unix 命令與查詢方法

以下是最常用、也最該先熟悉的一批 Unix 命令:

ls, ls -al, ls -d, pwd, cd, cd ~user, cd -,
cat /etc/passwd, less, bg, fg, kill, killall,
uname -a, type commandname, sync, netstat,
ping, traceroute, top, vi, ps aux, tar, zcat,
grep, ifconfig, ...

其中 cd - 會切回上一個工作目錄,type 用來確認某個名稱到底是內建指令、別名還是外部程式,bg/fg 搭配 kill 則是工作控制的基本三件套。

怎麼查不熟的指令

在提示符後輸入 man 或 info 加上指令名稱,可閱讀完整說明文件。多數 Linux 指令也支援簡短help:

$ commandname --help
$ commandname -h

另外,whatis commandname 會印出單行摘要,內容取自該指令說明文件開頭,適合快速確認「這個指令是幹嘛的」。

Copyright © Linux教程網 All Rights Reserved