Command to open new terminal window from the current terminal?

Avi*_*Raj 57 gnome-terminal

我通过运行sudo apt-get install xdotool和 throw xdotool key ctrl+alt+t命令安装了 xdotool,以从当前窗口打开一个新的终端窗口。但它不起作用。

从当前 gnome-terminal 打开新终端窗口的命令是什么?

Wil*_*ilf 84

仅此命令将执行以下操作:

gnome-terminal
Run Code Online (Sandbox Code Playgroud)

通常,如果您希望命令从终端打开并分离(因此它返回到提示而不必关闭打开的程序),您必须使用以下内容:

gnome-terminal & disown
Run Code Online (Sandbox Code Playgroud)

但是,父终端似乎检测到正在使用相同的命令,因此您不需要这样做gnome-terminal就足够了。这似乎也发生在xfce4-terminal从 Xfce 的终端运行时,也konsole从 KDE的终端运行(xtermxterm(另请参阅xterm xterm)运行时似乎不起作用-konsole从 Gnome/Unity 和 Xfce 的终端运行也有效,但对于 gnome 终端中的 Xfce 终端,您需要xfce4-terminal & disown)。

如需更多信息,请访问gnome-terminal手册页

 gnome-terminal  [-e,  --command=STRING]   [-x, --execute ]  [--window-with-profile=PROFILENAME]  [--tab-with-profile=PRO?
       FILENAME]    [--window-with-profile-internal-id=PROFILEID]    [--tab-with-profile-internal-id=PROFILEID]    [--role=ROLE]
       [--show-menubar]   [--hide-menubar]   [--geometry=GEOMETRY]   [--disable-factory]  [-t, --title=TITLE]  [--working-direc?
       tory=DIRNAME]  [--usage]  [-?, --help]
Run Code Online (Sandbox Code Playgroud)

  • 您可能想在后台运行它,例如:“gnome-terminal &”。否则,当前终端将无法使用,因为它将忙于运行另一个终端 - 因此您最终只会得到一个可用的终端,这可能没有抓住重点。 (2认同)
  • 非常感谢,如果你想打开一个具有相同目录的终端,你可以这样做,`gnome-terminal .` (2认同)

Avi*_*Raj 10

从当前终端打开新终端窗口的命令,

xdotool key ctrl+shift+n
Run Code Online (Sandbox Code Playgroud)

要安装xdotool

sudo apt-get install xdotool
Run Code Online (Sandbox Code Playgroud)

  • Ctrl+Shift+T 将打开一个新的终端选项卡。 (4认同)
  • 这是一个新终端......但在一个新选项卡而不是新窗口中。 (2认同)
  • Ctrl+Shift+N 将打开一个新的终端窗口。 (2认同)