You are not logged in.

#1 2026-07-07 11:26:05

aminepro
Member
Registered: 2025-01-31
Posts: 43

does manual pages work differently on arch?

I had a problem not finding man pages for some system calls used in C, so I went to the archwiki https://wiki.archlinux.org/title/Man_page, there I found two relevant packages: man-pages and mandoc (instead of man-db), the first one solved the problem the second made the page with colors and beautiful to read.

is it possible that this isn't the case on other distributions, cause there, usually the man pages are installed by default you may think they are there from antiquity, irrelevant for beginners like a historical haphazard.
Fortunately it was very easy to read the wiki and some from wikipedia to get a good picture about the subject.

Offline

#2 2026-07-07 12:24:05

cryptearth
Member
Registered: 2024-02-03
Posts: 2,229

Re: does manual pages work differently on arch?

https://wiki.archlinux.org/title/Instal … l_packages

packages for accessing documentation in man and info pages: man-db, man-pages and texinfo

and https://wiki.archlinux.org/title/Man_page#Installation

man-db implements man on Arch Linux, and less is the default pager used with man. mandoc can also be used.

man-pages provides both the Linux and the POSIX.1 man pages [1].

Last edited by cryptearth (2026-07-07 12:25:59)

Offline

#3 2026-07-07 12:28:51

Lone_Wolf
Administrator
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 15,188

Re: does manual pages work differently on arch?

They work the same but archlinux tends to have different ideas about what a package should include and what it shouldn't .

Often that results in archlinux having 1 package were other distros have multiple, but sometimes its reversed.

The man-pages package specifically installs what is available from kernel.org and does deal with linux kernel  and C interfaces.
Many users wil never need them or maybe prefer to look them up online like at https://man.archlinux.org/ .


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.

clean chroot building not flexible enough ?
Try clean chroot manager by graysky

Offline

#4 2026-07-07 13:24:54

aminepro
Member
Registered: 2025-01-31
Posts: 43

Re: does manual pages work differently on arch?

Lone_Wolf wrote:

or maybe prefer to look them up online like at https://man.archlinux.org/ .

Cool, didn't know about it, links seem easier to navigate through.
But actually, I find learning how to use the offline stuff more rewarding,

cryptearth wrote:

https://wiki.archlinux.org/title/Instal … l_packages

man-db implements man on Arch Linux, and less is the default pager used with man. mandoc can also be used.

Indeed what I'm not sure about is how good the man page looks after installing mandoc, is there a reason for making man-db the default?

Last edited by aminepro (2026-07-07 14:21:42)

Offline

#5 2026-07-07 13:27:39

aminepro
Member
Registered: 2025-01-31
Posts: 43

Re: does manual pages work differently on arch?

I'm not sure if this is something I have already configured, this is how it looks in my system https://www.pasteboard.co/_yCei9cM7i4E.png

Last edited by aminepro (2026-07-07 14:22:17)

Offline

#6 2026-07-07 14:50:13

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,614

Re: does manual pages work differently on arch?

Looks like a normal-ish manpage w/ LESS_TERMCAP_* being configured for colors (some TEs might inject those automagically)

Offline

#7 2026-07-07 17:08:45

aminepro
Member
Registered: 2025-01-31
Posts: 43

Re: does manual pages work differently on arch?

seth wrote:

Looks like a normal-ish manpage w/ LESS_TERMCAP_* being configured for colors

I remember installing the same zsh setup as in the iso https://wiki.archlinux.org/title/Zsh#Sa … shrc_files. for me this is the first time seeing a man page in colors tongue.
also

env |grep LESS_
LESS_TERMCAP_se=
LESS_TERMCAP_so=
LESS_TERMCAP_mb=
LESS_TERMCAP_me=
LESS_TERMCAP_md=
LESS_TERMCAP_ue=
LESS_TERMCAP_us=
seth wrote:

  (some TEs might inject those automagically)

you mean mandoc isn't the only factor, as far as I know most of terminal emulators support colors nowadays, it isn't something that should be required I think I mean I get colors even in the bare console that's not a TE.

###I just tried now and got mpv working on the console yikes

Last edited by aminepro (2026-07-07 17:53:09)

Offline

#8 2026-07-07 20:13:16

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,614

Re: does manual pages work differently on arch?

Check the environment on the console (ctrl+alt+f3) - if LESS_TERMCAP_* is set there as well, it's something your shell sources, but there's also https://github.com/MrElendig/dotfiles-a … .zshrc#L67

###I just tried now and got mpv working on the console

I'm quite frankly not sure what the problem/question is in this thread ("man pages" are documents - they don't work at all, you get to parse and display them as you see fit (I just curl the man.archlinux.org raws into groff and conditionally ansiifilter)

Offline

#9 2026-07-08 11:21:51

aminepro
Member
Registered: 2025-01-31
Posts: 43

Re: does manual pages work differently on arch?

I'm quite frankly not sure what the problem/question is in this thread

There is no problem here I'm just curious about how man pages can be used so I made a question that may reflect that.

("man pages" are documents - they don't work at all, you get to parse and display them as you see fit (I just curl the man.archlinux.org raws into groff and conditionally ansiifilter)

I think that's the type of answer I wanted, should I change the title?

if LESS_TERMCAP_* is set there as well, it's something your shell sources, but there's also https://github.com/MrElendig/dotfiles-a … .zshrc#L67

when listed wih [$env] they are empty, I see that it's just for man cause they're declared inside the man(){`here`}.

Now I get that the man-db is literally just a database lol

Last edited by aminepro (2026-07-08 11:25:22)

Offline

#10 2026-07-08 13:20:19

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,614

Re: does manual pages work differently on arch?

https://man.archlinux.org/man/mandb.8 maintains the database but https://archlinux.org/packages/core/x86_64/man-db/ also provides https://man.archlinux.org/man/man.1.en which is the usual manpage viewer.


when listed wih [$env] they are empty

They're set to non-printable characters that your TE will interpret to change font style and colors - as long as "env" or "printenv" lists them, they're most likely (and in your case evidenced by the pagers behavior) set.
https://man.archlinux.org/man/unset.n 'ing them will get you a less colorful man display.

Offline

#11 2026-07-08 16:51:23

aminepro
Member
Registered: 2025-01-31
Posts: 43

Re: does manual pages work differently on arch?

frankly it seems that that block of code (the man(){}) does nothing in my case, mandoc is independent from this cause even when using it on bash (don't know if that's an argument cause the env is the same I think)and unsetting the variables it holds, also those are less environment variables because man uses LESS as its default pager and maybe because termcap is obsolete it isn't considered by mandoc:
https://man.archlinux.org/man/less.1#LESS_TERMCAP_xx
https://unix.stackexchange.com/question … 3c86e566fc  (this one was the best along with wikis I learnt alot)

I also managed to see if they're set by viewing on a text editor

env |grep LESS_TERMCAP_ > less_termcaps 

Things I still want to learn are (g)roff and some history since I can't get the concepts otherwise

Last edited by aminepro (2026-07-08 17:27:27)

Offline

#12 2026-07-08 18:46:37

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,614

Re: does manual pages work differently on arch?

frankly it seems that that block of code (the man(){}) does nothing in my case

Are you actually using that zsh config?

type -a man

Things I still want to learn are (g)roff and some history since I can't get the concepts otherwise

unset GROFF_NO_SGR
read ROWS COLS < <(stty -F "$TTY" size)
curl -sL "https://man.archlinux.org/man/$1.raw" | groff -t -Tutf8 -rLL=${COLS}n -rLT=${COLS}n -mtty-char -mandoc
curl -sL "https://man.archlinux.org/man/$1.raw" | groff -t -Thtml -mandoc" 

Offline

#13 2026-07-08 22:45:28

aminepro
Member
Registered: 2025-01-31
Posts: 43

Re: does manual pages work differently on arch?

I tried a couple of thing in the last hour:
I created a new user with bash as default shell even then .zshrc exist in its home directory (deleted it), the result each user who has the .zshrc have a the colors no matter the shell (because of the environment variables I think) but because of not using zsh you can just delete .zshrc then and more colors as defined there.
I went to the source https://grml.org/zsh/grml-zsh-refcard.pdf, then to /etc/zsh/zshrc as it says, now that file says :

# USAGE
# If you are using this file as your ~/.zshrc file, please use ~/.zshrc.pre
# and ~/.zshrc.local for your own customisations. The former file is read
# before ~/.zshrc, the latter is read after it. Also, consider reading the
# refcard and the reference manual for this setup, both available from:
#     <http://grml.org/zsh/>

so I tried commenting out the LESS_TERMCAMP_* declarations in both (/etc/zsh/zshrc and .zshrc) and it worked, no more colors even when using zsh.

seth wrote:

unset GROFF_NO_SGR
read ROWS COLS < <(stty -F "$TTY" size)
curl -sL "https://man.archlinux.org/man/$1.raw" | groff -t -Tutf8 -rLL=${COLS}n -rLT=${COLS}n -mtty-char -mandoc
curl -sL "https://man.archlinux.org/man/$1.raw" | groff -t -Thtml -mandoc"

this didn't work for me I don't know how groff work yet so

curl -sL "https://man.archlinux.org/man/$1.raw" | groff -t -Tutf8 -rLL=${COLS}n -rLT=${COLS}n -mtty-char -mandoc
troff: error: ignoring invalid numeric expression containing character 'n'
troff: error: ignoring invalid numeric expression containing character 'n'


<!DOCTYPE html> <html lang="en">
...

Last edited by aminepro (Yesterday 12:00:50)

Offline

#14 Yesterday 06:56:36

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,614

Re: does manual pages work differently on arch?

"$1" is a variable expanding to the first commandline parameter when executing this as script or shell function.
https://ryanstutorials.net/bash-scripting-tutorial/

Offline

#15 Yesterday 16:38:36

aminepro
Member
Registered: 2025-01-31
Posts: 43

Re: does manual pages work differently on arch?

Thanks that was good big_smile

Last edited by aminepro (Yesterday 16:40:56)

Offline

Board footer

Powered by FluxBB