惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

T
Tenable Blog
D
DataBreaches.Net
S
Secure Thoughts
B
Blog
S
Schneier on Security
Y
Y Combinator Blog
P
Proofpoint News Feed
C
Cybersecurity and Infrastructure Security Agency CISA
C
Cyber Attacks, Cyber Crime and Cyber Security
D
Darknet – Hacking Tools, Hacker News & Cyber Security
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
F
Full Disclosure
Engineering at Meta
Engineering at Meta
L
LangChain Blog
T
Threatpost
阮一峰的网络日志
阮一峰的网络日志
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
The Hacker News
The Hacker News
月光博客
月光博客
大猫的无限游戏
大猫的无限游戏
Cyberwarzone
Cyberwarzone
T
The Exploit Database - CXSecurity.com
雷峰网
雷峰网
博客园 - 司徒正美
Help Net Security
Help Net Security
www.infosecurity-magazine.com
www.infosecurity-magazine.com
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
Application and Cybersecurity Blog
Application and Cybersecurity Blog
P
Privacy International News Feed
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
V
Vulnerabilities – Threatpost
Cisco Talos Blog
Cisco Talos Blog
L
LINUX DO - 热门话题
酷 壳 – CoolShell
酷 壳 – CoolShell
T
Threat Research - Cisco Blogs
Recent Announcements
Recent Announcements
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
H
Heimdal Security Blog
Jina AI
Jina AI
C
Cisco Blogs
Attack and Defense Labs
Attack and Defense Labs
Microsoft Security Blog
Microsoft Security Blog
L
Lohrmann on Cybersecurity
aimingoo的专栏
aimingoo的专栏
D
Docker
I
Intezer
C
Check Point Blog
Cloudbric
Cloudbric
小众软件
小众软件
V2EX - 技术
V2EX - 技术

Ittavern.com

Wimage - Hosting Open-Source Image Uploader with Podman and external S3 Storage Switching from Hugo to picopaper Encryption using SSH Keys with age in Linux ETag in nginx - Simple Resource Caching Sending nginx Logs to Loki with Grafana Alloy How to: Cisco ISE backup to SFTP repository with public key authentication Dummy IP & MAC Addresses for Documentation & Sanitization Deploying ISSO Commenting System for Static Content using Docker Generate a Vanity v3 Hidden Service Onion Address with mkp224o ssh-audit Primer - Audit your SSH Server mtr - More Detailed Traceroute - Network Troubleshooting My Personal Backup Strategy - August 2024 iperf3 - User Authentication with Password and RSA Public Keypair Adding a trash can to Linux with trash-cli Bandwidth Measurement using netcat on Linux Getting started with rsync - Comprehensive Guide Cron Jobs on Linux - Comprehensive Guide with Examples SSH Server Hardening Guide v2 Port Knocking with knockd and Linux - Server Hardening Getting started with rclone - Data transmission Getting started with dig - DNS troubleshooting Getting started with Fail2Ban on Linux Getting started with netcat on Linux with examples URL explained - The Fundamentals Troubleshooting Asking The Right Questions Create tmux layouts using bash scripts Getting started with tcpdump - Ittavern.com Curl on Linux - Reference Guide Getting started with nmap scripts My Offsite Backup - March 2023 Getting started with iperf3 - Network Troubleshooting ICMP echo requests on Linux and Windows - Reference Guide Simulate an unreliable network connection with tc and netem on Linux Detecting Rogue DHCP Server - Ittavern.com Basics of the Linux Bash Command History with Examples Getting started with GNU screen - Beginners Guide Basics of Power over Ethernet (PoE) Difference between RSS and Atom SSH Troubleshooting Guide - Ittavern.com Backup Guide - how to secure crucial data SSH - run script or command at login Linux - unmount a busy target safely Visual guide to SSH tunneling and port forwarding Guide to Wireshark display filters Online Security Guide - Ittavern.com My IT EDC tool kit v2212 10 prompts - 1000 AI generated images - openAI Dall-E SSH - How to use public key authentication on Linux Ways to support open-source projects Getting started with nmap - Ittavern.com nginx - simple and native authentication function Linux - How to work with complex commands EICAR test file - riskless method to test your antivirus and firewall solution Linux - connect to a serial port with screen Podman / Docker - expose port only to the localhost of the host machine Tmux - reload .tmux.conf configuration file My use cases for CyberChef Nginx - simple permanent or temporary redirects Tmux - synchronize the input of all panes within a window Nginx - check your public IP CyberChef - How to remove empty lines
Getting started with tmux - Ittavern.com
2022-11-21 · via Ittavern.com

Tmux is a terminal multiplexer. It allows you to work with multiple terminal sessions at once.

Installation #

It is easy to install, and there are many guides already out there, so I won't cover it in this blog post.

Tmux terminology #

So, let us start with the basics.

tmux server (programm) > session > window > pane

The tmux server starts after running tmux. You can work on the attached sessions or detach them so they run in the background. Every server can have multiple sessions, every session can have multiple windows, and we can split a window into multiple panes. The pane is a normal terminal window at the end.

tmux-overview

There are a lot of use cases for it. Tmux makes is easy to separate projects in different windows or sessions.

The prefix or lead and meta-key #

The default prefix (or sometimes called 'lead') is CTRL + b (or C-b) and it is usually the start of a tmux shortcut or to use a tmux command. When you see something like: Prefix + c, press CTRL + b, and then c. I prefer CTRL + s for example. I'll explain how to change it in the next section.

As a side note: you'll find some shortcuts with an M in them. This is the meta-key. It is ALT for Linux, I think CMD in MacOS, and sometimes even ESC. The meta-key is rarely used, but worth looking it up.

The config file #

You can temporarily change your tmux config by entering the setting:

Prefix + :set -g prefix C-s

This would change the Prefix as we described it before. If you want to make changes permanently, edit the config file. On Linux, the config file is usually in the home directory of the user ~/.tmux.conf. If there is no config file, simply create it, and restart tmux - or reload it (will show in the end of this section). Just put set -g prefix C-s into the config file and tmux will use it after the restart.

There are many ways to customize tmux. Some examples: Vim-like bindings for pane movements, enabling mouse support, setting keyboard shortcuts, and so on.

The easiest way to reload the config file after changes is to use the following tmux command: Prefix + :source-file ~/.tmux.conf (change the path accordingly).

Working with panes #

As mentioned before, you can split a window in multiple panes. You can split the window vertically or horizontally as you wish and change it as much as you want. I won't cover everything in this post, but I'll show you the basics.

Split horizontally:
Prefix + %
Split vertically:
Prefix + "
Move to another pane:
Prefix + ARROW KEY
Convert the current pane into a new window:
Prefix + !
Close current pane:
Prefix + x

There are shortcuts for resizing, moving panes around, and so on, but those aren't that important for this primer.

Side note: I just wrote a separate post about sending input to all panes within a window. Feel free to check it out here.

Working with windows #

I prefer to separate my projects with windows instead of sessions, but that is my personal preference.

Create a new window:
Prefix + c
Rename current window:
Prefix + ,
Close current window:
Prefix + &
Switch to next window:
Prefix + n
Switch to previous window:
Prefix + p
Switch to window by number:
Prefix + 0-9

Working with sessions #

Let me start with a shortcut that I just learned recently.

Overview:
Prefix + w

This gives you a quick overview of all sessions and windows and lets you switch quickly.

Show all sessions:
tmux ls
Prefix + s
Create new session:
tmux new -s new-session
:new -s new-session
Rename session:
Prefix + $
Kill the session:
:kill-session
Detach session (will be active in the background):
Prefix + d
Close a session:
tmux kill-session -t old-session
Attach session:
tmux attach -t old-session
Move to next session:
Prefix + )
Move to previous session:
Prefix + (

Conclusion

This post hopefully will help you to get started with tmux. I'll cover more topics and features of tmux in the future.

Any notes or questions? - Feel free to reach out.