Screen USB/Serial Ubuntu

Connecting to Serial Devices Using screen on Ubuntu
System and network administrators often need to configure routers, switches, firewalls, or other manageable devices via serial ports. One reliable tool for this task is screen, a lightweight terminal multiplexer that also supports serial communication.

Here’s how I use screen to connect to serial devices on Ubuntu.

🛠️ Step-by-Step Guide

1. Install screen

sudo apt-get install screen

You can verify installation or explore options:

screen --help

2. Identify the Serial Port
Plug in your USB-to-Serial adapter and check which device it’s mapped to:

dmesg | grep tty

Example output:

usb 3-1: pl2303 converter now attached to ttyUSB0

This means your device is accessible via /dev/ttyUSB0.

3. Connect Using screen
Use the following command to initiate the serial connection:

sudo screen /dev/ttyUSB0 9600

  • Replace /dev/ttyUSB0 with your actual device path.
  • 9600 is the baud rate—adjust it based on your device’s specs.

🔚 To Exit screen
Press:

Ctrl + A, then K

Then confirm with y to kill the session.