标签 linux 下的文章

fallocate -l 1G /swapfile
chmod 600 /swapfile
mkswap /swapfile
swapon /swapfile
echo "/swapfile swap swap defaults 0 0" >> /etc/fstab

查看是否开启 swap
free -m

列出会话

tmux ls
Ctrl+b s

新建会话

tmux
tmux new -s <name>

重命名会话

tmux rename-session -t <old> <new>
Ctrl+b $

删除会话

exit
tmux kill-session -t <name>

退出会话

Ctrl+b d
tmux detach

连接会话

tmux attach -t <name>
tmux at -t <name>
tmux attach
tmux at

切换会话

tmux switch -t <name>

划分为垂直两个窗口

tmux split
Ctrl+b "

划分为水平两个窗口

tmux split -h
Ctrl+b %