如何查看系統內建的shell命令及協助資訊

來源:互聯網
上載者:User

標籤:

1.開啟終端,輸入help命令可以查看系統預設的shell(通常是bash)的內建的shell命令列表:

[[email protected] ~]$ helpGNU bash, version 4.1.2(1)-release (x86_64-redhat-linux-gnu)These shell commands are defined internally.  Type `help‘ to see this list.Type `help name‘ to find out more about the function `name‘.Use `info bash‘ to find out more about the shell in general.Use `man -k‘ or `info‘ to find out more about commands not in this list.A star (*) next to a name means that the command is disabled. job_spec [&]                            history [-c] [-d offset] [n] or hist> (( expression ))                        if COMMANDS; then COMMANDS; [ elif C> . filename [arguments]                  jobs [-lnprs] [jobspec ...] or jobs > :                                       kill [-s sigspec | -n signum | -sigs> [ arg... ]                              let arg [arg ...] [[ expression ]]                        local [option] name[=value] ... alias [-p] [name[=value] ... ]          logout [n] bg [job_spec ...]                       mapfile [-n count] [-O origin] [-s c> bind [-lpvsPVS] [-m keymap] [-f filen>  popd [-n] [+N | -N] break [n]                               printf [-v var] format [arguments] builtin [shell-builtin [arg ...]]       pushd [-n] [+N | -N | dir] caller [expr]                           pwd [-LP] case WORD in [PATTERN [| PATTERN]...)>  read [-ers] [-a array] [-d delim] [-> cd [-L|-P] [dir]                        readarray [-n count] [-O origin] [-s> command [-pVv] command [arg ...]        readonly [-af] [name[=value] ...] or>

2.我們如果對某一個shell命令感興趣,也可以用help  command 來查看具體的命令詳情:

[[email protected] ~]$ help fgfg: fg [job_spec]    Move job to the foreground.        Place the job identified by JOB_SPEC in the foreground, making it the    current job.  If JOB_SPEC is not present, the shell‘s notion of the    current job is used.        Exit Status:    Status of command placed in foreground, or failure if an error occurs.[[email protected] ~]$ 

3.我們想瞭解alias命令的用法,可以使用 help alias查看:

[[email protected] ~]$ help aliasalias: alias [-p] [name[=value] ... ]    Define or display aliases.        Without arguments, `alias‘ prints the list of aliases in the reusable    form `alias NAME=VALUE‘ on standard output.        Otherwise, an alias is defined for each NAME whose VALUE is given.    A trailing space in VALUE causes the next word to be checked for    alias substitution when the alias is expanded.        Options:      -p    Print all defined aliases in a reusable format        Exit Status:    alias returns true unless a NAME is supplied for which no alias has been    defined.[[email protected] ~]$ 

 

如何查看系統內建的shell命令及協助資訊

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.