tmux在linux的使用_如何在Linux上使用tmux(以及为什么它比屏幕更好)

tmux在linux的使用

tmux在linux的使用

A stylized Linux terminal on a laptop with shell sessions in the background.
fatmawati achmad zaenuri/Shutterstock Fatmawati achmad zaenuri / Shutterstock

The Linux tmux command is a terminal multiplexer, like screen. Its advocates are many and vocal, so we decided to compare the two. Is tmux really better, or is it just a case of preferring what you know?

Linux tmux命令是终端多路复用器,screen 。 它的拥护者很多,也很积极,因此我们决定将两者进行比较。 tmux真的更好吗,还是只是更喜欢您所知道的?

tmux与屏幕 (tmux vs. screen)

Both the tmux and GNU screen commands are terminal multiplexers. They allow you to have multiple windows within a single terminal window, and to jump back and forth between them. A window can be divided into panes, each of which gives you an independent command line.

tmux和GNU screen命令都是终端多路复用器。 它们使您可以在一个终端窗口中拥有多个窗口,并在它们之间来回跳转。 窗口可以分为多个窗格,每个窗格都为您提供一个独立的命令行。

You can also detach a session and it becomes a headless entity running in the background—you can even close the terminal window that launched it. When you’re ready, you can open a new terminal window and reattach the still-running session. You can also do this over an SSH connection.

您还可以分离会话,它变成在后台运行的无头实体,甚至可以关闭启动该会话的终端窗口。 准备就绪后,您可以打开一个新的终端窗口并重新连接仍在运行的会话。 您也可以通过SSH连接执行此操作。

You can detach a session on one computer, go home, and log in to the remote computer. When reconnected, you can reattach the background session and use it interactively again.

您可以在一台计算机上分离会话,回家然后登录到远程计算机。 重新连接后,您可以重新连接后台会话,然后再次以交互方式使用它。

屏幕命令是什么? (What’s the screen Command?)

The screen command is also a terminal multiplexer, and it’s packed with options. For the lowdown on everything you can do with it, check out our in-depth article.

screen命令也是终端多路复用器,并且带有选项。 有关您可以使用它的所有功能的最低要求,请查看我们的深入文章

This time, we’re going to concentrate on tmux. As we go along, we’ll mention how screen handles the same feature or function.

这次,我们将专注于tmux 。 在进行过程中,我们将提到screen如何处理相同的功能。

Only one thing annoyed us about screen. We’ll cover that when we get to it, and see if tmux fares any better.

关于screen只有一件事使我们恼火。 我们将在开始时进行介绍,并查看tmux票价是否更好。

安装tmux (Installing tmux)

While screen is generally installed by default on popular Linux distributions, tmux isn’t. To install tmux on Ubuntu, type the following:

虽然通常在流行Linux发行版中默认安装screen ,但tmux却没有。 要在Ubuntu上安装tmux ,请输入以下命令:

sudo apt-get install tmux
sudo apt-get install tmux in a terminal window.

On Manjaro you can use pacman:

在Manjaro上,您可以使用pacman

sudo pacman -Sy tmux
sudo pacman -Sy tmux in a terminal window.

On Fedora 31, tmux is already installed.

在Fedora 31上,已经安装了tmux

开始一个tmux会话 (Starting a tmux Session)

To start tmux, just type it and hit Enter:

要启动tmux ,只需键入它并按Enter:

tmux
tmux in a terminal window.

The terminal window will show a st

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值