Ask Ubuntu is a question and answer site for Ubuntu users and developers. 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

When i make some changes to the shell/bash behavior. I.e. set up an alias, what quick way does exist to reinitalize the terminal window instead of closing and open a new open? Perhaps a commandline solution?

share|improve this question
up vote 17 down vote accepted

If you mean reloading your .bashrc configuration then:

. ~/.bashrc (note that dot before the file name)

share|improve this answer
Here is a question, how does this behave differently than source ~/.bashrc ? – crasic Jan 3 '11 at 5:49
It doesn't. Looking at the bash man page you will see that the commands are listed as equivalent. – Carsten Thiel Jan 3 '11 at 13:44
source is a specific to bash. . is more standard. Both work the same in bash. – Michael Terry Jan 27 '11 at 18:36

Some Addition i found in the manpage from the reset/tset command

tset reset terminal intialization

command: reset

Tset initializes terminals. Tset first determines the type of terminal that you are using. This determination is done as follows, using the first terminal type found.

an advantage seems to be, that it's independent from the used shell. also works with fish here.

share|improve this answer

You have to replace the running application/shell with a new instance. E.g. if you are using bash as your preferred shell type the following line in your command line ($ is the placeholder for the beginning of your command line):

> $ exec bash

The running application/shell is replaced by new instance of bash like starting from scratch. All your previous modification are gone.

Remark: Do not forget that your terminal application may be reprogrammed. You have to reset your terminal application manually.

share|improve this answer
What do you mean by "reprogrammed"? – Eliah Kagan Aug 11 '12 at 3:53

An additional option to the exec bash is that if you changed your .profile (or .bash_profile), you can do

$ exec bash --login

That will read your profile again as well. It wouldn't hurt to add the -i option as well to explicitly tell bash that this is an interactive shell, but it can normally figure that out for itself.

share|improve this answer

your shell is an executable you can call. So if you're using bash you can call bash and if you're using something else like zsh you can just enter zsh

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.