How Do I Connect to a Serial Device in Linux?

Last Update: May 7th, 2026
Article ID: 1216986

You can send and receive data from serial devices in Linux using command-line utilities like Screen or Minicom, or by redirecting the echo command. Before establishing a connection, you must identify the correct serial port path, which is typically found at /dev/ttyUSB0 for USB serial adapters.

How to Identify the Serial Port

  1. Connect the serial adapter to the computer.

  2. Open a terminal and run dmesg | tail to look for the attached converter path, or run ls -tr1 /dev/tty* | tail -n 1 to print the newest created serial adapter.

How to Connect Using Screen

  1. Run screen /dev/ttyUSB0 9600 in the terminal to transmit and read text.

  2. Disconnect while leaving the session open by pressing Ctrl+a then Ctrl+d, or quit completely by pressing Ctrl+a then k, and 'y' to kill the session.

How to Connect Using Minicom

  1. Run minicom -b 9600 -D /dev/ttyUSB0 to open an interface to send text.

  2. Quit the application by pressing Ctrl+a, then z, then x.

  3. Configure presets using the setup mode by running minicom -s.

How to Write Directly to the Serial Device

  1. Set the port speed with stty -F /dev/ttyUSB0 speed 9600.

  2. Send text for one-way communication by running echo helloworld >/dev/ttyUSB0.

Workarounds for Serial Device Errors

  • Resolve permission denied errors by adding your user account to the 'dialout' group or the group with control of the serial port. Check group ownership with ls -l /dev/ttyUSB0 and add your account by running sudo usermod -a $(whoami) -G dialout, then log out and back in or restart the computer for the changes to take effect.

  • Fix scrambled text by correcting baud rate mismatches on either the computer or the device. Check the device's sticker or user manual for the correct port settings and configure them accordingly.

Applicable To

PL2303-DB9