I use echo xxx > /dev/ttySxxx to send command to tty. When I do this first time, I must set baut rate. After once, I needn't. So, where does the kernel keep the serial port config?


On Debian I found a copy of /etc/serial.conf in /var/lib/setserial. After using

# dpkg-reconfigure setserial 

the /etc/serial.conf is gone, and appears in /var/lib/setserial/etc.serial.conf

  • 1
    That's not where the kernel keeps things, though. – Henning Makholm Oct 24 '17 at 22:37
  • Another place is /proc/tty/driver/serial - only root could see it. In meaning that you set Baud rate it is stored in the UART chip (UART has several settings what could be changed and stored until you want to modify). Initial setup (boot time - using setserial) was stored in /etc/serial.conf, and now seem, to me in /var/lib/setserial too. – tovis Oct 26 '17 at 8:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.