LDATTACH(8)

โœจ LDATTACH ๐Ÿ’…

okay bestie, welcome to ldattach from section 8 of the manual (that's the System Administration girlies, we're in the sysadmin section, iykyk ๐ŸŽ€). she's a little daemon that attaches a line discipline to a serial line and then just... vibes in the background forever. main character energy fr fr.


๐ŸŒธ NAME ๐ŸŒธ

ldattach โ€” attach a line discipline to a serial line ๐Ÿฆ‹


๐ŸŽ€ SYNOPSIS ๐ŸŽ€

ldattach [-1278denoVh] [-i iflag] [-s speed] [-m mtu] ldisc device

๐Ÿ’– DESCRIPTION ๐Ÿ’–

so. the ldattach daemon opens the device file you give it (and bestie, that file should be pointing at a serial device, that's the whole point ๐Ÿ™ˆ), and then it attaches the line discipline ldisc to it, so that discipline can process the data being sent and/or received. then it dips into the background while keeping the device open, which is the entire trick โ€” that's how the line discipline stays loaded. iconic behaviour honestly. โœจ

you can name the line discipline ldisc either by name or by number, dealer's choice ๐Ÿ’….

want to detach that line discipline again? just kill(1) the ldattach process. bye girl ๐Ÿ‘‹

and if you run it with no arguments at all, ldattach just prints usage information. she's not gonna guess what you want, bestie ๐Ÿ˜ญ


๐ŸŒˆ LINE DISCIPLINES ๐ŸŒˆ

depending on your kernel release, the following line disciplines are supported (yes, "depending on your kernel release", so if one of these isn't there it's not you, it's the kernel ๐Ÿซถ):

  • TTY(0) โ€” the default line discipline, giving you transparent operation (raw mode) plus the habitual terminal line editing capabilities (cooked mode). she does both, versatile queen ๐Ÿ‘‘
  • SLIP(1) โ€” Serial Line IP (SLIP) protocol processor, for transmitting TCP/IP packets over serial lines.
  • MOUSE(2) โ€” device driver for RS232 connected pointing devices, aka serial mice. ๐Ÿญ retro cutie
  • PPP(3) โ€” Point to Point Protocol (PPP) processor, for transmitting network packets over serial lines.
  • STRIP(4); AX25(5); X25(6) โ€” line driver for transmitting X.25 packets over asynchronous serial lines.
  • 6PACK(7); R3964(9) โ€” driver for Simatic R3964 module.
  • IRDA(11) โ€” Linux IrDa (infrared data transmission) driver โ€” see http://irda.sourceforge.net/ โœจ
  • HDLC(13) โ€” synchronous HDLC driver.
  • SYNC_PPP(14) โ€” synchronous PPP driver.
  • HCI(15) โ€” Bluetooth HCI UART driver. ๐Ÿฆ‹
  • GIGASET_M101(16) โ€” driver for Siemens Gigaset M101 serial DECT adapter.
  • PPS(18) โ€” driver for serial line Pulse Per Second (PPS) source. โฑ๏ธ
  • GSM0710(21) โ€” driver for GSM 07.10 multiplexing protocol modem (CMUX).

โœจ OPTIONS โœจ

one bullet per flag, no skipping, we read them all in this house ๐Ÿ’…

  • -1, --onestopbit โ€” set the number of stop bits of the serial line to one.
  • -2, --twostopbits โ€” set the number of stop bits of the serial line to two.
  • -7, --sevenbits โ€” set the character size of the serial line to 7 bits.
  • -8, --eightbits โ€” set the character size of the serial line to 8 bits.
  • -d, --debug โ€” keeps ldattach in the foreground so it can be interrupted or debugged, and prints verbose messages about its progress to standard error output. ngl this is the one you want when things get weird ๐Ÿ”
  • -e, --evenparity โ€” set the parity of the serial line to even.
  • -i, --iflag value... โ€” set the specified bits in the c_iflag 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, so you can set and clear multiple bits at once. multitasking queen โœจ
  • -n, --noparity โ€” set the parity of the serial line to none.
  • -o, --oddparity โ€” set the parity of the serial line to odd.
  • -s, --speed value โ€” set the speed (the baud rate) of the serial line to the specified value.
  • -c, --intro-command string โ€” 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. she announces herself before entering the room ๐Ÿ’…
  • -p, --pause value โ€” sleep for value seconds before the invocation of ldattach. default is one second. beauty rest ๐Ÿ˜ด
  • -m, --mtu value โ€” set maximum frame size for GSM0710 CMUX. if not specified, traditionally the default of 127 has been set by ldattach. this differs from 3GPP TS 27.010 default value of 31 bytes, so it is recommended to specify
  • -h, --help โ€” display help text and exit.
  • -V, --version โ€” display version and exit.
okay bestie quick vibe check: that -m description literally ends mid-sentence in the original ("so it is recommended to specify") and I am not going to invent an ending for it. the facts stay exactly as they are, no cap ๐Ÿค

๐Ÿ‘‘ AUTHORS ๐Ÿ‘‘

Tilman Schmidt <tilman@imap.cc>


๐Ÿฆ‹ SEE ALSO ๐Ÿฆ‹

inputattach(1), ttys(4)


๐Ÿ™ˆ REPORTING BUGS ๐Ÿ™ˆ

for bug reports, use the issue tracker at https://github.com/util-linux/util-linux/issues. tell them everything, they're nice ๐Ÿ’œ


โญ AVAILABILITY โญ

the ldattach command is part of the util-linux package, which can be downloaded from the Linux Kernel Archive at https://www.kernel.org/pub/linux/utils/util-linux/.


and that's the whole page, bestie ๐Ÿ’– this one's running on util-linux 2.42.4, dated 2026-09-21, and it's still out here living in the LDATTACH(8) lane. go attach something. slay. periodt. ๐ŸŽ€โœจ

๐Ÿ“ฆ where this page comes from
  • arch rolling: util-linux 2.42.4-1 ยท BSD-2-Clause AND BSD-3-Clause AND BSD-4-Clause-UC AND GPL-2.0-only AND GPL-2.0-or-later AND GPL-3.0-or-later AND ISC AND LGPL-2.1-or-later AND LicenseRef-PublicDomain
  • ๐Ÿ’– girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms