常用Linux命令

導(dǎo)語

Linux中有許多常用的命令,這些命令往往是其操作對應(yīng)的英文單詞或短語簡寫,因此只要知道命令的英文全稱,即可輕易記住這些命令。

高頻命令

  1. pwd -- [print working directory] 顯示當(dāng)前工作目錄。
  2. ls -- [list] 顯示當(dāng)前工作目錄的內(nèi)容。
  3. cd -- [change directory] 切換工作目錄。$ cd ~切換到home directory,$ cd ..返回上級目錄。
  4. mkdir -- [make directory] 創(chuàng)建目錄。如果在目錄名的前面沒有加任何路徑名,則在當(dāng)前目錄下創(chuàng)建由dirname指定的目錄;如果給出了一個已經(jīng)存在的路徑,將會在該目錄下創(chuàng)建一個指定的目錄。
  5. rmdir -- [remove directory] 刪除空目錄。注意:子目錄被刪除之前應(yīng)該是空目錄。就是說,該目錄中的所有文件必須用rm命令全部,另外,當(dāng)前工作目錄必須在被刪除目錄之上,不能是被刪除目錄本身,也不能是被刪除目錄的子目錄。
  6. rm -- [remove] 刪除一個目錄中的一個或多個文件或目錄,也可以將某個目錄及其下屬的所有文件及其子目錄均刪除掉。
  7. touch -- [touch]
  8. man -- [manual] --help
  9. cp -- [copy]
  10. mv -- [move]
  11. locate -- [locate]

中頻命令

  1. echo -- [echo]
  2. cat -- [concatenate]
  3. sudo -- [Super User Do]
  4. du -- [disk usage]
  5. tar -- [tape archive]
  6. zip/unzip -- [zip/unzip]
  7. uname -- [unix name]
  8. apt -- [Advanced Package Tool]
  9. apt-get -- []
  10. apt-cache -- [] apt-cache search xxx*/apt-cache policy xxx
  11. chmod -- [change mode] chmod 467 (owner group public)
  12. chown -- [change owner]
  13. grep -- [globally search for regular expression and print out]

進(jìn)程相關(guān)命令

  1. 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).
  2. ps -- [Process Status]
  3. kill -- [kill]
  4. df -- [disk free]
  5. free -- [free] Gives free RAM on your system

Tips

  1. clear -- clear the terminal if it gets filled up with too many commands
  2. history -- shows all the commands that you have used in the past for the current terminal session
  3. TAB -- fill up in terminal
  4. Ctrl+C -- stop any command in terminal safely
  5. Ctrl+Z -- force to stop it
  6. exit -- exit from the terminal
  7. sudo halt -- power off
  8. sudo reboot -- reboot

dkpg -i (Debian Package)

最后編輯于
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時請結(jié)合常識與多方信息審慎甄別。
平臺聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點,簡書系信息發(fā)布平臺,僅提供信息存儲服務(wù)。

相關(guān)閱讀更多精彩內(nèi)容

友情鏈接更多精彩內(nèi)容