avatar
文章
11
标签
15
分类
6
Home
about
tags
categories
RL-learning
photos
LogoAttic的博客tmux常用命令 返回首页
搜索
Home
about
tags
categories
RL-learning
photos

tmux常用命令

发表于2025-12-10|更新于2025-12-10|ubuntu
|浏览量:

Tmux 常用命令合集

1 会话(session)——“进/出/删/切”

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
# 新建默认会话
tmux

# 新建命名会话
tmux new -s demo

# 断开会话(保持后台运行)
# 快捷键:Ctrl+b d

# 查看所有会话
tmux ls

# 重接指定会话
tmux a -t demo # a 是 attach 的简写

# 强制销毁会话
tmux kill-session -t demo

2 窗口(window)——“标签页”

1
2
3
4
5
6
7
8
9
10
11
12
13
14
# 新建窗口
# 快捷键:Ctrl+b c

# 切换窗口
# 快捷键:Ctrl+b p / n / 0~9

# 重命名当前窗口
# 快捷键:Ctrl+b ,

# 关闭当前窗口
# 快捷键:Ctrl+b &

# 查看窗口列表(可搜索)
# 快捷键:Ctrl+b w

3 窗格(pane)——“分屏”

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# 左右分屏
# 快捷键:Ctrl+b %

# 上下分屏
# 快捷键:Ctrl+b "

# 在窗格间移动
# 快捷键:Ctrl+b ← ↓ ↑ →

# 顺时针切换窗格
# 快捷键:Ctrl+b o

# 显示编号(点击数字跳转)
# 快捷键:Ctrl+b q

# 缩放/还原当前窗格(最大化)
# 快捷键:Ctrl+b z

# 关闭当前窗格
# 快捷键:Ctrl+b x

# 重新排列所有窗格为平铺
# 快捷键:Ctrl+b Space

4 复制模式(滚动/查找)

1
2
3
4
5
6
7
8
9
10
11
12
# 进入复制模式
# 快捷键:Ctrl+b [

# 翻页
# PgUp / PgDn 或 Ctrl+u / Ctrl+d

# 搜索
# Ctrl+s 向下搜索
# Ctrl+r 向上搜索

# 退出复制模式
# q 或 Esc

5 配置小技巧(可选)

1
2
3
4
5
6
7
8
9
10
11
# 启用鼠标支持(临时)
tmux set -g mouse on

# 让鼠标滚轮直接翻历史(Tmux ≥2.1)
echo "set -g mouse on" >> ~/.tmux.conf
tmux source ~/.tmux.conf

# 修改前缀键(很多人改成 Ctrl+a)
echo "unbind C-b
set -g prefix C-a
bind C-a send-prefix" >> ~/.tmux.conf

6 一条命令快速恢复“上次会话”

1
2
alias t='tmux a || tmux new'   # 放进 ~/.bashrc 或 ~/.zshrc
# 以后直接敲 t:有会话就接上,没有就新建

7 速查表(极简版)

1
2
3
4
5
6
7
8
9
10
Ctrl+b  d   detach
Ctrl+b s 会话列表
Ctrl+b w 窗口列表
Ctrl+b % 左右分屏
Ctrl+b " 上下分屏
Ctrl+b z 缩放窗格
Ctrl+b x 关窗格
Ctrl+b & 关窗口
Ctrl+b , 重命名窗口
Ctrl+b $ 重命名会话
文章作者: Attic
文章链接: https://osaerialrobot.top/2025/12/10/tmux/
版权声明: 本博客所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明来源 Attic的博客!
ubuntutmux
cover of previous post
上一篇
ubuntu软件推荐以及美化建议
macos 风格美化安装必要的工具和依赖12sudo apt updatesudo apt install -y gnome-tweaks gnome-shell-extensions sassc libglib2.0-dev-bin libxml2-utils 安装 WhiteSur 主题123456# 下载主题仓库git clone https://github.com/vinceliuice/WhiteSur-gtk-theme.git --depth=1cd WhiteSur-gtk-theme# 执行安装脚本(默认安装深色+浅色主题)./install.sh 12345# whitesur 图标主题cd ~git clone https://github.com/vinceliuice/WhiteSur-icon-theme.gitcd WhiteSur-icon-theme./install.sh 12345# 光标cd ~git clone https://github.com/vinceliuice/WhiteSur-cursors.gitcd WhiteSu...
cover of next post
下一篇
ros2-px4联合仿真环境配置
ROS2 安装以及相关环境配置推荐使用鱼香ROS一键安装 1wget http://fishros.com/install -O fishros && . fishros 按照文字提示操作 1234sudo apt install python3-pipsudo apt install gitpip3 install empy==3.3.4 # 固定empy版本为3.3.4 PX4环境配置下载PX4代码及其子模块 1git clone https://github.com/PX4/PX4-Autopilot.git --recursive 再次确认是否下载完全 123cd PX4-Autopilotgit submodule update --init –recursive 安装完成后可以查看飞控代码版本 12cd PX4-Autopilot/git describe --tags 我选择切换到了1.16稳定版来开发,这个可选可不选 123git fetch --tagsgit checkout v1.16.0git submodule update --i...
相关推荐
cover
2025-12-09
ubuntu22.04安装docker
docker 安装首先卸载系统默认的的docker 1sudo apt remove docker docker-engine docker.io containerd runc 安装必要的库 1sudo apt install apt-transport-https ca-certificates curl software-properties-common gnupg lsb-release 1234567891011# 阿里源(推荐使用阿里的gpg KEY)curl -fsSL https://mirrors.aliyun.com/docker-ce/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg#添加 apt 源:#阿里apt源echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] ...
cover
2025-12-09
ubuntu platformio问题
在使用ubuntu配置vscode 的 platformio插件时,常常需要魔法上网来下载依赖 我们可以直接配置好vscode的proxy来下载,也可以用手机热点来下载 然而废了大半天劲配置好网络之后我的platformio却连不上板子 1lsusb 12345678910111213li@li-MS-7C94:~$ lsusbBus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hubBus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hubBus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hubBus 001 Device 008: ID 8087:0032 Intel Corp. AX210 BluetoothBus 001 Device 006: ID 1462:7c94 Micro Star International MYSTIC LIGHT Bus 001 Device...
cover
2025-12-10
ubuntu软件推荐以及美化建议
macos 风格美化安装必要的工具和依赖12sudo apt updatesudo apt install -y gnome-tweaks gnome-shell-extensions sassc libglib2.0-dev-bin libxml2-utils 安装 WhiteSur 主题123456# 下载主题仓库git clone https://github.com/vinceliuice/WhiteSur-gtk-theme.git --depth=1cd WhiteSur-gtk-theme# 执行安装脚本(默认安装深色+浅色主题)./install.sh 12345# whitesur 图标主题cd ~git clone https://github.com/vinceliuice/WhiteSur-icon-theme.gitcd WhiteSur-icon-theme./install.sh 12345# 光标cd ~git clone https://github.com/vinceliuice/WhiteSur-cursors.gitcd WhiteSu...
cover
2025-12-26
Lazyvim 配置中的 tree-sitter兼容问题解决
参考 https://github.com/LazyVim/LazyVim/issues/6793 https://github.com/LazyVim/LazyVim/issues/4485 随着lazyvim和tree-sitter的更新,lazyvim自动拉取的tree-sitter版本过新无法启动 会报类似下面的错误 1[nvim-treesitter/install/c] error: Error during "tree-sitter build": /home/li/.nvm/versions/node/v24.12.0/lib/node_modules/tree-sitter-cli/tree-sitter: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.39' not found (required by /home/li/.nvm/versions/node/v24.12.0/lib/node_modules/tree-sitter-cli/tree-sitter) 这...
avatar
Attic
帝都苦苦挣扎的PhD
文章
11
标签
15
分类
6
公告
机器人描述文件查看 学术会议查询
目录
  1. 1. Tmux 常用命令合集
    1. 1.1. 1 会话(session)——“进/出/删/切”
    2. 1.2. 2 窗口(window)——“标签页”
    3. 1.3. 3 窗格(pane)——“分屏”
    4. 1.4. 4 复制模式(滚动/查找)
    5. 1.5. 5 配置小技巧(可选)
    6. 1.6. 6 一条命令快速恢复“上次会话”
    7. 1.7. 7 速查表(极简版)
最新文章
test2026-01-23
Lazyvim 配置中的 tree-sitter兼容问题解决
Lazyvim 配置中的 tree-sitter兼容问题解决2025-12-26
collection2025-12-12
CoRL2025论文集
CoRL2025论文集2025-12-12
px4 ctrl for ROS22025-12-12
© 2025 - 2026 By Attic框架 Hexo 8.1.1|主题 Butterfly 5.5.3
赣ICP备2025057989号-1  |  京公网安备11011402054558号
搜索
数据加载中