-1

I want to open 5 terminals from a parent terminal and place these terminals on the screen properly so that each terminal can be viewed properly at the same time. Also, i want to execute differnet commands in each terminal.

Can you help me please?

Thanks, pawan

pawan
  • 1
  • 1
  • Try `tmux`. For example https://github.com/chicks-net/chicks-home/blob/master/bin/start_tmux opens up half a dozen tabs and runs commands in a few of them. – chicks Jan 04 '16 at 13:46

2 Answers2

1

You can use gnome-terminal command to open a new terminal. Also if you want to execute a command in new terminal you can use following command :-

gnome-terminal -e "bash -c 'cat > /tmp/sample'"

This will open a new terminal which will open sample file for writing. You can place your commands or scripts. Also if you want 5 terminals, procedure is same.

  • Gnome wouldn't normally be found on a server. – user9517 Jan 04 '16 at 06:52
  • @lain I know most of servers don't have Gnome installed. Since the question didn't specify any linux distro or method through which he wants to access terminals so I gave a generic answer. If you know some other method than we will appreciate and will learn something new. – Siddharth sharma Jan 04 '16 at 07:15
  • This isn't a generic answer it's actually quite specific to gnome. – user9517 Jan 04 '16 at 07:35
  • There's no indication the OP has Gnome and I don't see any question about it in the comments. Plus `gnome-terminal` is a pain to automate. – chicks Jan 04 '16 at 13:49
1

Tmux would be one way to solve your problem. It can open several terminals by splitting the screen & more. This answer at superuser will be helpful.

Joe
  • 63
  • 6