如何在 WSL Debian 13 中安装 man

本文介绍如何在WSL Debian 13 操作系统中安装 man

分类:

Debain

man


简介

我们在 Windows WSL 系统中安装 Debian 后,运行 man 命令时会出现以下错误:

iters365@DevLab:~$ man
-bash: man: command not found

这是因为 WSL Debian 中默认未安装 man 程序,要想使用 man 程序,我们只需在系统中安装就可以了。

更新系统软件包信息

安装 man 程序前,首先使用以下命令更新系统中的软件包信息:

sudo apt update

安装 man

执行以下命令安装 man:

sudo apt install man

验证安装

执行 man --verion,来确认是否正确安装 man:

iters365@DevLab:~$ man --version
man 2.13.1

使用 man

执行命令 man ip,刚会弹出相关手册页面:

iters365@DevLab:~$ man ip


IP(8)                                                    Linux                                                    IP(8)

NAME
       ip - show / manipulate routing, network devices, interfaces and tunnels

SYNOPSIS
       ip [ OPTIONS ] OBJECT { COMMAND | help }

       ip [ -force ] -batch filename

       OBJECT := { address | addrlabel | fou | help | ila | ioam | l2tp | link | macsec | maddress | monitor | mptcp |
               mroute | mrule | neighbor | neighbour | netconf | netns | nexthop | ntable | ntbl | route | rule | sr |
               tap | tcpmetrics | token | tunnel | tuntap | vrf | xfrm }

       OPTIONS := { -V[ersion] | -h[uman-readable] | -s[tatistics] | -d[etails] | -r[esolve] | -iec | -f[amily] { inet
               | inet6 | link } | -4 | -6 | -B | -0 | -l[oops] { maximum-addr-flush-attempts } | -o[neline] | -rc[vbuf]
               [size] | -t[imestamp] | -ts[hort] | -n[etns] name | -N[umeric] | -a[ll] | -c[olor] | -br[ief] | -j[son]
               | -p[retty] }

OPTIONS
       -V, -Version
              Print the version of the ip utility and exit.

       -h, -human, -human-readable
              output statistics with human readable values followed by suffix.

       -b, -batch <FILENAME>
              Read commands from provided file or standard input and invoke them.  First failure will cause termination
              of ip.

       -force Don't  terminate  ip on errors in batch mode.  If there were any errors during execution of the commands,
 Manual page ip(8) line 1 (press h for help or q to quit)