Skip to content

Instantly share code, notes, and snippets.

@nuclearglow
Last active April 5, 2022 20:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nuclearglow/aa40be1dfc3b221f1afaffbf093b738f to your computer and use it in GitHub Desktop.
Save nuclearglow/aa40be1dfc3b221f1afaffbf093b738f to your computer and use it in GitHub Desktop.
tmux keybindings

tmux expand window to full screen

:resize-window -A

tmux new session

:new -s

Restoring previously saved environment

None of the previous saves are deleted (unless you explicitly do that). All save files are kept in ~/.tmux/resurrect/ directory.
Here are the steps to restore to a previous point in time:

  • make sure you start this with a "fresh" tmux instance
  • $ cd ~/.tmux/resurrect/
  • locate the save file you'd like to use for restore (file names have a timestamp)
  • symlink the last file to the desired save file: $ ln -sf <file_name> last
  • do a restore with tmux-resurrect key: prefix + Ctrl-r

You should now be restored to the time when <file_name> save happened.

build tmux from source

sudo apt install checkinstall automake libevent-dev libncurses5-dev bison
./configure && make
sudo make install
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment