Tmux Cheatsheet GitHub
Tmux Cheatsheet GitHub
henrik / tmux_cheatsheet.markdown
Created 9 years ago
Star
tmux cheatsheet
tmux_cheatsheet.markdown
tmux cheatsheet
As configured in my dotfiles.
start new:
tmux
attach:
attach to named:
tmux a -t myname
list sessions:
tmux ls
kill session:
https://gist.github.com/henrik/1967800 1/12
3/21/2021 tmux cheatsheet · GitHub
Sessions
Windows (tabs)
c new window
, name window
w list windows
f find window
& kill window
. move window - prompted for a new number
:movew<CR> move window to the next unused number
Panes (splits)
% horizontal split
" vertical split
o swap panes
q show pane numbers
x kill pane
⍽ space - toggle between layouts
Window/pane surgery
:joinp -s :2<CR> move window 2 into a new pane in the current window
:joinp -t :1<CR> move the current pane into a new pane in window 1
Misc
https://gist.github.com/henrik/1967800 2/12
3/21/2021 tmux cheatsheet · GitHub
d detach
t big clock
? list shortcuts
: prompt
Resources:
cheat sheet
Notes:
TODO:
This is either a fork of this gist or vice versa, but it's not obvious because it was duplicated instead of
forked. So which is the original?
https://gist.github.com/henrik/1967800 3/12
3/21/2021 tmux cheatsheet · GitHub
Are the horizontal and vertical split commands the right way round?
NB: Just tried to fork and submit a pull request... didn't realise you cannot do it through github.com for gists.
Is there any way to start a command within a tmux session when you start the tmux session? Something
like
https://gist.github.com/henrik/1967800 4/12
3/21/2021 tmux cheatsheet · GitHub
any one know how I can modify my windows to display the name (in tmux.conf). Here's my current
window settings:
Hi there, sometimes it won't let me exit via Ctrl + B + D, how to fix this?
Neat.
Btw, is there any way to resize the panes?
The resource page is still available at "http://cheat.errtheblog.com/s/tmux" just remove the forward slash
at the end of the link.
https://gist.github.com/henrik/1967800 5/12
3/21/2021 tmux cheatsheet · GitHub
In Linux, to resize panes (for example) separated by a horizontal split, you can hold down ctrl-b while
pressing the up/down arrow keys.
EDIT:
Easy enough:
tmux kill-server
will kill all tmux windows and sessions, good enough for my purpose.
Most handy
https://gist.github.com/henrik/1967800 6/12
3/21/2021 tmux cheatsheet · GitHub
I loved this, now I have created all my sessions with name and keeps every task tidy and organized.
From:
In tmux, hit the prefix ctrl+b and then:
To
Currently windows list shows hostname and path but Any ideas on how to add status like current
command executing, cwd, or other fun stuffs?
https://gist.github.com/henrik/1967800 7/12
3/21/2021 tmux cheatsheet · GitHub
To those looking to learn more about tmux, I released an ebook freely available online called The Tao of
tmux. I'm excited to spread the word about it because I think the way I break tmux down into its objects
(sessions, windows, panes) is a good approach to explaining it. I also go into advanced things like tmux'
aliases, targets and formats. Feel free to give it a look! Tony
In the status bar showing current active tmux sessions, can we show $PWD there instead of the process
names?
dumb question but is there any way to get a list of these commands from within tmux (for quick lookup
in the future so don't have to open web browser etc)? looking at 'help' within tmux but cannot find what
i'm looking for.
Thanks in advance.
In the dotfiles of @henrik copy mode is set to work like the way it works in the vi. After C-b then v I
can't start selecting my text. Does anyone have some similar problem?
Usefull
https://gist.github.com/henrik/1967800 8/12
3/21/2021 tmux cheatsheet · GitHub
Is there a way to reactivate the sessions in gdb dashboard especially when debugging?
Thanks!
Helpful !
To start a detached command:
tmux new -d -s my-session 'command1; command2;'
% horizontal split - I guess this means the two panes are horizontally placed relative to each other. The
splitting line is vertical. You might want to make that more clear. Other than that, very nice cheat sheet.
https://gist.github.com/henrik/1967800 9/12
3/21/2021 tmux cheatsheet · GitHub
sp tt g e s e t ca . ou g t a t to a e t at o e c ea . Ot e t a t at, e y ce c eat s eet.
Dumb question, but I can't find/figure it: is there any way to focus input on just one pane and then return
to the all-panes context?
EDIT:
Easy enough:
tmux kill-server
will kill all tmux windows and sessions, good enough for my purpose.
C+a k
Thanks! 👍
https://gist.github.com/henrik/1967800 10/12
3/21/2021 tmux cheatsheet · GitHub
Hi !
I have launched a process in a tmux using an app. Now I wanna know which version of the app is running,
I don't remember that which directory I added to that tmux's PATH and so cannot understand which
version is running. Is there any way to see a tmux path outside that?
[any other creative idea is welcome]
Thanks
@mossishahi https://stackoverflow.com/a/606057
Carriage Return
This needs far more details on it .... like for example renaming sessions
For those that follow: this gist has not been revised since 2012.
Conversely, this version (of the same cheatsheat) appears to be a branch/copy of this one but has been
updated several times (latest in 2015). While four years old isn't awesome, it's still more recent (and
feature-full) than this gist.
@henrik, thanks for starting it many years ago! This is obviously helpful to many.
https://gist.github.com/henrik/1967800 11/12
3/21/2021 tmux cheatsheet · GitHub
This is either a fork of this gist or vice versa, but it's not obvious because it was duplicated instead of
forked. So which is the original?
It's possible to tell now. I don't remember what GitHub looked like in 2013. :)
Enter key
v useful ty ty
Thanks so much! 💯
https://gist.github.com/henrik/1967800 12/12