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