学会使用命令帮助

首次进入root

开机进入桌面 CTRL+ALT+T打开终端
输入 sudo psswd root
[sudo] password for gutar: 输入你的用户密码
输入新的 UNIX 密码(新的密码,也是root密码):
重新输入新的 UNIX 密码:
重复输入passwd:
已成功更新密码
推出root 直接输入exit 后者ctrl+D

info
deepin 原始状态下没有安装info命令
要用 sudo apt-get update
等待光标再次出现的时候
在输入 sudo apt-get install info
就安装成功了

查看命令的说明

1.简要说明命令的作用(显示命令所处的man分类页面)
$whatis command
更加详细的说明
$info command
使用man
查询命令command的说明文档
$man command
用page up 和page down 来上下翻页
在man的帮助手册中,将帮助文档分为了9个类别
(1)、用户可以操作的命令或者是可执行文件
(2)、系统核心可调用的函数与工具等
(3)、一些常用的函数与数据库
(4)、设备文件的说明
(5)、设置文件或者某些文件的格式
(6)、游戏
(7)、惯例与协议等。例如Linux标准文件系统、网络协议、ASCⅡ,码等说明内容
(8)、系统管理员可用的管理条令
(9)、与内核有关的文件
前面说到使用whatis会显示命令所在的具体的文档类别,我们学习如何使用它
$whatis printf
printf (1) - format and print data
printf (1p) - write formatted output
printf (3) - formatted output conversion
printf (3p) - print formatted output
printf [builtins] (1) - bash built-in commands, see bash(1)
printf在分类一和分类三中都有
如果我们想看printf的用法 可以指定查看分类三的帮助
$man 3 printf
$man -k keyword(关键字)

查询路径

which command
查看程序的binary文件所在路径
whereis command
查看程序的搜索路径

小结 : whatis/ info /man /which/ whereis/

posted @ 2020-03-04 22:24  arbor_one  阅读(192)  评论(0)    收藏  举报