From d103148e8528e06583128f2acfc27fd160084c77 Mon Sep 17 00:00:00 2001 From: Johannes Stoelp Date: Thu, 29 Aug 2024 00:27:30 +0200 Subject: screen: basics + usb serial console --- src/tools/screen.md | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 src/tools/screen.md (limited to 'src/tools/screen.md') diff --git a/src/tools/screen.md b/src/tools/screen.md new file mode 100644 index 0000000..d3da2ef --- /dev/null +++ b/src/tools/screen.md @@ -0,0 +1,42 @@ +# screen(1) + +```sh +# Create new session. +screen + +# List active session. +screen -list + +# Attach to specific session. +screen -r SESSION +``` + +## Options +```sh +# Enable logfile, default name screenlog.0. +screen -L +# Enable log and set logfile name. +screen -L -Logfile out.txt +``` + +## Keymaps +```sh +Ctrl-A d # Detach from session. +Ctrl-A + \ # Terminate session. +Ctrl-A + : # Open cmand prompt. + kill # Kill session. +``` + +## Examples +USB serial console. +```sh +# 1500000 -> baudrate +# cs8 -> 8 data bits +# -cstopb -> 1 stop bit +# -parenb -> no parity bit +# see stty(1) for all settings. +screen /dev/ttyUSB0 1500000,cs8,-cstopb,-parenb + +# Print current tty settings. +sudo stty -F /dev/ttyUSB0 -a +``` -- cgit v1.2.3