diff --git a/rstudio1.md b/rstudio1.md index 6af6a929ad909780cd7d312ec33344d812c9e291..13ebd9257c0214a42b0eb7071487611f738a8d52 100644 --- a/rstudio1.md +++ b/rstudio1.md @@ -33,5 +33,5 @@ This is about \\idiv.de\public\homes. To make it available on the rstudio server ``` su - $USER ``` -You will be asked to enter your password again and afterwards your network home will be available at `~/winhome`. However, it will only stay mounted until you log out. If you have any longer running jobs you might want to consider either moving stuff from the ~/winhome to /data or open a tmux session from which you detach (Ctrl+b, d) before you disconnect. +You will be asked to enter your password again and afterwards your network home will be available at `~/winhome`. However, it will only stay mounted until you log out. If you have any longer running jobs you might want to consider either moving stuff from the ~/winhome to /data or open a [tmux](tmux.md) session from which you detach (Ctrl+b, d) before you disconnect. diff --git a/tmux.md b/tmux.md new file mode 100644 index 0000000000000000000000000000000000000000..1b2f8a0c83c01ba8d76f309ab3f5a2bb6f300ec7 --- /dev/null +++ b/tmux.md @@ -0,0 +1,32 @@ +# tmux +tmux is a so called terminal multiplexer. A what? It allows you to have multiple terminal sessions inside of one terminal session. It also allows you to connect and disconnect from these sessions and organize them in multiple ways (panes, window). + +## Usage +Simply invoke `tmux` to start a new tmux session. You will notice a new (customizable) status bar at the bottom of your terminal. To control tmux you need to enter a prefix (default Ctrl+b). The following prefixes are interpreted as commands to tmux. + +key | command +------------| +? | help +[ | activate scroll mode, you need this to navigate through longer output, leave with ESC +d | detaches from current session and gets you back to plain terminal +$ | renames current session +c | creates a new window +& | kills the current window (confirm with y) +n | switch to next window +p | switch to previous window +% | splits the current pane in two vertical panes +" | splits the current pane into two horizontal panes +cursor keys | switches between panes +! | break out current pane to new window + +## Walkthrough: detaching and attaching + +{{{bash +tmux +Ctrg+b, $, mysession +echo "I am in tmux" +Ctrl+b, d +echo "I am a plain terminal" +tmux ls +tmux a -t mysession +}}}