faq-running-remote-jobs-after-disconnecting.md
... ...
@@ -59,3 +59,56 @@ name of your workstation
59 59
For more information, see [the screen
60 60
manual](https://www.gnu.org/software/screen/manual/html_node/index.html).
61 61
62
+## `tmux`
63
+
64
+`tmux` is a newer alternative to `screen`. The same approach is used -
65
+ connect to the remote system, start a `tmux` session, start the job,
66
+disconnect from the `tmux` session, and log-out.
67
+
68
+start session | `tmux`
69
+
70
+disconnect from session | `<ctrl-b d>` (control b + "d")
71
+
72
+re-connect to existing session | `tmux a`
73
+
74
+check for existing sessions | `tmux ls`
75
+
76
+quit tmux session | `exit`
77
+
78
+### example `tmux` file transfer
79
+
80
+`localsys> ssh [meyer@xtal200.harvard.edu](mailto:meyer@xtal200.harvard.edu)`
81
+# connect to remote system
82
+
83
+`crystal> tmux ` # start tmux session
84
+
85
+`crystal> scp -r -p meyer@remote_site:~/data/ ~/data/` # start data transfer
86
+
87
+`crystal> <ctrl-b d>` # disconnect from tmux session
88
+
89
+`crystal> logout` # disconnect from remote system
90
+
91
+`localsys>` # all done
92
+
93
+### example `tmux` computational job
94
+
95
+`localsys> ssh [meyer@xtal200.harvard.edu](mailto:meyer@xtal200.harvard.edu)`
96
+# connect to remote gateway system
97
+
98
+`crystal> ssh abacus` # connect to your workstation; replace `abacus` with the
99
+name of your workstation
100
+
101
+`abacus> tmux` # start tmux session
102
+
103
+`abacus> ./data_processing_script.sh` # start processing data
104
+
105
+`abacus> <ctrl-b d>` # disconnect from tmux session
106
+
107
+`abacus> logout` # disconnect from workstation
108
+
109
+`crystal> logout` # disconnect from gateway system
110
+
111
+`localsys>` # all done
112
+
113
+For more information, see [the tmux homepage](https://github.com/tmux/tmux).
114
+