Tips on learning tmux as I moved my primary toolchain to Ubuntu 20.04 on WSL2
- Linuxize’s getting started with tmux was helpful
- As you may have noticed, I’ve started my WSL2 journey by cloning Dotfiles from Nick Janetakis
tmux.confre-maps the leader key from Ctrl+b to ` (backtick)
- symbolic link with
ln -s ~/dotfiles/.tmux.conf ~/.tmux.conf
- Install TPM (Tmux plugin manager) with
git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm
- Start a tmux session and install the configured plugins with backtick followed by capital i.
- This stackexchange question covered the scenario I was facing:
Normally I give my passphrase for the private key on the first ssh invocation and then I am not asked for the passphrase (in this and all other bash sessions).
However, under tmux, I am asked for the passphrase over and over even in the same bash (same tmux pane). With the answer which worked for me:
$ tmux new -s temp $ ssh-agent $ ssh-add
Tips and tricks
- Mapping the leader key - Nick Janetakis’ dotfiles remapped the leader to the backtick, from Ctrl+b
- Scroll in the tmux pane - then [ to enable scrolling with the arrow keys
- Nick Janetakis blog post
- Borrow from a tmux.conf file - pinched moving around panes, although prefer leader h being mapped to a horizontal split, rather than Vim keys.
- Scrolling. From runrails.com
- tmux shortcuts and cheatsheet