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…
Best Answer
Add the command to your
~/.bashrc
. Technically, you should be able to add to~/.profile
as well, fromman bash
,INVOCATION
documentation:Also:
So, this means that if you're logged in locally you should be OK using
~/.profile
; but, if you ssh to systems then you'll want to use~/.bashrc
.~/.bashrc
also applies when logged in locally; so, it has just become convention to use that.