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
user@host:~$ tmux new -d -s mySession
Step 2: Execute a command in the detached session:
1
user@host:$ tmux send-keys -t mySession.0 "echo 'Hello World'" ENTER
Step 3: Attach to the session:
1
user@host:$ tmux a -t mySession