小编leo*_*ama的帖子

为什么默认情况下“tmux”会创建新窗口作为登录 shell?

当您在tmux正在运行的会话中启动新会话或在其中创建新窗口时,其默认行为是运行 shell(例如:)bash作为登录 shell。

我知道登录 shell 的目的是在您登录系统时执行您感兴趣的配置和过程的例行程序。但是在大多数情况下(除了可以tmux 用作登录 shell 的情况外),当用户只想打开一个新窗口时,这样做并不是用户的真正意图。

那么将其作为 的默认行为的理由是tmux什么?


文档中关于此事的唯一说明:

default-command  shell-command
        Set the command used for new windows (if not specified when the
        window is created) to shell-command, which may be any sh(1)
        command.  The default is an empty string, which instructs tmux
        to create a login shell using the value of the default-shell
        option.
Run Code Online (Sandbox Code Playgroud)

shell tmux

35
推荐指数
1
解决办法
7295
查看次数

标签 统计

shell ×1

tmux ×1