Starting a new tmux session and detaching it, all inside a shell script

前端 未结 2 496
闹比i
闹比i 2020-12-29 11:07

I am trying to create a new tmux session and execute the command \'vagrant up\'. \'Vagrant up\' takes more than 3 hours so I want to detach the session so that I can come ba

2条回答
  •  我在风中等你
    2020-12-29 11:23

    Start a shell, and send vagrant up to it, so you can see the errors.

    tmux new-session -d -s rbt123
    tmux send-keys 'vagrant up' C-m
    tmux detach -s rtb123
    

    The C-m means hit return.

提交回复
热议问题