歡迎來到Linux教程網
Linux教程網
Linux教程網
Linux教程網
Linux教程網 >> Linux管理 >> Linux維護 >> Linux獲取命令幫助的方法匯總

Linux獲取命令幫助的方法匯總

日期:2017/3/2 10:32:44   编辑:Linux維護

作為Linux系統的初學者來說,學會使用獲取命令幫助是很重要的,當你忘記或遇到問題的時候,幫助文檔這時就起作用了,下面小編就給大家介紹下Linux如何獲取命令幫助。

一 、help Command

適用於內部命令

舉例:

代碼如下:

# type cd

cd is a shell builtin

# help cd

# type ls

ls is aliased to `ls --color=auto‘

# help ls

-bash: help: no help topics match `ls’。 Try `help help‘ or `man -k ls’ or `info ls‘。

二、Command –help/-h

適用於外部命令

例如:

代碼如下:

# ls --help

三、man Command

舉例:

代碼如下:

# man cd

注manual 手冊是分章節的;man # Command (#表示章節號)

1、所有用戶可以使用的命令

2、系統內核調用,不是每個命令都有系統調用(如:man 2 read)

3、庫調用

4、特殊文件,如:/dev/tty1

5、文件格式(命令配置文件的語法,如:man 5 passwd)

6、游戲相關

7、雜項

8、管理員命令,如:fdisk

man命令查詢操作參考《vi,vim用法》中的命令模式

系統之家教你看懂man命令語法

[]:可選內容

《》:必須給出內容

a|b|c:多選一

…:可以有多個

四、 info Command

有超鏈接穩文檔,info是信息頁,提供作者、版本,什麼時候發布等更詳細信息,man手冊是告訴你怎麼用

五、README

絕大多數程序都有相應的幫助文檔,保存在/usr/share/doc文件夾中

如:

# ls /usr/share/doc/ntp-4.2.4p8/

ChangeLog COPYRIGHT NEWS

六、Google

遇到問題,二話不說Google,優先參考項目官方文檔

上面就是Linux獲取命令幫助的方法介紹了,本文一共介紹了六種查看方法,最後一個方法不一定要使用Google,也可百度搜索,看個人習慣。

Copyright © Linux教程網 All Rights Reserved