Gnome 终端复制
我经常需要在同一位置进行两个 gnome 终端会话。是否可以打开一个终端,进入我需要的目录,并复制终端,这样我就不必在第二个窗口中再次输入 cd 命令(可能会很长)?
Very often I need two gnome-terminal sessions at the same location. Is it possible to open a single terminal, get to the directory I need, and make a duplicate of the terminal so I don't have to type in the cd command (which can get lengthy) a second time in the second window?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
转到您选择的目录,然后您有一些选择:
Go to your directory of choice, then you have some alternatives:
每当您打开 gnome 终端时,打开一个新选项卡(即 Ctrl-Shift-T)将在同一选项卡中打开一个新选项卡制作选项卡时您所在的目录。
Ctrl-Shift-N 执行相同的操作,但打开不同的窗口。
Whenever you have a gnome-terminal open, opening a new tab (i.e. Ctrl-Shift-T) will open a new tab in the same directory you're in when you make the tab.
Ctrl-Shift-N does the same thing but opens a different window.
对于 Bash 和 Z shell,请将其添加到 shell 的 rc 文件(即
~/.bashrc
或/.zshrc
)中:(此解决方案从注释提升为其他答案。)
For Bash and Z shell, add this to your shell's rc file (that is,
~/.bashrc
or/.zshrc
):(This solution is promoted from comments to other answers.)
考虑在您已有的活动目录中执行此操作,
默认情况下按F4,这将打开一个具有您所在相对路径的新终端
consider doing this in the active directory you already in press F4
by default this will open a new terminal with the relative path you are in