Linux setserial command
The Linux setserial command is used to set or display information about serial ports.
setserial can be used to configure serial ports or display current settings.
Syntax
setserial [-abgGqvVz][设备][串口参数]
Parameter Description:
- -a Display detailed information.
- -b Display summary information.
- -g Display information about serial ports.
- -G Display information in the format of a command list.
- -q Display less information during execution.
- -v Display more information during execution.
- -V Display version information.
- -z Before setting, zero out all flags.
Example
Display serial port information
# setserial -g /dev/ttyS2
/dev/ttyS2, UART: unknown, Port: 0x03e8, IRQ: 4
Linux Command Reference