導(dǎo)語
Linux中有許多常用的命令刁憋,這些命令往往是其操作對應(yīng)的英文單詞或短語簡寫欺抗,因此只要知道命令的英文全稱审胚,即可輕易記住這些命令视事。
高頻命令
- pwd -- [print working directory] 顯示當(dāng)前工作目錄胆萧。
- ls -- [list] 顯示當(dāng)前工作目錄的內(nèi)容。
-
cd -- [change directory] 切換工作目錄郑口。
$ cd ~
切換到home directory鸳碧,$ cd ..
返回上級目錄。 - mkdir -- [make directory] 創(chuàng)建目錄犬性。如果在目錄名的前面沒有加任何路徑名瞻离,則在當(dāng)前目錄下創(chuàng)建由dirname指定的目錄;如果給出了一個已經(jīng)存在的路徑乒裆,將會在該目錄下創(chuàng)建一個指定的目錄套利。
- rmdir -- [remove directory] 刪除空目錄。注意:子目錄被刪除之前應(yīng)該是空目錄鹤耍。就是說肉迫,該目錄中的所有文件必須用rm命令全部,另外稿黄,當(dāng)前工作目錄必須在被刪除目錄之上喊衫,不能是被刪除目錄本身,也不能是被刪除目錄的子目錄杆怕。
- rm -- [remove] 刪除一個目錄中的一個或多個文件或目錄族购,也可以將某個目錄及其下屬的所有文件及其子目錄均刪除掉壳贪。
- touch -- [touch]
- man -- [manual] --help
- cp -- [copy]
- mv -- [move]
- locate -- [locate]
中頻命令
- echo -- [echo]
- cat -- [concatenate]
- sudo -- [Super User Do]
- du -- [disk usage]
- tar -- [tape archive]
- zip/unzip -- [zip/unzip]
- uname -- [unix name]
- apt -- [Advanced Package Tool]
- apt-get -- []
- apt-cache -- [] apt-cache search xxx*/apt-cache policy xxx
- chmod -- [change mode] chmod 467 (owner group public)
- chown -- [change owner]
- grep -- [globally search for regular expression and print out]
進程相關(guān)命令
- top -- [top was never an abbreviation] This utility tells the user about all the running processes on the Linux machine. / produces an ordered list of running processes selected by user-specified criteria, and updates it periodically. Default ordering by CPU usage, and only the top CPU consumers shown (hence the name).
- ps -- [Process Status]
- kill -- [kill]
- df -- [disk free]
- free -- [free] Gives free RAM on your system
Tips
- clear -- clear the terminal if it gets filled up with too many commands
- history -- shows all the commands that you have used in the past for the current terminal session
- TAB -- fill up in terminal
- Ctrl+C -- stop any command in terminal safely
- Ctrl+Z -- force to stop it
- exit -- exit from the terminal
- sudo halt -- power off
- sudo reboot -- reboot
dkpg -i (Debian Package)