Why isn’t screen saving my serial session to a log file?

August 6, 2026 1 answer
Asked by VelvetPine42
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?

Answers

CopperMango7
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.

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

Reply to this answer

Add your answer

Answers are reviewed before publication.

Related Discussions