I have a simple .bashrc file at the moment that allows me to always open the same terminal (reopen, actually) running tmux. The important part is shown below.
The essence of this is that when you execute tmux attach -d you disconnect any tmux session that is running, effectively closing the terminal window that is open (since I opened it with the tmuxcommand).
I just installed tmux onto my CentOS 7 machine, but I have encountered a bewildering issue. Whenever I try to attempt to start up a session using tmux or tmux new -s session-name, it outputs a random string of characters into my prompt, and fails to start.
I am new to using tmux in scripting and I am attempting to manipulate it so when I run a script I can have multiple screens attached and split in my Putty session, and also have it color coded and binded so that if I use ALT+arrow key it will switch to the next pane.