常用Linux命令

导语

Linux中有许多常用的命令,这些命令往往是其操作对应的英文单词或短语简写,因此只要知道命令的英文全称,即可轻易记住这些命令。

高频命令

  1. pwd -- [print working directory] 显示当前工作目录。
  2. ls -- [list] 显示当前工作目录的内容。
  3. cd -- [change directory] 切换工作目录。$ cd ~切换到home directory,$ cd ..返回上级目录。
  4. mkdir -- [make directory] 创建目录。如果在目录名的前面没有加任何路径名,则在当前目录下创建由dirname指定的目录;如果给出了一个已经存在的路径,将会在该目录下创建一个指定的目录。
  5. rmdir -- [remove directory] 删除空目录。注意:子目录被删除之前应该是空目录。就是说,该目录中的所有文件必须用rm命令全部,另外,当前工作目录必须在被删除目录之上,不能是被删除目录本身,也不能是被删除目录的子目录。
  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]

进程相关命令

  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)

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容