# help GNU bash, version 4.1.2(2)-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. ......
单独使用help可以获取所有的内部命令;
例2:
1 2 3 4 5 6 7 8 9 10 11 12 13 14
# help echo echo: echo [-neE] [arg ...] Write arguments to the standard output. Display the ARGs on the standard output followed by a newline. Options: -n do not append a newline -e enable interpretation of the following backslash escapes -E explicitly suppress interpretation of backslash escapes ...... # echo -n 'Hello world' Hello world[root@490de829cb74 /]#
whereis
使用: whereis + 命令
作用: 定位命令的位置;(和type类似)
man
使用: man + 命令
作用: 查看外部命令的说明;
安装:
1
# yum install man man-pages
type命令
使用: type + 命令;
作用: 可以获取到文件类型(命令的来源)
例1:
1 2
$ type ifconfig ifconfig 是 /sbin/ifconfig
例2:
1 2 3 4
[root@490de829cb74 /]# typeecho echo is a shell builtin [root@490de829cb74 /]# type bash bash is /bin/bash
# file /usr/bin/yum /usr/bin/yum: a /usr/bin/python script text executable
# vi /usr/bin/yum
#!/usr/bin/python import sys try: import yum except ImportError: print >> sys.stderr, """\ There was a problem importing one of the Python modules required to run yum. The error leading to this problem was: ......