tmux创建后台会话

tmux创建后台会话

QQ群:397745473

The following is a “Hello World” example illustrating the use of the send-keys command.

  • Step 1. Create a detached session:

    1
    [email protected]:~$ tmux new -d -s mySession
  • Step 2: Execute a command in the detached session:

    1
    [email protected]:$ tmux send-keys -t mySession.0 "echo 'Hello World'" ENTER
  • Step 3: Attach to the session:

    1
    [email protected]:$ tmux a -t mySession

tmux创建后台会话

参考: https://unix.stackexchange.com/questions/409861/is-it-possible-to-send-input-to-a-tmux-session-without-connecting-to-it

QQ群:397745473

知识星球