MAN(1P)
π«Ά PROLOG π«Ά
ok so bestie, real talk before we even start: this page is part of the POSIX Programmer's Manual. The Linux implementation of this interface may differ β like, consult the corresponding Linux manual page for details on Linux behavior β or the interface might not even be implemented on Linux at all. π Not me being the bearer of bad news already.
β¨ NAME β¨
man β display system documentation π
π SYNOPSIS π
man [-k] name...
πΈ DESCRIPTION πΈ
So the man utility shall write information about each of the name operands. That's the whole vibe.
If name is the name of a standard utility, man at a minimum shall write a message describing the syntax used by the standard utility, its options, and operands. If more information is available, the man utility shall provide it in an implementation-defined manner. (Translation: it gives you the basics, and then whatever extra it wants, on its own terms. π)
An implementation may provide information for values of name other than the standard utilities. And standard utilities that are listed as optional and that are not supported by the implementation either shall cause a brief message indicating that fact to be displayed, or shall cause a full display of information as described previously. Either way you get something, bestie, you won't be left on read. π«Ά
π OPTIONS π
The man utility shall conform to the Base Definitions volume of POSIX.1β2017, Section 12.2, Utility Syntax Guidelines. (Yes we're being formal, it's fine, it's giving very proper.)
The following option shall be supported:
-kβ Interpretnameoperands as keywords to be used in searching a utilities summary database that contains a brief purpose entry for each standard utility, and write lines from the summary database that match any of the keywords. The keyword search shall produce results that are the equivalent of the output of the following command:
grep -Ei '
name
name
...
' summary-database
This assumes that the summary-database is a text file with a single entry per line; this organization is not required and the example using grep -Ei is merely illustrative of the type of search intended. The purpose entry to be included in the database shall consist of a terse description of the purpose of the utility. β¨
π OPERANDS π
The following operand shall be supported:
nameβ A keyword or the name of a standard utility. When-kis not specified andnamedoes not represent one of the standard utilities, the results are unspecified. π« like, nobody promised you anything there.
π STDIN π
Not used. Periodt.
π¦ INPUT FILES π¦
None.
π ENVIRONMENT VARIABLES π
The following environment variables shall affect the execution of man:
LANGβ Provide a default value for the internationalization variables that are unset or null. (See the Base Definitions volume of POSIX.1β2017, Section 8.2, Internationalization Variables for the precedence of internationalization variables used to determine the values of locale categories.)LC_ALLβ If set to a non-empty string value, override the values of all the other internationalization variables.LC_CTYPEβ Determine the locale for the interpretation of sequences of bytes of text data as characters (for example, single-byte as opposed to multi-byte characters in arguments and in the summary database). The value ofLC_CTYPEneed not affect the format of the information written about thenameoperands.LC_MESSAGESβ Determine the locale that should be used to affect the format and contents of diagnostic messages written to standard error and informative messages written to standard output.NLSPATHβ Determine the location of message catalogs for the processing ofLC_MESSAGES.PAGERβ Determine an output filtering command for writing the output to a terminal. Any string acceptable as acommand_stringoperand to thesh -ccommand shall be valid. When standard output is a terminal device, the reference page output shall be piped through the command. If thePAGERvariable is null or not set, the command shall be eithermoreor another paginator utility documented in the system documentation. π₯ (yes queen, you can pipe your man page through whatever you want)
β ASYNCHRONOUS EVENTS β
Default.
πΈ STDOUT πΈ
The man utility shall write text describing the syntax of the utility name, its options and its operands, or, when -k is specified, lines from the summary database. The format of this text is implementation-defined. (So like, don't @ me about the formatting, it's vibes-based and spec-approved. π
)
π STDERR π
The standard error shall be used for diagnostic messages, and may also be used for informational messages of unspecified format.
π OUTPUT FILES π
None.
π EXTENDED DESCRIPTION π
None.
π EXIT STATUS π
The following exit values shall be returned:
0β Successful completion. slay.>0β An error occurred. π
π§ CONSEQUENCES OF ERRORS π§
Default.
The following sections are informative. (aka: gossip, backstory, lore β but not the actual requirements, bestie, don't get it twisted)
π APPLICATION USAGE π
None.
π EXAMPLES π
None.
π₯ RATIONALE π₯
ok this is the juicy part, the behind-the-scenes, the group chat screenshots.
It is recognized that the man utility is only of minimal usefulness as specified. The opinion of the standard developers was strongly divided as to how much or how little information man should be required to provide. They considered, however, that the provision of some portable way of accessing documentation would aid user portability. The arguments against a fuller specification were:
- Large quantities of documentation should not be required on a system that does not have excess disk space.
- The current manual system does not present information in a manner that greatly aids user portability.
- A ``better help system'' is currently an area in which vendors feel that they can add value to their POSIX implementations.
The -f option was considered, but due to implementation differences, it was not included in this volume of POSIX.1β2017. (not me almost getting a cool option and then β¨noβ¨)
The description was changed to be more specific about what has to be displayed for a utility. The standard developers considered it insufficient to allow a display of only the synopsis without giving a short description of what each option and operand does. fr fr, imagine getting a synopsis with zero explanation, tragic.
The ``purpose'' entry to be included in the database can be similar to the section title (less the numeric prefix) from this volume of POSIX.1β2017 for each utility. These titles are similar to those used in historical systems for this purpose.
See mailx for rationale concerning the default paginator.
The caveat in the LC_CTYPE description was added because it is not a requirement that an implementation provide reference pages for all of its supported locales on each system; changing LC_CTYPE does not necessarily translate the reference page into another language. This is equivalent to the current state of LC_MESSAGES in POSIX.1β2008βlocale-specific messages are not yet a requirement.
The historical MANPATH variable is not included in POSIX because no attempt is made to specify naming conventions for reference page files, nor even to mandate that they are files at all. On some implementations they could be a true database, a hypertext file, or even fixed strings within the man executable. The standard developers considered the portability of reference pages to be outside their scope of work. However, users should be aware that MANPATH is implemented on a number of historical systems and that it can be used to tailor the search pattern for reference pages from the various categories (utilities, functions, file formats, and so on) when the system administrator reveals the location and conventions for reference pages on the system. π so if you've ever wondered why MANPATH isn't in POSIX β there's your answer, bestie, it's giving "not our problem".
The keyword search can rely on at least the text of the section titles from these utility descriptions, and the implementation may add more keywords. The term ``section titles'' refers to the strings such as:
man β Display system documentation
ps β Report process status
π FUTURE DIRECTIONS π
None. (iconic of them tbh)
π«Ά SEE ALSO π«Ά
more
The Base Definitions volume of POSIX.1β2017, Chapter 8, Environment Variables, Section 12.2, Utility Syntax Guidelines
π COPYRIGHT π
Portions of this text are reprinted and reproduced in electronic form from IEEE Std 1003.1-2017, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 7, 2018 Edition, Copyright (C) 2018 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between this version and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html .
Any typographical or formatting errors that appear in this page are most likely to have been introduced during the conversion of the source files to man page format. To report such errors, see https://www.kernel.org/doc/man-pages/reporting_bugs.html .
ok that's the whole page, bestie, we made it π and before you go β this one's brought to you by IEEE/The Open Group, 2017, page MAN(1P). no cap. now go read some docs, you ate. π β¨
π¦ where this page comes from
- alpine 3.22: man-pages-posix 2017a-r0 Β· custom
- alpine 3.23: man-pages-posix 2017a-r0 Β· custom
- alpine 3.24: man-pages-posix 2017a-r0 Β· custom
- arch rolling: man-pages 6.19-1
- arch rolling: man-pages 6.20-1 Β· BSD-2-Clause AND BSD-3-Clause AND BSD-4.3TAHOE AND BSD-4-Clause-UC AND GPL-1.0-or-later AND GPL-2.0-only AND GPL-2.0-or-later AND GPL-3.0-or-later AND LGPL-3.0-linking-exception AND LGPL-3.0-or-later AND LicenseRef-Public-Domain AND LicenseRef-UltraPermissive AND Linux-man-pages-1-para AND Linux-man-pages-copyleft AND Linux-man-pages-copyleft-2-para AND Linux-man-pages-copyleft-var AND MIT AND Spencer-94
- nixpkgs unstable: man-pages-posix 2017a
- opensuse-leap 16.0: man-pages-posix 2017a-160000.4.1 Β· SUSE-IEEE
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms