Skip site navigation (1)Skip section navigation (2)

FreeBSD Manual Pages


home | help
STTY(1)				 User Commands			       STTY(1)

       stty - change and print terminal	line settings

       stty [-F	DEVICE | --file=DEVICE]	[SETTING]...
       stty [-F	DEVICE | --file=DEVICE]	[-a|--all]
       stty [-F	DEVICE | --file=DEVICE]	[-g|--save]

       Print or	change terminal	characteristics.

       Mandatory  arguments  to	 long  options are mandatory for short options

       -a, --all
	      print all	current	settings in human-readable form

       -g, --save
	      print all	current	settings in a stty-readable form

       -F, --file=DEVICE
	      open and use the specified DEVICE	instead	of stdin

       --help display this help	and exit

	      output version information and exit

       Optional	- before SETTING indicates negation.   An  *  marks  non-POSIX
       settings.  The underlying system	defines	which settings are available.

   Special characters:
       * discard CHAR
	      CHAR will	toggle discarding of output

       * dsusp CHAR
	      CHAR will	send a terminal	stop signal once input flushed

       eof CHAR
	      CHAR will	send an	end of file (terminate the input)

       eol CHAR
	      CHAR will	end the	line

       * eol2 CHAR
	      alternate	CHAR for ending	the line

       erase CHAR
	      CHAR will	erase the last character typed

       intr CHAR
	      CHAR will	send an	interrupt signal

       kill CHAR
	      CHAR will	erase the current line

       * lnext CHAR
	      CHAR will	enter the next character quoted

       * status	CHAR
	      CHAR will	send an	info signal

       quit CHAR
	      CHAR will	send a quit signal

       * rprnt CHAR
	      CHAR will	redraw the current line

       start CHAR
	      CHAR will	restart	the output after stopping it

       stop CHAR
	      CHAR will	stop the output

       susp CHAR
	      CHAR will	send a terminal	stop signal

       * swtch CHAR
	      CHAR will	switch to a different shell layer

       * werase	CHAR
	      CHAR will	erase the last word typed

   Special settings:
       N      set the input and	output speeds to N bauds

       * cols N
	      tell the kernel that the terminal	has N columns

       * columns N
	      same as cols N

       * [-]drain
	      wait for transmission before applying settings (on by default)

       ispeed N
	      set the input speed to N

       min N  with -icanon, set	N characters minimum for a completed read

       ospeed N
	      set the output speed to N

       * rows N
	      tell the kernel that the terminal	has N rows

       * size print the	number of rows and columns according to	the kernel

       speed  print the	terminal speed

       time N with -icanon, set	read timeout of	N tenths of a second

   Control settings:
	      disable modem control signals

	      allow input to be	received

       * [-]crtscts
	      enable RTS/CTS handshaking

       csN    set character size to N bits, N in [5..8]

	      use two stop bits	per character (one with	'-')

       [-]hup send a hangup signal when	the last process closes	the tty

	      same as [-]hup

	      generate parity bit in output and	expect parity bit in input

	      set odd parity (or even parity with '-')

   Input settings:
	      breaks cause an interrupt	signal

	      translate	carriage return	to newline

	      ignore break characters

	      ignore carriage return

	      ignore characters	with parity errors

       * [-]imaxbel
	      beep and do not flush a full input buffer	on a character

	      translate	newline	to carriage return

	      enable input parity checking

	      clear high (8th) bit of input characters

       * [-]ixany
	      let any character	restart	output,	not only start character

	      enable sending of	start/stop characters

	      enable XON/XOFF flow control

	      mark parity errors (with a 255-0-character sequence)

	      same as [-]ixoff

   Output settings:
       * [-]ocrnl
	      translate	carriage return	to newline

       * [-]onlcr
	      translate	newline	to carriage return-newline

       * [-]onlret
	      newline performs a carriage return

       * [-]onocr
	      do not print carriage returns in the first column

	      postprocess output

       * tabN horizontal tab delay style, N in [0..3]

       * tabs same as tab0

       * -tabs
	      same as tab3

   Local settings:
	      echo erase characters as backspace-space-backspace

       * crtkill
	      kill all line by obeying the echoprt and echoe settings

       * -crtkill
	      kill all line by obeying the echoctl and echok settings

       * [-]ctlecho
	      echo control characters in hat notation ('^c')

	      echo input characters

       * [-]echoctl
	      same as [-]ctlecho

	      same as [-]crterase

	      echo a newline after a kill character

       * [-]echoke
	      same as [-]crtkill

	      echo newline even	if not echoing other characters

       * [-]echoprt
	      echo erased characters backward, between '\' and '/'

       * [-]extproc
	      enable "LINEMODE"; useful	with high latency links

       * [-]flusho
	      discard output

	      enable special characters: erase,	kill, werase, rprnt

	      enable non-POSIX special characters

	      enable interrupt,	quit, and suspend special characters

	      disable flushing after interrupt and quit	special	characters

       * [-]prterase
	      same as [-]echoprt

       * [-]tostop
	      stop background jobs that	try to write to	the terminal

   Combination settings:
       cbreak same as -icanon

	      same as icanon

       cooked same  as	brkint ignpar istrip icrnl ixon	opost isig icanon, eof
	      and eol characters to their default values

	      same as raw

       crt    same as echoe echoctl echoke

       dec    same as echoe echoctl echoke -ixany intr ^c erase	0177 kill ^u

       * [-]decctlq
	      same as [-]ixany

       ek     erase and	kill characters	to their default values

       evenp  same as parenb -parodd cs7

       -evenp same as -parenb cs8

       litout same as -parenb -istrip -opost cs8

	      same as parenb istrip opost cs7

       nl     same as -icrnl -onlcr

       -nl    same as icrnl -inlcr -igncr onlcr	-ocrnl -onlret

       oddp   same as parenb parodd cs7

       -oddp  same as -parenb cs8

	      same as [-]evenp

       pass8  same as -parenb -istrip cs8

       -pass8 same as parenb istrip cs7

       raw    same as -ignbrk -brkint -ignpar -parmrk  -inpck  -istrip	-inlcr
	      -igncr  -icrnl -ixon -ixoff -icanon -opost -isig -ixany -imaxbel
	      min 1 time 0

       -raw   same as cooked

       sane   same as cread -ignbrk brkint -inlcr -igncr icrnl	icanon	iexten
	      echo  echoe  echok  -echonl -noflsh -ixoff -ixany	imaxbel	-ocrnl
	      opost onlcr -onocr -onlret tab0 isig  -tostop  -echoprt  echoctl
	      echoke -extproc -flusho, all special characters to their default

       Handle the tty line connected to	standard  input.   Without  arguments,
       prints  baud  rate, line	discipline, and	deviations from	stty sane.  In
       settings, CHAR is taken literally, or coded as in  ^c,  0x37,  0177  or
       127; special values ^- or undef used to disable special characters.

       Written by David	MacKenzie.

       GNU coreutils online help: <>
       Report any translation bugs to <>

       Copyright  (C) 2020 Free	Software Foundation, Inc.  License GPLv3+: GNU
       GPL version 3 or	later <>.
       This is free software: you are free  to	change	and  redistribute  it.
       There is	NO WARRANTY, to	the extent permitted by	law.

       Full documentation <>
       or available locally via: info '(coreutils) stty	invocation'

GNU coreutils 8.32		  March	2020			       STTY(1)


Want to link to this manual page? Use this URL:

home | help