Sunday, 9 December 2018


Get Tmux

# sudo apt-get update
# sudo apt-get install tmux

Start New session on Tmux

# tmux

// list-sessions to identify the session you want to kill, 
# tmux list-sessions

// Kill a session
# tmux kill-session -t targetSession 

// Connect to an existing session
# tmux attach -t n(n is the session number)
Download my colleague Jun's bash config With this config file, we can use CTRL + A + % to do vertical split, and CTRL + A + " to do horizontal split

// tmux shared session(user must have root prvileldege)
sudo su - user_name_here (if already logged in as root user, just need sudo su to get root priviledge, so don't need to sudo XXXX every time)
tmux attach -t shared (tmux )

Tmux session will be gone when Linux server rebooted. However, if you have a VM (linux) on Windows, it's a different story:
1. Before Windows is rebooting, it saved memory state onto disk (VM is one of the processed, so it saved)
2. Reboot
3. Restored the saved memory state

No comments:

Post a comment