terminal - 更改 tmux 保存 session 的位置?

标签 terminal tmux

我经常连接到学校网络上的终端。任何高于我的主目录的东西我都无法更改。是否有 .tmux.conf 的命令可以让我将 session 保存在我的主目录内的目录中。

最佳答案

默认情况下 tmux 不保存其 session 。你需要一个像 tmuxinator 这样的插件或 tmux-resurrect .

如果您 use tmux-resurrect插件来保存您的 session 。它默认保存到 ~/.tmux/resurrect目录。您可以自定义位置by adding this给您的 .tmux.conf

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

tmux-resurrect可以与tmux-continuum结合使用添加自动保存和恢复功能。

Features:

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

关于terminal - 更改 tmux 保存 session 的位置?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43443355/

相关文章:

linux - 如何列出(ls)目录中最后修改的 5 个文件?

更新后,MySQL 服务器将无法使用 'mysqld' 从终端启动

vim - 括号上的 tmux vim 显示问题

linux - 加载共享库时出错 : libevent-2. 0.so.5

bash - 如何在打开新的 tmux session 后执行命令

windows - 如何为windows cmd实现ctrl+l?

linux - 使用过滤器创建具有进程名称的文件

linux - Tmux 在调用 `shell` 显示 Bash 命令的输出时不显示换行符

macos - 如何使用 tmux 向下滚动鼠标滚轮

node.js - 如何使用 Sublime Text 运行 Node 应用程序