The code below will run source ~/.bashrc under tmux but this will not open tmux on the terminal. #!/bin/bashtmux new-session -d -s my_session 'source ~/.bashrc'I want the below effect from the above command:$ tmux$ source ~/.bashrc
Is it possible to start tmux visible session
bash;tmux
Try this:#!/bin/bashtmux new-session -d -s my_sessiontmux send source ~/.bashrc C-mtmux -2  attach-session -t my_sessionIt should create a new session called my_session, excute the command and keep it open.