Open-source News

Share your Linux terminal with tmate

opensource.com - Tue, 06/14/2022 - 15:00
Share your Linux terminal with tmate Sumantro Mukherjee Tue, 06/14/2022 - 03:00 1 reader likes this 1 reader likes this

As a member of the Fedora Linux QA team, I sometimes find myself executing a bunch of commands that I want to broadcast to other developers. If you've ever used a terminal multiplexer like tmux or GNU Screen, you might think that that's a relatively easy task. But not all of the people I want to see my demonstration are connecting to my terminal session from a laptop or desktop. Some might have casually opened it from their phone browser—which they can readily do because I use tmate.

Linux terminal sharing with tmate

Watching someone else work in a Linux terminal is very educational. You can learn new commands, new workflows, or new ways to debug and automate. But it can be difficult to capture what you're seeing so you can try it yourself later. You might resort to taking screenshots or a screen recording of a shared terminal session so you can type out each command later. The only other option is for the person demonstrating the commands to record the session using a tool like Asciinema or script and scriptreplay.

But with tmate, a user can share a terminal either in read-only mode or over SSH. Both the SSH and the read-only session can be accessed through a terminal or as an HTML webpage.

I use read-only mode when I'm onboarding people for the Fedora QA team because I need to run commands and show the output, but with tmate, folks can keep notes by copying and pasting from their browser to a text editor.

Linux tmate in action

On Linux, you can install tmate with your package manager. For instance, on Fedora:

$ sudo dnf install tmate

On Debian and similar distributions:

$ sudo apt install tmate

On macOS, you can install it using Homebrew or MacPorts. If you need instructions for other Linux distributions, refer to the install guide.

Image by:

(Sumantro Mukherjee, CC BY-SA 4.0)

Once installed, start tmate:

$ tmate

When tmate launches, links are generated to provide access to your terminal session over HTTP and SSH. Each protocol features a read-only option as well as a reverse SSH session.

Here's what a web session looks like:

Image by:

(Sumantro Mukherjee, CC BY-SA 4.0)

Tmate's web console is HTML5, so, as a result, a user can copy the entire screen and paste it into a terminal to run the same commands.

More Linux resources Linux commands cheat sheet Advanced Linux commands cheat sheet Free online course: RHEL technical overview Linux networking cheat sheet SELinux cheat sheet Linux common commands cheat sheet What are Linux containers? Our latest Linux articles Keeping a session alive

You may wonder what happens if you accidentally close your terminal. You may also wonder about sharing your terminal with a different console application. After all, tmate is a multiplexer, so it should be able to keep sessions alive, detach and re-attach to a session, and so on.

And of course, that's exactly what tmate can do. If you've ever used tmux, this is probably pretty familiar.

$ tmate -F -n web new-session vi  console

This command opens up new-session in Vi, and the -F option ensures that the session re-spawns even when closed.

Image by:

(Sumantro Mukherjee, CC BY-SA 4.0)

Social multiplexing

Tmate gives you the freedom of tmux or GNU Screen plus the ability to share your sessions with others. It's a valuable tool for teaching other users how to use a terminal, demonstrating the function of a new command, or debugging unexpected behavior. It's open source, so give it a try!

Tmate expands your options for session sharing with the Linux terminal.

Image by:

iradaturrahmat via Pixabay, CC0

Linux What to read next How tmux sparks joy in your Linux terminal This work is licensed under a Creative Commons Attribution-Share Alike 4.0 International License. Register or Login to post a comment.

How to Install AlmaLinux 9 Step by Step

Tecmint - Tue, 06/14/2022 - 14:36
The post How to Install AlmaLinux 9 Step by Step first appeared on Tecmint: Linux Howtos, Tutorials & Guides .

AlmaLinux is a free and open-source community-driven operating system developed as a perfect alternative to CentOS 8 which RedHat discontinued in favor of CentOS Stream. It is 1:1 binary compatible with RHEL and is

The post How to Install AlmaLinux 9 Step by Step first appeared on Tecmint: Linux Howtos, Tutorials & Guides.

AMD Linux CPU Temperature Driver Sees Latest Patches For Zen 4 & Likely Mendocino

Phoronix - Tue, 06/14/2022 - 07:13
One of my personal gripes with AMD's Zen CPU support on Linux has been the lack of timely support for CPU temperature monitoring with their "k10temp" driver. Even though usually just new IDs are often needed and sometimes needing to adjust offsets or other minor changes, it has traditionally been done post-launch and sometimes left up to patches from the open-source community. Thankfully that has been changing and with Zen 4 it looks like that support will be ready for launch-day with the mainline Linux kernel...

Proposed SIG Could Help Fedora Linux Become A Leader For Heterogeneous Computing

Phoronix - Tue, 06/14/2022 - 02:00
To organize efforts around improving Fedora Linux for heterogeneous computing, a new special interest group "SIG" is looking to be established to help ensure the success of Fedora in the world of XPUs, the growing and very diverse software ecosystem around accelerators, etc...

LUMI Inaugurated As Europe's Most Powerful Supercomputer - Powered By AMD CPUs/GPUs

Phoronix - Tue, 06/14/2022 - 01:22
While not record-shattering like the 1.1 Exaflops Frontier supercomputer at ORNL that took the Top500 spot this year from Fugaku, LUMI was inaugurated today with the claim of Europe's most powerful supercomputer...

AMD Adds Radeon Memory Visualizer Support For Linux

Phoronix - Tue, 06/14/2022 - 00:30
AMD's Radeon Memory Visualizer "RMV" tool from their GPUOpen initiative has allowed better understanding video memory usage with Windows across multiple APIs. In citing the "rising popularity of gaming on the Linux OS", AMD has now enabled Linux support for this tool...

Pages