当前位置:网站首页>Tmux使用
Tmux使用
2022-06-10 11:33:00 【MallocLu】
简介
Tmux 是一款终端复用命令行工具,一般用于 Terminal 的窗口管理。Tmux 拥有如下特性:
- 可以同时开启多个会话和窗口,并持久地保存工作状态。
- 断线后任务能够在后台继续执行。
即,用Tmux运行程序,SSH连接断线或者电脑断网后,执行的程序也不会停止,程序的输出也不会清空
一般学会session管理使用即可
# 安装
apt update
apt install tmux
session管理
# (terminal)表示在termeinal环境下操作,(session)表示在session环境下操作
# (terminal)匿名新建(自动生成整数递增的名称),进入session将名称显示在左下角
tmux
# (terminal)命名新建,进入session将名称显示在左下角
tmux new -s [session-name]
# (session)退出session到terminal
# (重要)如果该session中没有正在执行的程序,可以使用下列的命令/快捷键ctrl+b+d
# 如果该session中有正在执行的程序又不想停止它,只能使用快捷键ctrl+b+d
tmux detach
# (terminal/session)查看所有session信息
tmux ls
# 0: 1 windows (created Wed May 25 12:09:53 2022) [249x60]
# lu: 1 windows (created Wed May 25 12:13:20 2022) [249x60]
# (terminal)删除会话 指定/全部
tmux kill-session -t [session-name]
tmux kill-server
# (terminal)进入会话(断网重连后可以使用)
tmux a -t [session-name]
# (session)切换会话
tmux switch -t [session-name]
# (terminal)重命名
tmux rename-session -t [session-name] [new session-name]
边栏推荐
- Flutter socketio example
- JS implements tree data operation through recursion
- Flink CDC + Hudi 海量数据入湖在顺丰的实践
- Unit test based on junit4
- 【网易云信】深度剖析「圈组」消息系统设计 | 「圈组」技术系列文章
- 期末考试——编译原理
- Detailed explanation of redis
- Digital commerce cloud furniture industry supplier evaluation management system: improve the core competitiveness of furniture enterprises and realize digital collaborative management
- About one-way linked list
- Long term learning of graphic and text pre training.
猜你喜欢

Weekly 5.28

纪念正月十六工作室总访问量突破百万

为你推荐一款高效的IO组件——okio

Nucleic acid detection robot

【网易云信】深度剖析「圈组」消息系统设计 | 「圈组」技术系列文章

一站式机器学习开业平台 MLflow 怎么样?

Digital supply chain collaboration system for digital commerce cloud communication industry: empowering communication enterprises to improve supply business and enhance market competitiveness

How data is stored in memory

SaaS management system for digital commerce cloud business service industry: to achieve efficient business collaboration and help enterprises improve their digital transformation

Practice of Flink CDC in Dajian cloud warehouse
随机推荐
H.265编码原理入门
Network Interview Questions
Linked list, stack, queue
Flutter socketio example
Software testing quality and assurance
第 1 天 栈与队列(简单)
Is there any difference between exception and error
OAuth2学习中的一些高频问题的QA
Testing ovn manually based on LXD (by quqi99)
Digital commerce cloud furniture industry supplier evaluation management system: improve the core competitiveness of furniture enterprises and realize digital collaborative management
js通过递归实现树形数据操作
[WIP] Openstack Masakari (by quqi99)
Detailed explanation of redis
360、清华|Zero和R2D2:一种大规模的中文跨模态基准测试和视觉语言框架
La poignée d'enseignement de la station B vous apprend à utiliser le masque yolov5 pour tester les éléments de l'enregistrement le plus complet (apprentissage profond / détection d'objets / pythorch)
Essential 5 determinants of linear algebra
Recursive traversal and non recursive traversal of binary tree (C language version)
软件测试基础
MySQL数据类型
Carbon reduction in the construction industry is by no means a fresh idea experts suggest strengthening the transformation of rural buildings