Hero Image

How to add all man pages to alpine

I found this nice link which shows how to add all the man pages for all installed commands in alpine.

Here is the code for convenience:

  apk list -I |
  sed -rn '/-doc/! s/([a-z-]+[a-z]).*/\1/p' |
  awk '{ print system("apk info \""$1"-doc\" > /dev/null") == 0 ? $1 "-doc" : "" }' |
  xargs apk add

Very happily adds all the man pages in alpine.