Posts

Showing posts with the label tmux

Tmux Commands & Key Bindings: A Quick Guide

  Tmux is an incredibly powerful terminal multiplexer, but if you don’t use it often, remembering all the key bindings and commands can be challenging. This guide provides a quick but comprehensive refresher on some of the most useful, yet often overlooked, commands to improve your efficiency when working with Tmux. Basic Must-Know Commands Before diving into lesser-known tricks, here are some essential tmux commands that everyone should know: Start a new session: tmux Detach from session: Ctrl-b d List all sessions: tmux ls Attach to a session: tmux attach -t <session_name> Kill a session: tmux kill-session -t <session_name> Less-Known but Incredibly Useful Tmux Commands 1. Quickly Rename a Session Instead of struggling to remember which session is which: tmux rename-session -t old_name new_name Or using a shortcut: Ctrl-b $ → Prompts to rename the session. 2. Copy & Paste in Tmux Without a Mouse Enter Copy Mode: Ctrl-b [ Start selection: Spa...

Tmux Setup for Remote Development

  If you frequently SSH into a remote host for development, builds, deployments, and managing other hosts , having a functional and beautiful tmux configuration can significantly boost productivity. This guide walks through setting up the perfect tmux environment that ensures seamless workflow, persistence, and customization. Why Use Tmux on a Remote Host? When working on a remote machine, the last thing you want is for a dropped connection to kill your session and lose progress. Tmux offers: Persistent sessions: Reconnect to your previous work instantly. Multi-pane layout support: Organize your workspaces efficiently. Customizable key bindings & themes: Tailor tmux to your preferences. Automated session handling: Save and restore workspaces effortlessly. Step 1: Installing Tmux on Your Remote Host Most Linux distributions have tmux in their package manager. To install: sudo apt install tmux # Debian/Ubuntu sudo yum install tmux # CentOS/RHEL brew install tmux ...

Screen vs. Tmux: Which One Should You Use for Remote SSH Sessions?

When working with remote Linux hosts, maintaining persistent sessions, running commands in parallel, and protecting workflows from network interruptions are essential skills. Two of the most popular tools for handling these challenges are GNU Screen and Tmux . While both provide similar functionality, Tmux is the better option in 2024 , and here’s why. What Are Screen and Tmux? GNU Screen Screen is a terminal multiplexer that allows users to create multiple shell sessions, detach them, and reattach later. It has been around since the 1980s and is a lightweight way to keep terminal sessions persistent. Tmux Tmux, or Terminal Multiplexer, is a more modern and feature-rich alternative to Screen. It allows users to create, manage, and organize multiple terminal sessions with enhanced flexibility and usability. Feature Comparison: Screen vs. Tmux Feature Screen Tmux Persistent Sessions ✅ ✅ Window/Pane Management ❌ ✅ Split Terminal Views ❌ ✅ Configuratio...