I'm looking at replacing screen with tmux, currently I use this screen command:

screen -d -m -S session_name /root/script

Is there an equivalent command for tmux that will do the same thing?


The new-session command with the -d option is similar to the -d -m option in screen. The -s option corresponds to the -S option in screen. Note that -d and -s are options to the new-session command rather than to tmux itself.

tmux new-session -d -s session_name '/root/script'

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.