14

Often I would like to open a new terminal in the directory i'm currently working in. E.g. I'm working in ~/some/folder/ and I want to run some program, while at the same time keep a terminal at my disposal in the current directory.

Is there some way I can duplicate the current terminal, by some command or maybe a key combination?

Braiam
  • 67,791
  • 32
  • 179
  • 269
user717572
  • 673
  • 2
  • 6
  • 9

2 Answers2

26

Press Ctrl + Shift + T

This will open a new tab in GNOME Terminal with same directory(PWD)

Press Ctrl + Shift + N

This will open a new window of GNOME Terminal with same directory(PWD)

dedunu
  • 9,186
4

You can open a second terminal in the same directory using the following command:

nohup gnome-terminal --working-directory $PWD >&/dev/null

And create an alias to quickly get it:

alias dupterm='nohup gnome-terminal --working-directory $PWD >&/dev/null'

You can have the same result with the following keyboard shortcut: Ctrl + Shift + n

  • This creates bogus nohub.out files in the current directory whenever you launch it. – jmiserez Oct 09 '14 at 12:15
  • @jmiserez: I fixed the nohup.out issue. But I disagree, it does not block the current terminal, both are still usable – Sylvain Pineau Oct 09 '14 at 12:20
  • Try running it from e.g. terminator. But I'll give you that it does work now, and it doesn't use keyboard shortcuts which could be nice. – jmiserez Oct 09 '14 at 12:21
  • @jmiserez the context is different from OP, try nohup gnome-terminal --working-directory $PWD >&/dev/null & in your case – Sylvain Pineau Oct 09 '14 at 12:23
  • 1
    I removed the downvote and added an upvote. The only advantage over Ctrl-Shift-N here is that you can type it from the terminal, which I have to say is quite nice. – jmiserez Oct 09 '14 at 12:27
  • @jmiserez: Thanks for your test with terminator btw – Sylvain Pineau Oct 09 '14 at 12:29