Learning tmux

Tips on learning tmux as I moved my primary toolchain to Ubuntu 20.04 on WSL2

Getting started

  • 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
  • His tmux.conf re-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

Going deeper