Skip to content

Instantly share code, notes, and snippets.

@mbentley
Last active August 8, 2022 22:05
Show Gist options
  • Save mbentley/4de3a6e4bb4ff432fca20dec51d54a52 to your computer and use it in GitHub Desktop.
Save mbentley/4de3a6e4bb4ff432fca20dec51d54a52 to your computer and use it in GitHub Desktop.
Enable ttyS0 (Ubuntu 14.04 and Debian 8 (jessie)
### debian 8 (jessie)
mkdir /etc/systemd/system/serial-getty@ttyS0.service.d &&\
echo '[Service]
Environment="TERM=xterm"' > /etc/systemd/system/serial-getty@ttyS0.service.d/xterm.conf
systemctl daemon-reload &&\
systemctl enable serial-getty@ttyS0.service &&\
systemctl start serial-getty@ttyS0.service &&\
systemctl status serial-getty@ttyS0.service
### ubuntu 14.04
echo '# ttyS0 - getty
#
# This service maintains a getty on ttyS0 from the point the system is
# started until it is shut down again.
start on stopped rc RUNLEVEL=[2345]
stop on runlevel [!2345]
respawn
exec /sbin/getty -L 115200 ttyS0 xterm' > /etc/init/ttyS0.conf &&\
start ttyS0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment