Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm on Ubuntu 13.04 and I'd like to configure my terminal, so that every time a new tab/window is open, it executes the following command automatically and right away.

 /bin/bash --login

How could I achieve this? On OSX with iTerm 2 there is an option to run a command on start. I guess here I should achieve this thru some kind of dotfile...

share|improve this question
Why do you want to do this? When you open a new terminal, this command is already executed. – Spack May 4 '13 at 1:27
No its not. I need this because of a bug in some development environment I use. The --login flag is crucial. – Jan Netherdrake May 4 '13 at 1:51
up vote 5 down vote accepted

Add it to your ~/.bashrc:

Each time a new terminal is opened ~/.bashrc is invoked.

share|improve this answer


  • In terminal, Edit > Preferences > Tab Title and command > Run a custom command of my shell.

enter image description here


  • gnome-terminal --tab -e "your command" to open a new tab.

More informations: ManPage Gnome-terminal

share|improve this answer
Actually, just checking the run command as login shell fixed my problem. – Jan Netherdrake May 4 '13 at 13:58

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .