{
    "mode": "man",
    "parameter": "ldattach",
    "section": "8",
    "url": "https://www.chedong.com/phpMan.php/man/ldattach/8/json",
    "generated": "2026-06-03T01:22:20Z",
    "synopsis": "ldattach [-1278denoVh] [-i iflag] [-s speed] ldisc device",
    "sections": {
        "NAME": {
            "content": "ldattach - attach a line discipline to a serial line\n",
            "subsections": []
        },
        "SYNOPSIS": {
            "content": "ldattach [-1278denoVh] [-i iflag] [-s speed] ldisc device\n",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "The ldattach daemon opens the specified device file (which should refer to a serial device)\nand attaches the line discipline ldisc to it for processing of the sent and/or received data.\nIt then goes into the background keeping the device open so that the line discipline stays\nloaded.\n\nThe line discipline ldisc may be specified either by name or by number.\n\nIn order to detach the line discipline, kill(1) the ldattach process.\n\nWith no arguments, ldattach prints usage information.\n",
            "subsections": []
        },
        "LINE DISCIPLINES": {
            "content": "Depending on the kernel release, the following line disciplines are supported:\n\nTTY(0)\nThe default line discipline, providing transparent operation (raw mode) as well as the\nhabitual terminal line editing capabilities (cooked mode).\n\nSLIP(1)\nSerial Line IP (SLIP) protocol processor for transmitting TCP/IP packets over serial\nlines.\n\nMOUSE(2)\nDevice driver for RS232 connected pointing devices (serial mice).\n\nPPP(3)\nPoint to Point Protocol (PPP) processor for transmitting network packets over serial\nlines.\n\nSTRIP(4); AX25(5); X25(6)\nLine driver for transmitting X.25 packets over asynchronous serial lines.\n\n6PACK(7); R3964(9)\nDriver for Simatic R3964 module.\n\nIRDA(11)\nLinux IrDa (infrared data transmission) driver - see http://irda.sourceforge.net/\n\nHDLC(13)\nSynchronous HDLC driver.\n\nSYNCPPP(14)\nSynchronous PPP driver.\n\nHCI(15)\nBluetooth HCI UART driver.\n\nGIGASETM101(16)\nDriver for Siemens Gigaset M101 serial DECT adapter.\n\nPPS(18)\nDriver for serial line Pulse Per Second (PPS) source.\n\nGSM0710(21)\nDriver for GSM 07.10 multiplexing protocol modem (CMUX).\n",
            "subsections": []
        },
        "OPTIONS": {
            "content": "",
            "subsections": [
                {
                    "name": "-1 --onestopbit",
                    "content": "Set the number of stop bits of the serial line to one.\n",
                    "flag": "-1",
                    "long": "--onestopbit"
                },
                {
                    "name": "-2 --twostopbits",
                    "content": "Set the number of stop bits of the serial line to two.\n",
                    "flag": "-2",
                    "long": "--twostopbits"
                },
                {
                    "name": "-7 --sevenbits",
                    "content": "Set the character size of the serial line to 7 bits.\n",
                    "flag": "-7",
                    "long": "--sevenbits"
                },
                {
                    "name": "-8 --eightbits",
                    "content": "Set the character size of the serial line to 8 bits.\n",
                    "flag": "-8",
                    "long": "--eightbits"
                },
                {
                    "name": "-d --debug",
                    "content": "Keep ldattach in the foreground so that it can be interrupted or debugged, and to print\nverbose messages about its progress to standard error output.\n",
                    "flag": "-d",
                    "long": "--debug"
                },
                {
                    "name": "-e --evenparity",
                    "content": "Set the parity of the serial line to even.\n",
                    "flag": "-e",
                    "long": "--evenparity"
                },
                {
                    "name": "-i --iflag",
                    "content": "Set the specified bits in the ciflag word of the serial line. The given value may be a\nnumber or a symbolic name. If value is prefixed by a minus sign, the specified bits are\ncleared instead. Several comma-separated values may be given in order to set and clear\nmultiple bits.\n",
                    "flag": "-i",
                    "long": "--iflag"
                },
                {
                    "name": "-n --noparity",
                    "content": "Set the parity of the serial line to none.\n",
                    "flag": "-n",
                    "long": "--noparity"
                },
                {
                    "name": "-o --oddparity",
                    "content": "Set the parity of the serial line to odd.\n",
                    "flag": "-o",
                    "long": "--oddparity"
                },
                {
                    "name": "-s --speed",
                    "content": "Set the speed (the baud rate) of the serial line to the specified value.\n",
                    "flag": "-s",
                    "long": "--speed"
                },
                {
                    "name": "-c --intro-command",
                    "content": "Define an intro command that is sent through the serial line before the invocation of\nldattach. E.g. in conjunction with line discipline GSM0710, the command 'AT+CMUX=0\\r' is\ncommonly suitable to switch the modem into the CMUX mode.\n",
                    "flag": "-c",
                    "long": "--intro-command"
                },
                {
                    "name": "-p --pause",
                    "content": "Sleep for value seconds before the invocation of ldattach. Default is one second.\n",
                    "flag": "-p",
                    "long": "--pause"
                },
                {
                    "name": "-V --version",
                    "content": "Display version information and exit.\n",
                    "flag": "-V",
                    "long": "--version"
                },
                {
                    "name": "-h --help",
                    "content": "Display help text and exit.\n",
                    "flag": "-h",
                    "long": "--help"
                }
            ]
        },
        "AUTHORS": {
            "content": "Tilman Schmidt <tilman@imap.cc>\n",
            "subsections": []
        },
        "SEE ALSO": {
            "content": "inputattach(1), ttys(4)\n",
            "subsections": []
        },
        "REPORTING BUGS": {
            "content": "For bug reports, use the issue tracker at https://github.com/karelzak/util-linux/issues.\n",
            "subsections": []
        },
        "AVAILABILITY": {
            "content": "The ldattach command is part of the util-linux package which can be downloaded from Linux\nKernel Archive <https://www.kernel.org/pub/linux/utils/util-linux/>.\n\n\n\nutil-linux 2.37.2                            2021-06-02                                  LDATTACH(8)",
            "subsections": []
        }
    },
    "summary": "ldattach - attach a line discipline to a serial line",
    "flags": [
        {
            "flag": "-1",
            "long": "--onestopbit",
            "arg": null,
            "description": "Set the number of stop bits of the serial line to one."
        },
        {
            "flag": "-2",
            "long": "--twostopbits",
            "arg": null,
            "description": "Set the number of stop bits of the serial line to two."
        },
        {
            "flag": "-7",
            "long": "--sevenbits",
            "arg": null,
            "description": "Set the character size of the serial line to 7 bits."
        },
        {
            "flag": "-8",
            "long": "--eightbits",
            "arg": null,
            "description": "Set the character size of the serial line to 8 bits."
        },
        {
            "flag": "-d",
            "long": "--debug",
            "arg": null,
            "description": "Keep ldattach in the foreground so that it can be interrupted or debugged, and to print verbose messages about its progress to standard error output."
        },
        {
            "flag": "-e",
            "long": "--evenparity",
            "arg": null,
            "description": "Set the parity of the serial line to even."
        },
        {
            "flag": "-i",
            "long": "--iflag",
            "arg": null,
            "description": "Set the specified bits in the ciflag word of the serial line. The given value may be a number or a symbolic name. If value is prefixed by a minus sign, the specified bits are cleared instead. Several comma-separated values may be given in order to set and clear multiple bits."
        },
        {
            "flag": "-n",
            "long": "--noparity",
            "arg": null,
            "description": "Set the parity of the serial line to none."
        },
        {
            "flag": "-o",
            "long": "--oddparity",
            "arg": null,
            "description": "Set the parity of the serial line to odd."
        },
        {
            "flag": "-s",
            "long": "--speed",
            "arg": null,
            "description": "Set the speed (the baud rate) of the serial line to the specified value."
        },
        {
            "flag": "-c",
            "long": "--intro-command",
            "arg": null,
            "description": "Define an intro command that is sent through the serial line before the invocation of ldattach. E.g. in conjunction with line discipline GSM0710, the command 'AT+CMUX=0\\r' is commonly suitable to switch the modem into the CMUX mode."
        },
        {
            "flag": "-p",
            "long": "--pause",
            "arg": null,
            "description": "Sleep for value seconds before the invocation of ldattach. Default is one second."
        },
        {
            "flag": "-V",
            "long": "--version",
            "arg": null,
            "description": "Display version information and exit."
        },
        {
            "flag": "-h",
            "long": "--help",
            "arg": null,
            "description": "Display help text and exit."
        }
    ],
    "examples": [],
    "see_also": [
        {
            "name": "inputattach",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/inputattach/1/json"
        },
        {
            "name": "ttys",
            "section": "4",
            "url": "https://www.chedong.com/phpMan.php/man/ttys/4/json"
        }
    ]
}