3

If I want to send a command to a running pane in tmux I can do this:

tmux send -t foo ls ENTER

I figured I could do something like this to do the same but in a new pane:

tmux send ls ENTER

Is there an easy way to run in a pane?

1
4

It is easy to run a command in a new pane, simply:

tmux new-window your command ENTER

The issue is that the window is destroyed once the command finishes. Therefore, "tmux new-window ls ENTER" makes no sense. In contrast, "tmux new-window top ENTER" or "tmux new-window watch ls ENTER" seem much more reasonable.

1
  • FWI, if you get to this page wondering how to split the existing window, use the command tmux split-window your command ENTER – Spencer Mar 20 '20 at 18:19

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.