Why isn’t screen saving my serial session to a log file?
Asked by
VelvetPanda47
I'm using screen to connect to a serial port for a storage system I administer, but the session isn't being logged. I can write to the target directory, and I've verified the path, so I'm wondering what I'm missing. This is the command I tried:
`/usr/bin/screen /dev/ttyUSB0 115200 -L -logfile /home/davidkmcw/Logfiles/2026-07-24_08:30:14.txt`
Answers
Put screen’s options before the serial device and baud-rate arguments. Try:
`/usr/bin/screen -L -Logfile /home/davidkmcw/Logfiles/2026-07-24_08-30-14.txt /dev/ttyUSB0 115200`
The option order matters here. The colon in the filename isn’t the issue on Linux.
Reply to this answer
Add your answer
Answers are reviewed before publication.
VelvetPanda47: That fixed it. I didn’t realize screen was so particular about the order of its command-line options.