aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorJohannes Stoelp <johannes.stoelp@gmail.com>2024-08-29 00:27:30 +0200
committerJohannes Stoelp <johannes.stoelp@gmail.com>2024-08-29 00:30:20 +0200
commitd103148e8528e06583128f2acfc27fd160084c77 (patch)
treeb6fca3d610ac3cbac7d287d5ec33f33fbff888d2 /src
parentdfb198cc07f8774e192279b18b4deb5e4275a4d0 (diff)
downloadnotes-d103148e8528e06583128f2acfc27fd160084c77.tar.gz
notes-d103148e8528e06583128f2acfc27fd160084c77.zip
screen: basics + usb serial console
Diffstat (limited to 'src')
-rw-r--r--src/SUMMARY.md1
-rw-r--r--src/tools/README.md1
-rw-r--r--src/tools/screen.md42
3 files changed, 44 insertions, 0 deletions
diff --git a/src/SUMMARY.md b/src/SUMMARY.md
index d5dcc82..c47d389 100644
--- a/src/SUMMARY.md
+++ b/src/SUMMARY.md
@@ -18,6 +18,7 @@
- [Tools](./tools/README.md)
- [tmux](./tools/tmux.md)
+ - [screen](./tools/screen.md)
- [emacs](./tools/emacs.md)
- [gpg](./tools/gpg.md)
- [radare2](./tools/radare2.md)
diff --git a/src/tools/README.md b/src/tools/README.md
index 6538ce3..35584a5 100644
--- a/src/tools/README.md
+++ b/src/tools/README.md
@@ -1,6 +1,7 @@
# Tools
- [tmux](./tmux.md)
+- [screen](./screen.md)
- [emacs](./emacs.md)
- [gpg](./gpg.md)
- [radare2](./radare2.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
+```