13

Let's say you run a command like grunt serve on a tmux pane, and you kill the pane on which the command is running. I found that the process is not killed:

ps aux | grep grunt

still shows that grunt is running even though the pane is gone. How do you kill a tmux pane along with the process(es)?

4 Answers 4

21

To stop the program running you can close the pane by entering <C-B> x and then entering y.

1
  • 2
    It's important to note that this also closes the pane, which may not be intended Commented Dec 7, 2019 at 10:21
7

Use Ctrl + b¹, > to get a menu with this and other useful commands:

screenshot

This is what uses the Spotify plugin.

¹ Or the chosen tmux prefix/escape sequence.

Other notes and sources

tmux list-keys | grep display-menu  # 

curl cht.sh/tmux                    # Online cheatsheet
4

Just do: <CTRL-B>:kill-pane

2

You may find the tmux-safekill plugin useful.

I wanted it to kill Ruby processes, so I had to fork the repo to add that functionality in, so I'm sure you could do the same for grunt processes if you don't get all the functionality you need from the repo directly.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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