我如何获得 man 命令?

How do I get the man command?

我刚刚第一次为 Linux 安装 Windows 子系统,并从 Windows 商店下载了 Debian 发行版。

我尝试做的第一件事是使用 "mv" 命令。第二件事是 运行 "man mv" 因为我不记得怎么用了。但是我收到了错误:

-bash: man: command not found

看起来我想要的包叫做联机帮助页。但我无法安装它:

sudo apt-get install manpages
[sudo] password for pi:
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package manpages is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or is only available from another source

E: Package 'manpages' has no installation candidate

如何获取 man 命令并 运行ning?

apt update 更新本地包列表,然后 apt install man-db 安装实际包。

我想在 elken 的回答中补充一点,显然,'man-db' 软件包并未涵盖所有联机帮助页。例如,我需要 C stdio 库(fopen、fgets、...)的文档,为此我必须安装 'manpages-dev':

sudo apt install manpages-dev

显然还有一些其他联机帮助页集合(/它们在某些 unix 发行版上的名称不同),请参阅 https://superuser.com/questions/40609/how-to-install-man-pages-for-c-standard-library-functions-in-ubuntu