Wednesday, March 1, 2023

How to use tmux



Select current value



1. Create a new tmux session

tmux new -s logjob

2. Run your job inside tmux

tail -f /var/log/syslog

3. Disconnect (detach) from the tmux session

Ctrl + b, then d

4. List tmux sessions (optional)

tmux ls

5. Reconnect (attach) to the session

tmux attach -t logjob

6. Kill the session when done

tmux kill-session -t logjob

7. Create session and run job in one command

tmux new -s logjob "python log_job.py"

8. Detach from outside (if attached elsewhere)

tmux detach -s logjob



apt-key warning when sudo apt update run

Issue: apt-key warning when sudo apt update run Update below file: cat /etc/apt/sources.list.d/download_docker_com_linux_ubuntu.list ...