Trying to enable serial console on Windows Subsystem for Linux

3 posts / 0 new
Last post
Internetronic's picture
Offline
Last seen: 1 year 5 months ago
Joined: Jan 28 2016 - 21:29
Posts: 14
Trying to enable serial console on Windows Subsystem for Linux

I am trying to enable the serial console on Windows Subsystem for Linux (WSL), if that is possible. I've got Ubuntu running in Windows, and MODEM.MGR on my Apple //e. The screen and minicom commands work, as does ADTPro, so the PC and Apple are definitely talking to each other. (I am using a USB-to-DB25 cable connected to my //e's Super Serial Card.)

However, when I try to figure out how to create a serial console on the //e, the guides I've found don't help. On the Raspberry Pi, it is a very simple process. You just use this command:

sudo systemctl start serial-getty@ttyUSB0.service

The problem is that WSL does not have systemd, and therefore there is no systemctl command.

The few guides I found don't seem to apply to WSL. This one works until I have to edit /etc/inittab, which is not in WSL. This one works until I have to mess with /etc/ttys, also not available in WSL.

Is there any way to do this?

Thanks!

Internetronic's picture
Offline
Last seen: 1 year 5 months ago
Joined: Jan 28 2016 - 21:29
Posts: 14
Also, my Super Serial Card's

Also, my Super Serial Card's modem chip is currently facing down towards "Terminal". I tried facing it up towards "Modem" (as per one of the guides) but that only had the effect of breaking screen/minicom/PuTTY, so I put it back for the time being.

Kotomo's picture
Offline
Last seen: 2 years 6 months ago
Joined: Aug 19 2021 - 00:01
Posts: 4
I am honestly not sure about

I am honestly not sure about running any daemons/services in WSL as I don't mess around with it too much(I just full time bare metal Linux) but I believe you should still be able to run a serial console.  

serial-getty@.service just starts 'agetty' command.  As a test, start a serial terminal manually with: 

 

sudo agetty -L 1200 ttyUSB0 vt100

 

You can substitute the baudrate for what you think it should be, along with the terminal type.  I am basing that command off of Paul Weinstein's blog about starting getty on his Mac Mini.  Also not sure if your USB-to-Serial adapter shows up as /dev/ttyUSB0 in WSL (chances are it does).  

 

If it all works, your console will be running in that WSL terminal window.  If you close the window or Ctrl-C the command it will kill it.  

 

Hope this helps.

Log in or register to post comments