博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
tmux -使用笔记
阅读量:362 次
发布时间:2019-03-04

本文共 677 字,大约阅读时间需要 2 分钟。

一、安装

sudo apt-get install tmux # 先安装工具# 接下来是下载配置文件,可以在GitHub上搜索oh-my-tmux,也可以执行以下命令cd git clone https://github.com/gpakosz/.tmux.gitln -s -f .tmux/.tmux.confcp .tmux/.tmux.conf.local .

二、入门

1 命令行

tmux new -s basic # 首次创建一个新的 tmux窗口,“basic”是分屏的名字tmux new -s name -d # 创建新窗口,名为“name”tmux ls # 是tmux list-sessions,列出当前打开分屏的数量tmux attach # 按顺序打开某一个分屏tmux attach -t name # 打开指定的名为“name”的窗口tmux kill-session -t name # 关闭名为“name”的窗口

2 快捷键

Ctrl +a c 创建一个新窗口

Ctrl +a & 关闭当前窗口
Ctrl +a 1/2/3 切换到指定编号窗口
Ctrl +a % 将当前窗口均分为左右两格
Ctrl +a " 将当前窗口均分为上下两格
Ctrl +a 上/下/左/右 切换窗口
Ctrl +a h/j/k/l 切换窗口

三、出错

tmux attach 时出错为:出错:sessions should be nested with care, unset $TMUX to force解决:执行 unset TMUX

转载地址:http://zyzg.baihongyu.com/

你可能感兴趣的文章