Project

General

Profile

Feature #524

Updated by Daniel Curtis almost 10 years ago

From time to time I need to compile a program and close my ssh session, and doing this will kill all running processes spawned from the session it was created from. Luckily there is a handy tool called @tmux@ that will keep processes launched from within the tmux session from dying, even after logging out (as long as the system is running). 

 h2. Install tmux 

 * On Debian/Ubuntu 
 <pre> 
 apt-get install tmux 
 </pre> 

 * On Arch 
 <pre> 
 pacman -S tmux 
 </pre> 

 * On FreeBSD 
 <pre> 
 pkg install tmux 
 </pre> 

 h2. Running tmux 

 * Once installed, spawn a tmux session: 
 <pre> 
 tmux 
 </pre> 

 * Now run what ever process that takes a long time: 
 <pre> 
 cd /usr/src/project 
 make 
 </pre> 

 * While the process is running press +@Ctrl + B@+, then +@D@+. 

 * Then reattach the session to view its progress: 
 <pre> 
 tmux attach 
 </pre> 

 * To list the running tmux sessions, run: 
 <pre> 
 tmux list-sessions 
 </pre>

Back