afloresescarcega
afloresescarcega

Reputation: 85

Changing the location where tmux saves sessions?

I often connect to a terminal on my school's network. Anything higher than my home directory I cannot change. Is there a command for the .tmux.conf that would allow me to save my sessions in directory inside of my home directory.

Upvotes: 5

Views: 5360

Answers (1)

tizzick
tizzick

Reputation: 5532

By default tmux does not save its session. You need a plugin like tmuxinator or tmux-resurrect.

If you use tmux-resurrect plugin to save your session. It saves by default into ~/.tmux/resurrect directory. You can customize the location by adding this to your .tmux.conf

set -g @resurrect-dir '/some/path'

tmux-resurrect can be combined with tmux-continuum to add auto-save and restore features.

Features:

  • continuous saving of tmux environment
  • automatic tmux start when computer/server is turned on
  • automatic restore when tmux is started

Upvotes: 10

Related Questions