About Using Tmux for Time-consuming Scripts on Remote Servers

Using tmux you can start a time-consuming command on a remote server and leave it running while closing the SSH connection.

Install it on a remote Ubuntu Linux server with:

$ apt-get install tmux

Start a new tmux session with:

$ tmux

Then start any time-consuming script or command. While it's running, detach the session with:

Ctrl + b, d

Now you can log out or exit the SSH connection. After a while, reconnect to the server and reattach to the running session with:

$ tmux attach

To exit the tmux session completely, type:

$ exit

Alternatively, use Screen.

Tips and Tricks Dev Ops Developer Experience Bash SSH Tmux

Django/Python Consulting

If you have a specific Django challenge or integration you'd like to solve, I'd be happy to help. Book a free 30-minute call to discuss your project, see if we're a good fit, and explore the best approach for your needs. After the call, you'll receive a tailored cost estimate based on what we discuss.