I'm using screen to connect to a serial port for administering some storage hardware, but the session isn't being logged. This is the command I tried:
`/usr/bin/screen /dev/ttyUSB0 115200 -L -logfile /home/davidkmcw/Logfiles/2026-07-24_08:30:14.txt`
I have write access to the destination directory and have checked the path carefully. What am I missing?
1 Answer
The screen options need to come before the serial device and baud-rate arguments. Try putting `-L` and `-Logfile` immediately after the screen command:
`/usr/bin/screen -L -Logfile /home/davidkmcw/Logfiles/2026-07-24_08-30-14.txt /dev/ttyUSB0 115200`
The filename doesn’t need special quoting just because it contains colons; the important issue is the argument order.

That fixed it. I didn’t realize screen was that strict about the order of its command-line options.