Search

Search IconIcon to open search

tmux

Last updatedUpdated: by Simon Späti · CreatedCreated:

tmux is an open-source Terminal Multiplexer for Unix-like operating systems. It allows multiple terminal sessions to be accessed simultaneously in a single window. It is useful for running more than one command-line program at the same time.

Great way of naming your sessions, and tabs:

I also use session to jump to any folder and open a new folder in a new tmux session.

Shortcuts

  • ta Tmux attach
  • tn tmux new session from the current session I’m in

Find more information below, or in my dotfiles.ssp.sh:

1
2
3
4
5
6
7
8
alias ide=~/.tmux/ide
alias tmux-session=~/.tmux/tmux-session
alias killtmuxsessions="tmux ls -F'#{session_name}'|egrep '^[0-9]+$'|xargs -I% tmux kill-session -t \"=%\""
alias ta="tmux attach"
# opening a new tmux session from current directory and name it like last part of pwd path
alias tn='tmux new -s `eval echo $(pwd) | sed "s/.*\///"`'
# when closing ranger it will be at the path you were
alias ranger='ranger --choosedir=$HOME/.rangerdir; LASTDIR=`cat $HOME/.rangerdir`; cd "$LASTDIR"'

# Does it matter which Terminal I use with Tmux?

Using Tmux will add some overhead, but you won’t completely lose Ghostty’s performance benefits because:

  1. Ghosty’s core optimizations will still apply:
    • The SIMD escape sequence detection
    • Fast Unicode decoding
    • Pre-computed code point width tables
    • Efficient memory layout
    • Fast rendering pipeline using Metal
  2. However, Tmux does introduce an additional layer that:
    • Needs to process escape sequences again
    • Manages its own screen buffer that allows you to serach and navigate your terminal with Vim Motions
      • My favorite use is searching and navigating my terminal’s text with vim motions, something most terminals just starting to implement with search, but navigate you usually can’t.
    • Has its own rendering cycle

# Integrations

# See Sesh: Fuzzy Finding Sessions

by Josh Medeski, a Tmux session manager.

Blog article or GitHub.

# Alternatives


Origin:
References: Terminal, TUIs