{
    "mode": "man",
    "parameter": "MAN-PAGES",
    "section": "7",
    "url": "https://www.chedong.com/phpMan.php/man/MAN-PAGES/7/json",
    "generated": "2026-06-10T22:38:48Z",
    "synopsis": "man [section] title",
    "sections": {
        "NAME": {
            "content": "man-pages - conventions for writing Linux man pages\n",
            "subsections": []
        },
        "SYNOPSIS": {
            "content": "man [section] title\n",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "This  page  describes  the conventions that should be employed when writing man pages for the\nLinux man-pages project, which documents the user-space API provided by the Linux kernel  and\nthe  GNU  C  library.   The project thus provides most of the pages in Section 2, many of the\npages that appear in Sections 3, 4, and 7, and a few of the pages that appear in Sections  1,\n5, and 8 of the man pages on a Linux system.  The conventions described on this page may also\nbe useful for authors writing man pages for other projects.\n",
            "subsections": [
                {
                    "name": "Sections of the manual pages",
                    "content": "The manual Sections are traditionally defined as follows:\n"
                },
                {
                    "name": "1 User commands (Programs)",
                    "content": "Commands that can be executed by the user from within a shell.\n"
                },
                {
                    "name": "2 System calls",
                    "content": "Functions which wrap operations performed by the kernel.\n"
                },
                {
                    "name": "3 Library calls",
                    "content": "All library functions excluding the system call wrappers (Most of the libc functions).\n"
                },
                {
                    "name": "4 Special files (devices)",
                    "content": "Files found in /dev which allow to access to devices through the kernel.\n"
                },
                {
                    "name": "5 File formats and configuration files",
                    "content": "Describes various human-readable file formats and configuration files.\n"
                },
                {
                    "name": "6 Games",
                    "content": "Games and funny little programs available on the system.\n"
                },
                {
                    "name": "7 Overview, conventions, and miscellaneous",
                    "content": "Overviews or descriptions of various topics, conventions and protocols, character  set\nstandards, the standard filesystem layout, and miscellaneous other things.\n"
                },
                {
                    "name": "8 System management commands",
                    "content": "Commands like mount(8), many of which only root can execute.\n"
                },
                {
                    "name": "Macro package",
                    "content": "New  manual  pages  should  be marked up using the groff an.tmac package described in man(7).\nThis choice is mainly for consistency: the vast majority of existing Linux manual  pages  are\nmarked up using these macros.\n"
                },
                {
                    "name": "Conventions for source file layout",
                    "content": "Please  limit  source code line length to no more than about 75 characters wherever possible.\nThis helps avoid line-wrapping in some mail clients when patches are submitted inline.\n"
                },
                {
                    "name": "Title line",
                    "content": "The first command in a man page should be a TH command:\n\n.TH title section date source manual\n\nThe arguments of the command are as follows:\n\ntitle  The title of the man page, written in all caps (e.g., MAN-PAGES).\n\nsection\nThe section number in which the man page should be placed (e.g., 7).\n\ndate   The date of the last nontrivial change that was made to the  man  page.   (Within  the\nman-pages project, the necessary updates to these timestamps are handled automatically\nby scripts, so there is no need to manually update them as part of  a  patch.)   Dates\nshould be written in the form YYYY-MM-DD.\n\nsource The source of the command, function, or system call.\n\nFor  those  few  man-pages  pages in Sections 1 and 8, probably you just want to write\nGNU.\n\nFor system calls, just write Linux.  (An earlier practice was  to  write  the  version\nnumber  of  the kernel from which the manual page was being written/checked.  However,\nthis was never done consistently, and so was probably worse than including no  version\nnumber.  Henceforth, avoid including a version number.)\n\nFor  library  calls  that  are part of glibc or one of the other common GNU libraries,\njust use GNU C Library, GNU, or an empty string.\n\nFor Section 4 pages, use Linux.\n\nIn cases of doubt, just write Linux, or GNU.\n\nmanual The title of the manual (e.g., for Section 2 and 3 pages in the man-pages package, use\nLinux Programmer's Manual).\n"
                },
                {
                    "name": "Sections within a manual page",
                    "content": "The list below shows conventional or suggested sections.  Most manual pages should include at\nleast the highlighted sections.  Arrange a new manual page so that sections are placed in the\norder shown in the list.\n\nNAME\nSYNOPSIS\nCONFIGURATION    [Normally only in Section 4]\nDESCRIPTION\nOPTIONS          [Normally only in Sections 1, 8]\nEXIT STATUS      [Normally only in Sections 1, 8]\nRETURN VALUE     [Normally only in Sections 2, 3]\nERRORS           [Typically only in Sections 2, 3]\nENVIRONMENT\nFILES\nVERSIONS         [Normally only in Sections 2, 3]\nATTRIBUTES       [Normally only in Sections 2, 3]\nCONFORMING TO\nNOTES\nBUGS\nEXAMPLES\nAUTHORS          [Discouraged]\nREPORTING BUGS   [Not used in man-pages]\nCOPYRIGHT        [Not used in man-pages]\nSEE ALSO\n\nWhere a traditional heading would apply, please use it; this kind of consistency can make the\ninformation easier to understand.  If you must, you can create your own headings if they make\nthings  easier  to  understand (this can be especially useful for pages in Sections 4 and 5).\nHowever, before doing this, consider whether you could use  the  traditional  headings,  with\nsome subsections (.SS) within those sections.\n\nThe following list elaborates on the contents of each of the above sections.\n\nNAME   The name of this manual page.\n\nSee  man(7)  for important details of the line(s) that should follow the .SH NAME com‐\nmand.  All words in this line (including the  word  immediately  following  the  \"\\-\")\nshould  be  in  lowercase, except where English or technical terminological convention\ndictates otherwise.\n\nSYNOPSIS\nA brief summary of the command or function's interface.\n\nFor commands, this shows the syntax of the command and its  arguments  (including  op‐\ntions);  boldface  is used for as-is text and italics are used to indicate replaceable\narguments.  Brackets ([]) surround optional  arguments,  vertical  bars  (|)  separate\nchoices,  and  ellipses  (...)  can be repeated.  For functions, it shows any required\ndata declarations or #include directives, followed by the function declaration.\n\nWhere a feature test macro must be defined in order to obtain  the  declaration  of  a\nfunction  (or  a variable) from a header file, then the SYNOPSIS should indicate this,\nas described in featuretestmacros(7).\n\nCONFIGURATION\nConfiguration details for a device.\n\nThis section normally appears only in Section 4 pages.\n\nDESCRIPTION\nAn explanation of what the program, function, or format does.\n\nDiscuss how it interacts with files and standard input, and what it produces on  stan‐\ndard  output  or  standard  error.   Omit  internals and implementation details unless\nthey're critical for understanding the interface.  Describe the usual case; for infor‐\nmation on command-line options of a program use the OPTIONS section.\n\nWhen  describing  new  behavior or new flags for a system call or library function, be\ncareful to note the kernel or C library version that introduced the change.  The  pre‐\nferred  method  of  noting this information for flags is as part of a .TP list, in the\nfollowing form (here, for a new system call flag):\n\nXYZFLAG (since Linux 3.7)\nDescription of flag...\n\nIncluding version information is especially useful to users who are constrained to us‐\ning  older kernel or C library versions (which is typical in embedded systems, for ex‐\nample).\n\nOPTIONS\nA description of the command-line options accepted by a program and  how  they  change\nits behavior.\n\nThis section should appear only for Section 1 and 8 manual pages.\n\nEXIT STATUS\nA  list  of the possible exit status values of a program and the conditions that cause\nthese values to be returned.\n\nThis section should appear only for Section 1 and 8 manual pages.\n\nRETURN VALUE\nFor Section 2 and 3 pages, this section gives a list of the values the library routine\nwill return to the caller and the conditions that cause these values to be returned.\n\nERRORS For  Section  2 and 3 manual pages, this is a list of the values that may be placed in\nerrno in the event of an error, along with information about the cause of the errors.\n\nWhere several different conditions produce the same error, the preferred  approach  is\nto  create  separate  list entries (with duplicate error names) for each of the condi‐\ntions.  This makes the separate conditions clear, may make the list  easier  to  read,\nand  allows metainformation (e.g., kernel version number where the condition first be‐\ncame applicable) to be more easily marked for each condition.\n\nThe error list should be in alphabetical order.\n\nENVIRONMENT\nA list of all environment variables that affect the program or function and  how  they\naffect it.\n\nFILES  A list of the files the program or function uses, such as configuration files, startup\nfiles, and files the program directly operates on.\n\nGive the full pathname of these files, and use the installation process to modify  the\ndirectory part to match user preferences.  For many programs, the default installation\nlocation is in /usr/local, so your base manual page should use /usr/local as the base.\n\nATTRIBUTES\nA summary of various attributes of the function(s) documented on this page.   See  at‐‐\ntributes(7) for further details.\n\nVERSIONS\nA  brief  summary of the Linux kernel or glibc versions where a system call or library\nfunction appeared, or changed significantly in its operation.\n\nAs a general rule, every new interface should include a VERSIONS section in its manual\npage.  Unfortunately, many existing manual pages don't include this information (since\nthere was no policy to do so when they were written).  Patches to remedy this are wel‐\ncome,  but,  from  the  perspective  of programmers writing new code, this information\nprobably matters only in the case of kernel interfaces that have been added  in  Linux\n2.4  or  later  (i.e., changes since kernel 2.2), and library functions that have been\nadded to glibc since version 2.1 (i.e., changes since glibc 2.0).\n\nThe syscalls(2) manual page also provides information about kernel versions  in  which\nvarious system calls first appeared.\n\nCONFORMING TO\nA  description  of any standards or conventions that relate to the function or command\ndescribed by the manual page.\n\nThe preferred terms to use for the various standards are listed as headings  in  stan‐‐\ndards(7).\n\nFor a page in Section 2 or 3, this section should note the POSIX.1 version(s) that the\ncall conforms to, and also whether the call is specified in  C99.   (Don't  worry  too\nmuch  about other standards like SUS, SUSv2, and XPG, or the SVr4 and 4.xBSD implemen‐\ntation standards, unless the call was specified in those standards, but isn't  in  the\ncurrent version of POSIX.1.)\n\nIf  the  call  is  not governed by any standards but commonly exists on other systems,\nnote them.  If the call is Linux-specific, note this.\n\nIf this section consists of just a list of standards (which it commonly does),  termi‐\nnate the list with a period ('.').\n\nNOTES  Miscellaneous notes.\n\nFor Section 2 and 3 man pages you may find it useful to include subsections (SS) named\nLinux Notes and Glibc Notes.\n\nIn Section 2, use the heading C library/kernel differences to mark off notes that  de‐\nscribe  the  differences  (if any) between the C library wrapper function for a system\ncall and the raw system call interface provided by the kernel.\n\nBUGS   A list of limitations, known defects or inconveniences, and other questionable activi‐\nties.\n\nEXAMPLES\nOne or more examples demonstrating how this function, file or command is used.\n\nFor details on writing example programs, see Example programs below.\n\nAUTHORS\nA list of authors of the documentation or program.\n\nUse  of  an  AUTHORS  section is strongly discouraged.  Generally, it is better not to\nclutter every page with a list of (over time potentially  numerous)  authors;  if  you\nwrite or significantly amend a page, add a copyright notice as a comment in the source\nfile.  If you are the author of a device driver and want to include an address for re‐\nporting bugs, place this under the BUGS section.\n\nREPORTING BUGS\nThe  man-pages project doesn't use a REPORTING BUGS section in manual pages.  Informa‐\ntion on reporting bugs is instead supplied in the script-generated  COLOPHON  section.\nHowever, various projects do use a REPORTING BUGS section.  it is recommended to place\nit near the foot of the page.\n\nCOPYRIGHT\nThe man-pages project doesn't use a COPYRIGHT section in manual pages.  Copyright  in‐\nformation  is  instead  maintained in the page source.  In pages where this section is\npresent, it is recommended to place it near the foot of the page, just above SEE ALSO.\n\nSEE ALSO\nA comma-separated list of related man pages, possibly followed by other related  pages\nor documents.\n\nThe  list should be ordered by section number and then alphabetically by name.  Do not\nterminate this list with a period.\n\nWhere the SEE ALSO list contains many long manual page names, to  improve  the  visual\nresult  of  the output, it may be useful to employ the .ad l (don't right justify) and\n.nh (don't hyphenate) directives.  Hyphenation of individual page names  can  be  pre‐\nvented by preceding words with the string \"\\%\".\n\nGiven  the distributed, autonomous nature of FOSS projects and their documentation, it\nis sometimes necessary—and in many cases desirable—that the SEE ALSO section  includes\nreferences to manual pages provided by other projects.\n"
                }
            ]
        },
        "STYLE GUIDE": {
            "content": "The  following  subsections  describe the preferred style for the man-pages project.  For de‐\ntails not covered below, the Chicago Manual of Style is usually a good source; try also grep‐\nping for preexisting usage in the project source tree.\n",
            "subsections": [
                {
                    "name": "Use of gender-neutral language",
                    "content": "As  far  as  possible,  use  gender-neutral language in the text of man pages.  Use of \"they\"\n(\"them\", \"themself\", \"their\") as a gender-neutral singular pronoun is acceptable.\n"
                },
                {
                    "name": "Formatting conventions for manual pages describing commands",
                    "content": "For manual pages that describe a command (typically in Sections 1 and 8), the  arguments  are\nalways specified using italics, even in the SYNOPSIS section.\n\nThe name of the command, and its options, should always be formatted in bold.\n"
                },
                {
                    "name": "Formatting conventions for manual pages describing functions",
                    "content": "For  manual  pages that describe functions (typically in Sections 2 and 3), the arguments are\nalways specified using italics, even in the SYNOPSIS section, where the rest of the  function\nis specified in bold:\n\nint myfunction(int argc, char argv);\n\nVariable names should, like argument names, be specified in italics.\n\nAny  reference  to  the subject of the current manual page should be written with the name in\nbold followed by a pair of parentheses in Roman (normal) font.  For example, in the  fcntl(2)\nman  page, references to the subject of the page would be written as: fcntl().  The preferred\nway to write this in the source file is:\n\n.BR fcntl ()\n\n(Using this format, rather than the use of \"\\fB...\\fP()\" makes it easier to write tools  that\nparse man page source files.)\n"
                },
                {
                    "name": "Use semantic newlines",
                    "content": "In  the  source of a manual page, new sentences should be started on new lines, and long sen‐\ntences should split into lines at clause breaks (commas,  semicolons,  colons,  and  so  on).\nThis convention, sometimes known as \"semantic newlines\", makes it easier to see the effect of\npatches, which often operate at the level of individual sentences or sentence clauses.\n"
                },
                {
                    "name": "Formatting conventions (general)",
                    "content": "Paragraphs should be separated by suitable markers (usually either .PP or .IP).  Do not sepa‐\nrate  paragraphs  using blank lines, as this results in poor rendering in some output formats\n(such as PostScript and PDF).\n\nFilenames (whether pathnames, or references to header files) are  always  in  italics  (e.g.,\n<stdio.h>),  except in the SYNOPSIS section, where included files are in bold (e.g., #include\n<stdio.h>).  When referring to a standard header file include, specify the header  file  sur‐\nrounded by angle brackets, in the usual C way (e.g., <stdio.h>).\n\nSpecial macros, which are usually in uppercase, are in bold (e.g., MAXINT).  Exception: don't\nboldface NULL.\n\nWhen enumerating a list of error codes, the codes are in bold (this list usually uses the .TP\nmacro).\n\nComplete  commands should, if long, be written as an indented line on their own, with a blank\nline before and after the command, for example\n\nman 7 man-pages\n\nIf the command is short, then it can be included inline in the text, in  italic  format,  for\nexample,  man  7 man-pages.  In this case, it may be worth using nonbreaking spaces (\"\\ \") at\nsuitable places in the command.  Command options should be written in italics (e.g., -l).\n\nExpressions, if not written on a separate indented line,  should  be  specified  in  italics.\nAgain,  the  use  of  nonbreaking spaces may be appropriate if the expression is inlined with\nnormal text.\n\nWhen showing example shell sessions, user input should be formatted in bold, for example\n\n$ date\nThu Jul  7 13:01:27 CEST 2016\n\nAny reference to another man page should be written with the name in bold, always followed by\nthe  section  number,  formatted in Roman (normal) font, without any separating spaces (e.g.,\nintro(2)).  The preferred way to write this in the source file is:\n\n.BR intro (2)\n\n(Including the section number in cross references lets tools like man2html(1) create properly\nhyperlinked pages.)\n\nControl characters should be written in bold face, with no quotes; for example, ^X.\n"
                },
                {
                    "name": "Spelling",
                    "content": "Starting  with  release  2.59,  man-pages  follows American spelling conventions (previously,\nthere was a random mix of British and American spellings); please write  all  new  pages  and\npatches according to these conventions.\n\nAside  from  the  well-known  spelling differences, there are a few other subtleties to watch\nfor:\n\n*  American English tends to use the forms \"backward\", \"upward\", \"toward\", and so  on  rather\nthan the British forms \"backwards\", \"upwards\", \"towards\", and so on.\n"
                },
                {
                    "name": "BSD version numbers",
                    "content": "The classical scheme for writing BSD version numbers is x.yBSD, where x.y is the version num‐\nber (e.g., 4.2BSD).  Avoid forms such as BSD 4.3.\n"
                },
                {
                    "name": "Capitalization",
                    "content": "In subsection (\"SS\") headings, capitalize the first word in the heading,  but  otherwise  use\nlowercase,  except  where English usage (e.g., proper nouns) or programming language require‐\nments (e.g., identifier names) dictate otherwise.  For example:\n\n.SS Unicode under Linux\n"
                },
                {
                    "name": "Indentation of structure definitions, shell session logs, and so on",
                    "content": "When structure definitions, shell session logs, and so on are included in running  text,  in‐\ndent  them by 4 spaces (i.e., a block enclosed by .in +4n and .in), format them using the .EX\nand EE macros, and surround them with suitable paragraph markers (either .PP  or  .IP).   For\nexample:\n\n.PP\n.in +4n\n.EX\nint\nmain(int argc, char *argv[])\n{\nreturn 0;\n}\n.EE\n.in\n.PP\n"
                },
                {
                    "name": "Preferred terms",
                    "content": "The  following table lists some preferred terms to use in man pages, mainly to ensure consis‐\ntency across pages.\n\nTerm                 Avoid using                 Notes\n───────────────────────────────────────────────────────────────────────────\n\nbit mask             bitmask\nbuilt-in             builtin\nEpoch                epoch                       For   the   UNIX    Epoch\n(00:00:00,   1  Jan  1970\nUTC)\nfilename             file name\nfilesystem           file system\nhostname             host name\ninode                i-node\nlowercase            lower case, lower-case\nnonzero              non-zero\npathname             path name\npseudoterminal       pseudo-terminal\nprivileged port      reserved   port,   system\nport\nreal-time            realtime, real time\nrun time             runtime\nsaved set-group-ID   saved   group  ID,  saved\nset-GID\nsaved set-user-ID    saved user ID, saved set-\nUID\nset-group-ID         set-GID, setgid\nset-user-ID          set-UID, setuid\nsuperuser            super user, super-user\nsuperblock           super block, super-block\ntimestamp            time stamp\ntimezone             time zone\nuppercase            upper case, upper-case\nusable               useable\nuser space           userspace\nusername             user name\nx86-64               x8664                      Except  if  referring  to\nresult of  \"uname -m\"  or\nsimilar\nzeros                zeroes\n\nSee also the discussion Hyphenation of attributive compounds below.\n"
                },
                {
                    "name": "Terms to avoid",
                    "content": "The  following  table lists some terms to avoid using in man pages, along with some suggested\nalternatives, mainly to ensure consistency across pages.\n\nAvoid             Use instead             Notes\n────────────────────────────────────────────────────────────────────\n\n32bit             32-bit                  same for  8-bit,  16-bit,\netc.\ncurrent process   calling process         A  common mistake made by\nkernel  programmers  when\nwriting man pages\nmanpage           man page, manual page\nminus infinity    negative infinity\nnon-root          unprivileged user\nnon-superuser     unprivileged user\nnonprivileged     unprivileged\nOS                operating system\n\nplus infinity     positive infinity\npty               pseudoterminal\ntty               terminal\nUnices            UNIX systems\nUnixes            UNIX systems\n"
                },
                {
                    "name": "Trademarks",
                    "content": "Use  the  correct  spelling  and case for trademarks.  The following is a list of the correct\nspellings of various relevant trademarks that are sometimes misspelled:\n\nDG/UX\nHP-UX\nUNIX\nUnixWare\n"
                },
                {
                    "name": "NULL, NUL, null pointer, and null character",
                    "content": "A null pointer is a pointer that points to nothing, and is normally indicated by the constant\nNULL.  On the other hand, NUL is the null byte, a byte with the value 0, represented in C via\nthe character constant '\\0'.\n\nThe preferred term for the pointer is \"null pointer\" or simply \"NULL\";  avoid  writing  \"NULL\npointer\".\n\nThe  preferred term for the byte is \"null byte\".  Avoid writing \"NUL\", since it is too easily\nconfused with \"NULL\".  Avoid also the terms \"zero byte\" and \"null character\".  The byte  that\nterminates  a C string should be described as \"the terminating null byte\"; strings may be de‐\nscribed as \"null-terminated\", but avoid the use of \"NUL-terminated\".\n"
                },
                {
                    "name": "Hyperlinks",
                    "content": "For hyperlinks, use the .UR/.UE macro pair (see groffman(7)).  This produces  proper  hyper‐\nlinks that can be used in a web browser, when rendering a page with, say:\n\nBROWSER=firefox man -H pagename\n"
                },
                {
                    "name": "Use of e.g., i.e., etc., a.k.a., and similar",
                    "content": "In  general,  the  use  of  abbreviations such as \"e.g.\", \"i.e.\", \"etc.\", \"cf.\", and \"a.k.a.\"\nshould be avoided, in favor of suitable full wordings (\"for example\", \"that is\", \"and so on\",\n\"compare to\", \"also known as\").\n\nThe  only  place  where such abbreviations may be acceptable is in short parenthetical asides\n(e.g., like this one).\n\nAlways include periods in such abbreviations, as shown here.  In addition, \"e.g.\" and  \"i.e.\"\nshould always be followed by a comma.\n"
                },
                {
                    "name": "Em-dashes",
                    "content": "The  way  to write an em-dash—the glyph that appears at either end of this subphrase—in *roff\nis with the macro \"\\(em\".  (On an ASCII terminal, an em-dash typically  renders  as  two  hy‐\nphens,  but  in other typographical contexts it renders as a long dash.)  Em-dashes should be\nwritten without surrounding spaces.\n"
                },
                {
                    "name": "Hyphenation of attributive compounds",
                    "content": "Compound terms should be hyphenated when used attributively (i.e.,  to  qualify  a  following\nnoun). Some examples:\n\n32-bit value\ncommand-line argument\nfloating-point number\nrun-time check\nuser-space function\nwide-character string\n"
                },
                {
                    "name": "Hyphenation with multi, non, pre, re, sub, and so on",
                    "content": "The  general  tendency  in modern English is not to hyphenate after prefixes such as \"multi\",\n\"non\", \"pre\", \"re\", \"sub\", and so on.  Manual pages should generally follow  this  rule  when\nthese prefixes are used in natural English constructions with simple suffixes.  The following\nlist gives some examples of the preferred forms:\n\ninterprocess\nmultithreaded\nmultiprocess\nnonblocking\nnondefault\nnonempty\nnoninteractive\nnonnegative\nnonportable\nnonzero\npreallocated\nprecreate\nprerecorded\nreestablished\nreinitialize\nrearm\nreread\nsubcomponent\nsubdirectory\nsubsystem\n\nHyphens should be retained when the prefixes are used  in  nonstandard  English  words,  with\ntrademarks, proper nouns, acronyms, or compound terms.  Some examples:\n\nnon-ASCII\nnon-English\nnon-NULL\nnon-real-time\n\nFinally,  note  that  \"re-create\"  and  \"recreate\" are two different verbs, and the former is\nprobably what you want.\n"
                },
                {
                    "name": "Generating optimal glyphs",
                    "content": "Where a real minus character is required (e.g., for numbers such as -1, for  man  page  cross\nreferences  such  as  utf-8(7),  or when writing options that have a leading dash, such as in\nls -l), use the following form in the man page source:\n\n\\-\n\nThis guideline applies also to code examples.\n\nTo produce unslanted single quotes that render well in ASCII,  UTF-8,  and  PDF,  use  \"\\(aq\"\n(\"apostrophe quote\"); for example\n\n\\(aqC\\(aq\n\nwhere  C is the quoted character.  This guideline applies also to character constants used in\ncode examples.\n\nWhere a proper caret (^) that renders well in both  a  terminal  and  PDF  is  required,  use\n\"\\(ha\".   This  is  especially necessary in code samples, to get a nicely rendered caret when\nrendering to PDF.\n\nUsing a naked \"~\" character results in a poor rendering in PDF.  Instead use \"\\(ti\".  This is\nespecially necessary in code samples, to get a nicely rendered tilde when rendering to PDF.\n"
                },
                {
                    "name": "Example programs and shell sessions",
                    "content": "Manual  pages  may include example programs demonstrating how to use a system call or library\nfunction.  However, note the following:\n\n*  Example programs should be written in C.\n\n*  An example program is necessary and useful only if it demonstrates something  beyond  what\ncan easily be provided in a textual description of the interface.  An example program that\ndoes nothing other than call an interface usually serves little purpose.\n\n*  Example programs should ideally be short (e.g., a good example can often  be  provided  in\nless  than  100  lines  of code), though in some cases longer programs may be necessary to\nproperly illustrate the use of an API.\n\n*  Expressive code and useful comments are appreciated.\n\n*  Example programs should do error checking after system calls and library function calls.\n\n*  Example programs should be complete, and  compile  without  warnings  when  compiled  with\ncc -Wall.\n\n*  Where  possible and appropriate, example programs should allow experimentation, by varying\ntheir behavior based on inputs (ideally from command-line arguments, or alternatively, via\ninput read by the program).\n\n*  Example programs should be laid out according to Kernighan and Ritchie style, with 4-space\nindents.  (Avoid the use of TAB characters in source code!)  The following command can  be\nused to format your source code to something close to the preferred style:\n\nindent -npro -kr -i4 -ts4 -sob -l72 -ss -nut -psl prog.c\n\n*  For consistency, all example programs should terminate using either of:\n\nexit(EXITSUCCESS);\nexit(EXITFAILURE);\n\nAvoid using the following forms to terminate a program:\n\nexit(0);\nexit(1);\nreturn n;\n\n*  If there is extensive explanatory text before the program source code, mark off the source\ncode with a subsection heading Program source, as in:\n\n.SS Program source\n\nAlways do this if the explanatory text includes a shell session log.\n\nIf you include a shell session log demonstrating the use of a program or  other  system  fea‐\nture:\n\n*  Place the session log above the source code listing\n\n*  Indent the session log by four spaces.\n\n*  Boldface the user input text, to distinguish it from output produced by the system.\n\nFor some examples of what example programs should look like, see wait(2) and pipe(2).\n"
                }
            ]
        },
        "EXAMPLES": {
            "content": "For canonical examples of how man pages in the man-pages package should look, see pipe(2) and\nfcntl(2).\n",
            "subsections": []
        },
        "SEE ALSO": {
            "content": "man(1), man2html(1), attributes(7), groff(7), groffman(7), man(7), mdoc(7)\n",
            "subsections": []
        },
        "COLOPHON": {
            "content": "This page is part of release 5.10 of the Linux  man-pages  project.   A  description  of  the\nproject,  information about reporting bugs, and the latest version of this page, can be found\nat https://www.kernel.org/doc/man-pages/.\n\n\n\nLinux                                        2020-08-13                                 MAN-PAGES(7)",
            "subsections": []
        }
    },
    "summary": "man-pages - conventions for writing Linux man pages",
    "flags": [],
    "examples": [
        "For canonical examples of how man pages in the man-pages package should look, see pipe(2) and",
        "fcntl(2)."
    ],
    "see_also": [
        {
            "name": "man",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/man/1/json"
        },
        {
            "name": "man2html",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/man2html/1/json"
        },
        {
            "name": "attributes",
            "section": "7",
            "url": "https://www.chedong.com/phpMan.php/man/attributes/7/json"
        },
        {
            "name": "groff",
            "section": "7",
            "url": "https://www.chedong.com/phpMan.php/man/groff/7/json"
        },
        {
            "name": "groffman",
            "section": "7",
            "url": "https://www.chedong.com/phpMan.php/man/groffman/7/json"
        },
        {
            "name": "man",
            "section": "7",
            "url": "https://www.chedong.com/phpMan.php/man/man/7/json"
        },
        {
            "name": "mdoc",
            "section": "7",
            "url": "https://www.chedong.com/phpMan.php/man/mdoc/7/json"
        }
    ]
}