$ stty -crtscts -F /dev/ttyS0
Table 4-2. stty Flags Most Relevant to Configuring Serial Devices
Flags
Description
N
Set the line speed to N bits per second.
crtsdts
Enable/Disable hardware handshaking.
ixon
Enable/Disable XON/XOFF flow control.
clocal
Enable/Disable modem control signals such as DTR/DTS and DCD. This is necessary if you are using a "three wire" serial cable because it does not supply these signals.
cs5 cs6 cs7 cs8
Set number of data bits to 5, 6, 7, or 8, respectively.
parodd
Enable odd parity. Disabling this flag enables even parity.
parenb
Enable parity checking. When this flag is negated, no parity is used.
cstopb
Enable use of two stop bits per character. When this flag is negated, one stop bit per character is used.
echo
Enable/Disable echoing of received characters back to sender.
The next example combines some of these flags and sets the ttyS0 device to 19,200 bps, 8 data bits, no parity, and hardware handshaking with echo disabled:
$ stty 19200 cs8 -parenb crtscts -echo -F /dev/ttyS0
Prev
Home
Next
Serial Hardware
Up
Serial Devices and the login: Prompt

