Tmux
- Categories:
- console
Permasalahan utama saat melakukan koneksi SSH di jaringan yang kurang stabil adalah ketika lost connection ssh session menghilang.
Masalah ini dipecahkan oleh tool bernama Screen dan Tmux. Saya sendiri lebih memilih Tmux karena entah kenapa lebih enak dalam menggunakannya.
Dasar - Dasar Tmux
Buat Session Baru
tmux new -s example
Buka Tab Baru
Ctrl + b
kemudian tekanc
Ctrl + b
kemudian tekan angka0
atau1
dan seterusnya untuk memilih tab
Detach session
Ctrl + b
kemudian tekand
Attach session
tmux attach
tmux attach -t example
tmux a -t example
List Session
tmux list
Kill session Tmux
tmux kill-session -t example
Contoh penggunaan
- SSH ke server
- Jalankan Tmux di server:
tmux new -s example
- Jalankan sesuatu di server, misal unzip file yang cukup besar
- Detach Tmux
Ctrl+b d
- Exit ssh, lakukan hal lain
- Kembali ssh dan attach session Tmux
tmux a -t example
- Maka otomatis akan lanjut ke proses unzip pada langkah ketiga diatas
Berikut beberapa artikel menarik tentang Tmux.
Recent Posts
AWS Secrets Manager
Explanation about AWS Secrets Manager with example code.
Envelope Encryption
Envelope encryption is the practice of encrypting plaintext data with a data key, and then encrypting the data key under another key.
Tutorial - "su username vs su - username" - A Security Perspective
The main difference between `su username` and `su - username` lies in the environment variables that are loaded when switching to the specified user.
Subdomain Hijacking
My dormant subdomain was recently hijacked, redirecting it to a online gamble registration page.
C# DbContext ServiceLifeTime
my note about C Sharp ServiceLifeTime