1. View the serial port name:
ls -l /dev/ttyS*
2. View the serial device name:
dmesg | grep ttyS*
Neither of the above two commands requires root privileges.
The first command outputs the main serial port, mine outputs /dev/ttyS0, the
second command outputs all serial port information, mine also outputs two USB information
Reference materials: https://zhidao.baidu.com/question/419148559.html link