Linux系统中如何获取帮助?

1、 --help

内部命令(内建命令):是shell自带的

查看系统中有哪些内部命令:# help

# help | wc -l //统计一共有多少个内部命令

# help cd

外部命令:一般是用户安装软件之后才出现的 如:tree yum

外部命令的帮助:

# ls --help

2、info 能够查看命令的来源、选项、功能等

# info ls

# info mkdir

3、whatis 查看命令的用途

# whatis ls

ls (1) - list directory contents

ls (1p) - list directory contents

# whatis ls

ls: nothing appropriate //没有whatis数据库

解决:生成whatis数据库

# makewhatis

数据库文件:/var/cache/man/whatis

4、man 手册

1)man 命令

# man ls

NAME

SYNOPSIS

DESCRIPTION

选项 -a -d -l

man手册里支持搜索功能的

/关键字 —— 所谓关键字,就是你想要查找的东西

例如:/time

/-d

在搜索模式下:按n,继续向下查找

按N:向上查找

退出man帮助:q

2)man的级别

# man man man手册分为八个部分,常用的是1和5,需要了解1,5,8

1 User Commands 用户命令

2 System Calls 系统调用

3 C Library Functions C语言的库函数

4 Devices and Special Files 设备和特殊文件

5 File Formats and Conventions 文件格式和约定

# man 5 passwd //查看的是/etc/passwd文件的帮助

6 Games et. Al. 游戏和娱乐

7 Miscellanea

8 System Administration tools and Deamons

系统管理工具和守护进程帮助

# man ls

# man 5 文件名

# man 8 httpd //httpd是apache的web服务的守护进程名


分享到:


相關文章: