tmux: creating virtual linux sessions instances - jamiefogel/Networks GitHub Wiki
Creating a new linux session / instance with tmux
tmux new-session -s our_session_name
- Within this session, we can create additional sessions / instances by pressing
Ctrl-b
followed byc
(Ctrl-b, c
). This creates a new window where we can run different commands. - To switch between windows, press
Ctrl-b
followed by a number (e.g.,Ctrl-b, 0
for the first window,Ctrl-b, 1
for the second, and so on). - To detach from the current tmux session, press
Ctrl-b
followed byd
(Ctrl-b, d
).
To list all sessions:
tmux list-sessions
To recover a specific session:
tmux attach-session -t your_session_name
To rename a session:
rename-session session_name
How to run python code within tmux
Run it interactively in emacs or command line python within tmux.
To kill a session without entering it
tmux kill-session -t session_name_or_id