一,查看系统是否支持串口
[root@localhost ~]# dmesg |grep tty
console [tty0] enabled
serial8250: ttyS0 at I/O 0x3f8 (irq = 3) is a 16550A
serial8250: ttyS1 at I/O 0x2f8 (irq = 4) is a 16550A
00:09: ttyS0 at I/O 0x3f8 (irq = 3) is a 16550A
00:0a: ttyS1 at I/O 0x2f8 (irq = 4) is a 16550A
二,Centos7下串口配置
1,修改/etc/defaule/grub,增加:
GRUB_TERMINAL="console serial"
GRUB_SERIAL_COMMAND="serial --speed=115200 --unit=0 --word=8 --parity=no --stop=1"
GRUB_CMDLINE_LINUX_DEFAULT="console=tty1 console=ttyS0,115200"
[root@localhost ~]# vi /etc/default/grub
GRUB_TIMEOUT=5
GRUB_DISTRIBUTOR="$(sed 's, release .*$,,g' /etc/system-release)"
GRUB_DEFAULT=saved
GRUB_DISABLE_SUBMENU=true
<