User avatar
Posts: 308
Joined: Wed Aug 13, 2014 10:19 am
Location: Wyoming and France

tmux command and options

Fri Feb 08, 2019 1:12 am

I'm using the following command in my rc.local to start a Python script/program in a tmux window. Just looking at the manual and the web, I'm trying to figure out how it works?

Code: Select all

su xxx -c "tmux new-session -s XDR -d '/usr/bin/python /mnt/usbdrive/pgms/; exec bash'"
I've been using this for some time and must have gotten help from someone on the web, but my memory has failed me!! The first part "tmux new-session -s XDR " I understand => create a new window with the name XDR.

I can't find the "-d" option in the documentation, but I'm guessing it directs that the following code in single quotes is to be started in a bash window.

What I really want in pointed to somewhere that I can find all of this documented. Thanks....RDK

User avatar
Posts: 308
Joined: Wed Dec 07, 2016 6:33 am
Location: Hong Kong

Re: tmux command and options

Fri Feb 08, 2019 1:31 am

The official document should be the man page of the tmux command. Try use the command:

Code: Select all

man tmux
in your terminal.

That "-d" is described in the man page: "The new session is attached to the current terminal unless -d is given...."

There are many cheat-sheets or non-official documents on tmux if you just google it.

Return to “Beginners”