{
    "mode": "man",
    "parameter": "tabs",
    "section": "1",
    "url": "https://www.chedong.com/phpMan.php/man/tabs/1/json",
    "generated": "2026-10-22T12:08:32Z",
    "synopsis": "tabs [options] [tabstop-list]",
    "sections": {
        "NAME": {
            "content": "tabs - set terminal tab stops\n",
            "subsections": []
        },
        "SYNOPSIS": {
            "content": "tabs [options] [tabstop-list]\n",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "The  tabs  program  clears  and  sets  tab-stops  on  the  terminal.   This uses the terminfo\nclearalltabs and settab capabilities.  If either is absent, tabs is  unable  to  clear/set\ntab-stops.  The terminal should be configured to use hard tabs, e.g.,\n\nstty tab0\n\nLike clear(1), tabs writes to the standard output.  You can redirect the standard output to a\nfile (which prevents tabs from actually changing the tabstops), and later cat the file to the\nscreen, setting tabstops at that point.\n\nThese  are hardware tabs, which cannot be queried rapidly by applications running in the ter‐\nminal, if at all.  Curses and other full-screen applications may use hardware tabs  in  opti‐\nmizing their output to the terminal.  If the hardware tabstops differ from the information in\nthe  terminal  database,  the  result  is unpredictable.  Before running curses programs, you\nshould either reset tab-stops to the standard interval\n\ntabs -8\n\nor use the reset program, since the normal initialization sequences do not ensure  that  tab-\nstops are reset.\n",
            "subsections": []
        },
        "OPTIONS": {
            "content": "",
            "subsections": [
                {
                    "name": "General Options",
                    "content": ""
                },
                {
                    "name": "-T_",
                    "content": "Tell  tabs  which  terminal type to use.  If this option is not given, tabs will use the\n$TERM environment variable.  If that is not set, it will use the ansi+tabs entry.\n"
                },
                {
                    "name": "-d",
                    "content": "line shows the expected tab-stops marked with asterisks.  The second data line shows the\nactual tab-stops, marked with asterisks.\n",
                    "flag": "-d"
                },
                {
                    "name": "-n",
                    "content": "modify the terminal settings.\n",
                    "flag": "-n"
                },
                {
                    "name": "-V",
                    "content": "The tabs program processes a single list of tab stops.  The last option to be processed which\ndefines a list is the one that determines the list to be processed.\n",
                    "flag": "-V"
                },
                {
                    "name": "Implicit Lists",
                    "content": "Use a single number as an option, e.g., “-5” to set tabs at the given interval (in this  case\n1, 6, 11, 16, 21, etc.).  Tabs are repeated up to the right margin of the screen.\n\nUse “-0” to clear all tabs.\n\nUse “-8” to set tabs to the standard interval.\n"
                },
                {
                    "name": "Explicit Lists",
                    "content": "An  explicit  list can be defined after the options (this does not use a “-”).  The values in\nthe list must be in increasing numeric order, and greater than zero.  They are separated by a\ncomma or a blank, for example,\n\ntabs 1,6,11,16,21\ntabs 1 6 11 16 21\n\nUse a “+” to treat a number as an increment relative to the previous value, e.g.,\n\ntabs 1,+5,+5,+5,+5\n\nwhich is equivalent to the 1,6,11,16,21 example.\n"
                },
                {
                    "name": "Predefined Tab Stops",
                    "content": "POSIX defines several predefined lists of tab stops.\n"
                },
                {
                    "name": "-a",
                    "content": "1,10,16,36,72\n",
                    "flag": "-a"
                },
                {
                    "name": "-a2",
                    "content": "1,10,16,40,72\n"
                },
                {
                    "name": "-c",
                    "content": "1,8,12,16,20,55\n",
                    "flag": "-c"
                },
                {
                    "name": "-c2",
                    "content": "1,6,10,14,49\n"
                },
                {
                    "name": "-c3",
                    "content": "1,6,10,14,18,22,26,30,34,38,42,46,50,54,58,62,67\n"
                },
                {
                    "name": "-f",
                    "content": "1,7,11,15,19,23\n",
                    "flag": "-f"
                },
                {
                    "name": "-p",
                    "content": "1,5,9,13,17,21,25,29,33,37,41,45,49,53,57,61\n",
                    "flag": "-p"
                },
                {
                    "name": "-s",
                    "content": "1,10,55\n",
                    "flag": "-s"
                },
                {
                    "name": "-u",
                    "content": "1,12,20,44\n",
                    "flag": "-u"
                },
                {
                    "name": "Margins",
                    "content": "A few terminals provide the capability for changing their left/right margins.  The tabs  pro‐\ngram has an option to use this feature:\n\n+m margin\nThe effect depends on whether the terminal has the margin capabilities:\n\n•   If the terminal provides the capability for setting the left margin, tabs uses this,\nand adjusts the available width for tab-stops.\n\n•   If  the terminal does not provide the margin capabilities, tabs imitates the effect,\nputting the tab stops at the appropriate place on each line.  The  terminal's  left-\nmargin is not modified.\n\nIf  the  margin parameter is omitted, the default is 10.  Use +m0 to reset the left mar‐\ngin, i.e., to the left edge of the terminal's display.  Before  setting  a  left-margin,\ntabs  resets the margin to reduce problems which might arise on moving the cursor before\nthe current left-margin.\n\nWhen setting or resetting the left-margin, tabs may reset the right-margin.\n"
                }
            ]
        },
        "FILES": {
            "content": "/usr/share/tabset\ntab stop initialization database\n",
            "subsections": []
        },
        "PORTABILITY": {
            "content": "IEEE Std 1003.1/The Open Group Base Specifications Issue 7 (POSIX.1-2008)  describes  a  tabs\nutility.  However\n\n•   This  standard  describes  a +m option, to set a terminal's left-margin.  Very few of the\nentries  in  the  terminal  database  provide  the  smgl   (setleftmargin)   or   smglp\n(setleftmarginparm) capability needed to support the feature.\n\n•   There is no counterpart in X/Open Curses Issue 7 for this utility, unlike tput(1).\n\nThe -d (debug) and -n (no-op) options are extensions not provided by other implementations.\n",
            "subsections": []
        },
        "HISTORY": {
            "content": "A tabs utility appeared in PWB/Unix 1.0 (1977).  A reduced version shipped in Seventh Edition\nUnix  (early  1979)  and in 3BSD (later the same year); it supported a “-n” option to set the\nfirst tab stop at the left margin.  That option is not documented by POSIX.\n\nThe PWB/Unix tabs utility returned in System III (1980), and used built-in tables rather than\nthe terminal database, to support a half-dozen hardcopy terminal (printer)  types.   It  also\nhad  built-in  logic to support setting the left margin, as well as a feature for copying the\ntab settings from a file.\n\nVersions of the program in later releases of AT&T Unix, such as SVr4, added support  for  the\nterminal  database,  but retained the tables to support the printers.  In an earlier develop‐\nment effort, the tab stop initialization provided by tset(1) (1982),  and  incorporated  into\ntput(1) uses the terminal database,\n\nThe  +m  option  was documented in the POSIX Base Specifications Issue 5 (Unix98, 1997), then\nomitted in Issue 6 (Unix03, 2004) without express motivation, though an introductory  comment\n“and  optionally  adjusts  the  margin” remains, overlooked in the removal.  The tabs utility\ndocumented in Issues 6 and later has no mechanism for setting  margins.   The  +m  option  in\nncurses  tabs differs from the SVr4 feature by using terminal capabilities rather than built-\nin tables.\n\nPOSIX documents no limit on the number of tab stops.  Other implementations impose  one;  the\nlimit  is  20  in  PWB/Unix's tabs utility.  While some terminals may not accept an arbitrary\nnumber of tab stops, ncurses tabs attempts to set tab stops up to the  right  margin  if  the\nlist thereof is sufficiently long.\n\nThe  “Rationale” section of the Issue 6 tabs reference page details how the committee consid‐\nered redesigning the tabs and tput utilities, without settling on an improved  solution.   It\nclaims that\n\nno  known  historical  version  of tabs supports the capability of setting arbitrary tab\nstops.\n\nNevertheless, the feature described in subsection “Explicit Lists” above was  implemented  in\nPWB/Unix, and permits the setting of abitrary tab stops.\n",
            "subsections": []
        },
        "SEE ALSO": {
            "content": "infocmp(1), tset(1), ncurses(3NCURSES), terminfo(5)\n\nncurses 6.4                                  2023-12-23                                      tabs(1)",
            "subsections": []
        }
    },
    "summary": "tabs - set terminal tab stops",
    "flags": [
        {
            "flag": "",
            "long": null,
            "arg": null,
            "description": "Tell tabs which terminal type to use. If this option is not given, tabs will use the $TERM environment variable. If that is not set, it will use the ansi+tabs entry."
        },
        {
            "flag": "-d",
            "long": null,
            "arg": null,
            "description": "line shows the expected tab-stops marked with asterisks. The second data line shows the actual tab-stops, marked with asterisks."
        },
        {
            "flag": "-n",
            "long": null,
            "arg": null,
            "description": "modify the terminal settings."
        },
        {
            "flag": "-V",
            "long": null,
            "arg": null,
            "description": "The tabs program processes a single list of tab stops. The last option to be processed which defines a list is the one that determines the list to be processed."
        },
        {
            "flag": "-a",
            "long": null,
            "arg": null,
            "description": "1,10,16,36,72"
        },
        {
            "flag": "",
            "long": null,
            "arg": null,
            "description": "1,10,16,40,72"
        },
        {
            "flag": "-c",
            "long": null,
            "arg": null,
            "description": "1,8,12,16,20,55"
        },
        {
            "flag": "",
            "long": null,
            "arg": null,
            "description": "1,6,10,14,49"
        },
        {
            "flag": "",
            "long": null,
            "arg": null,
            "description": "1,6,10,14,18,22,26,30,34,38,42,46,50,54,58,62,67"
        },
        {
            "flag": "-f",
            "long": null,
            "arg": null,
            "description": "1,7,11,15,19,23"
        },
        {
            "flag": "-p",
            "long": null,
            "arg": null,
            "description": "1,5,9,13,17,21,25,29,33,37,41,45,49,53,57,61"
        },
        {
            "flag": "-s",
            "long": null,
            "arg": null,
            "description": "1,10,55"
        },
        {
            "flag": "-u",
            "long": null,
            "arg": null,
            "description": "1,12,20,44"
        }
    ],
    "examples": [],
    "see_also": [
        {
            "name": "infocmp",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/infocmp/1/json"
        },
        {
            "name": "tset",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/tset/1/json"
        },
        {
            "name": "ncurses",
            "section": "3NCURSES",
            "url": "https://www.chedong.com/phpMan.php/man/ncurses/3NCURSES/json"
        },
        {
            "name": "terminfo",
            "section": "5",
            "url": "https://www.chedong.com/phpMan.php/man/terminfo/5/json"
        }
    ]
}