English
English
简体中文
Register
Log In
English
English
简体中文
Register
Log In
Language
English
English
简体中文
Register
Log In

How to check the serial port number in a Linux system?

Last Updated on2025-09-01 02:57:00
1. First, if it is a virtual machine, you need to connect the removable device to the virtual machine.
2. Install the serial port driver.
3. You can use thedmesg | grep tty command to check.
For example, in the example below,ttyACM0 andttyACM1 are the serial port numbers.
Input: $ dmesg |grep tty
Output:
[ 1.405936] printk: console [tty0] enabled
[ 2.855679] 00:05: ttyS0 at I/O 0x3f8 (irq = 4, base_baud = 115200) is a 16550A
[ 5297.621624] usb 2-2.1: ch341-uart converter now attached to ttyUSB0
[ 5320.793242] ch341-uart ttyUSB0: failed to read modem status: -110
[ 5383.118225] ch341-uart ttyUSB0: failed to read modem status: -110
[ 9996.206253] ch341-uart ttyUSB0: ch341-uart converter now disconnected from ttyUSB0
[ 9997.057358] usb 2-2.1: ch341-uart converter now attached to ttyUSB0
[ 9998.585996] ch341-uart ttyUSB0: ch341-uart converter now disconnected from ttyUSB0
[24564.797290] cdc_acm 2-2.1:1.0: ttyACM0: USB ACM device
[24564.797765] cdc_acm 2-2.1:1.2: ttyACM1: USB ACM device

Click for services and help

Help Center