Feature #524
Running Detatched Terminal Sessions
Description
- Table of contents
- Screen
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).
h1 Tmux
Install tmux¶
- On Debian/Ubuntu
apt-get install tmux
- On Arch
pacman -S tmux
- On FreeBSD
pkg install tmux
Running tmux¶
- Once installed, spawn a tmux session:
tmux
- Now run what ever process that takes a long time:
cd /usr/src/project make
- While the process is running press
Ctrl + b
, thend
.
- Then reattach the session to view its progress:
tmux attach
- To list the running tmux sessions, run:
tmux list-sessions
Screen¶
Install screen¶
- On Debian/Ubuntu
apt-get install screen
- On Arch
pacman -S screen
- On FreeBSD
pkg install screen
Running screen¶
- Once installed, spawn a tmux session:
screen
- Now run what ever process that takes a long time:
cd /usr/src/project make
- While the process is running press
Ctrl + a
, thend
.
- Then reattach the session to view its progress:
screen -r
Updated by Daniel Curtis almost 10 years ago
- Description updated (diff)
- Status changed from New to Resolved
Updated by Daniel Curtis almost 10 years ago
- Status changed from Resolved to Closed
- % Done changed from 0 to 100
Updated by Daniel Curtis almost 10 years ago
- Subject changed from Run Processes Detatched From The Terminal to Running Detatched Terminal Sessions
- Description updated (diff)