1.1 man 命令

1)man 命令使用

man [命令|配置文件|函数]
man ls

# man 配置文件
[root@oldboyedu ~]# ls /etc/hostname
/etc/hostname
[root@oldboyedu ~]# man hostname #查配置文件帮助

2)man 命令标题介绍:

man帮助信息中标题 功能说明
NAME 命令说明及介绍(常见)*
SYNOPSIS 命令的基本使用语法(常见)*
DESCRIPTION 命令使用详细描述,及相关参数选项说明(常见)*
EXAMPLES 命令的一些例子,这块有时很有用*(不常见)

::: hljs-center

image20220509091600142.png

:::

3)man 命令的快捷键

按键 功能
空格键 翻页
回车键 向下查看一行
/str 查找str字符串
n,N n 为搜索到的下一个字符串,N 为搜索到的上一个字符串
q 退出 man 帮助

1.2 help 命令

help 不经常使用。因为 help 只能获取 Shell 内置命令的帮助,但在 Linux 中绝大多数命令是外部命令,所以 help 命令的作用非常有限。而且内置命令也可以使用 man 命令获取帮助。

bash内置命令:

  • alias, bg, break, cd, continue, declare, echo, eval, exec, exit, export, , fg, help, history,
  • jobs, kill, let, local, logout, printf, pwd, read, set, source, , test, times, trap,
  • typeset, ulimit, umask, unalias, unset
help <command>
help history

::: hljs-center

image20220509092021587.png

:::

1.3 --help 参数

查询外部命令的帮助文档可以用下述形式查询外部命令的帮助文档

<command> --help
cat --help

::: hljs-center

image20220509093354830.png

:::

1.4 搜索引擎

  • www.baidu.com

  • www.google.com

  • www.bing.com

命令搜索:linux cat 问题搜索:英文关键字 ens33改成eth0