{
    "mode": "man",
    "parameter": "tabs",
    "section": "1",
    "url": "https://www.chedong.com/phpMan.php/man/tabs/1/json",
    "generated": "2026-06-13T20:01:06Z",
    "synopsis": "tabs [options]] [tabstop-list]",
    "sections": {
        "NAME": {
            "content": "tabs - set tabs on a terminal\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",
                    "flag": "-T"
                },
                {
                    "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"
                }
            ]
        },
        "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\nA tabs utility appeared in PWB/Unix 1.0 (1977).  There was a  reduced  version  of  the  tabs\nutility  in  Unix  7th edition and in 3BSD (1979).  The latter supported a single “-n” option\n(to cause the first tab stop to be set on the left margin).  That option is not documented by\nPOSIX.\n\nThe  PWB/Unix  tabs  utility,  which  was included in System III (1980), used built-in tables\nrather than the terminal database, to support a half-dozen hardcopy terminal (printer) types.\nIt  also  had built-in logic to support the left-margin, as well as a feature for copying the\ntab settings from a file.\n\nLater versions of Unix, e.g., SVr4, added support for the terminal database, but kept the ta‐\nbles  to support the printers.  In an earlier development effort, the tab-stop initialization\nprovided by tset (1982) and incorporated into tput uses the terminal database,\n\nThe +m option was documented in the Base Specifications Issue 5 (Unix98, 1997),  and  omitted\nin  Issue  6 (Unix03, 2004) without documenting the rationale, though an introductory comment\n“and optionally adjusts the margin” remains, overlooked in the removal.  The documented  tabs\nutility  in  Issues  6 and later has no mechanism for setting margins.  The +m option in this\nimplementation differs from the feature in SVr4 by using terminal  capabilities  rather  than\nbuilt-in tables.\n\nPOSIX  documents  no  limits on the number of tab stops.  Documentation for other implementa‐\ntions states that there is a limit on the number of tab stops (e.g., 20  in  PWB/Unix's  tabs\nutility).   While some terminals may not accept an arbitrary number of tab stops, this imple‐\nmentation will attempt to set tab stops up to the right margin of the screen,  if  the  given\nlist happens to be that long.\n\nThe  Rationale  section  of  the POSIX documentation goes into some detail about the ways the\ncommittee considered redesigning the tabs and tput utilities, without proposing  an  improved\nsolution.  It comments that\n\nno  known  historical  version  of tabs supports the capability of setting arbitrary tab\nstops.\n\nHowever, the Explicit Lists described in this  manual  page  were  implemented  in  PWB/Unix.\nThose provide the capability of setting abitrary tab stops.\n",
            "subsections": []
        },
        "SEE ALSO": {
            "content": "infocmp(1), tset(1), ncurses(3NCURSES), terminfo(5).\n\nThis describes ncurses version 6.3 (patch 20211021).\n\n\n\ntabs(1)",
            "subsections": []
        }
    },
    "summary": "tabs - set tabs on a terminal",
    "flags": [
        {
            "flag": "-T",
            "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"
        }
    ]
}