Linux – How does cat know the baud rate of the serial port

deviceslinuxserial port

I regularly use cat to view debugging information in the console from my FPGA development board over the serial connection, but I never have had to tell linux what the baud rate is. How does cat know what the baud rate of the serial connection is?

Best Answer

The stty utility sets or reports on terminal I/O characteristics for the device that is its standard input. These characteristics are used when establishing a connection over that particular medium. cat doesn't know the baud rate as such, it rather prints on the screen information received from the particular connection.

As an example stty -F /dev/ttyACM0 gives the current baud rate for the ttyACM0 device.

Related Question