17

How can I restart / reload the terminal in ubuntu 11.10? I'm using bash. My original reason to ask was that I had to exit and start the terminal again to get new .bashrc aliases to work, but that's fixed by reloading it with ".", now I'm just curious.

2
  • What do you mean? What exactly do you want to re-load?
    – slhck
    Nov 3, 2011 at 20:57
  • 1
    Basically I'd want the same effect as closing and then starting bash again. If possible with the text in the window still intact, but that's probably much more complicated and I'd settle for losing it.
    – Zakamutt
    Nov 3, 2011 at 21:00

2 Answers 2

17

Run

bash --login

This will start a new bash login shell new loading your profile. It will inherit the other shells environment though, unless some values are overridden.

If you exit this bash, you'll be in your original shell again.

2
  • 2
    I guess you could use exec to start the new bash shell in the same process? Nov 3, 2011 at 21:15
  • 2
    exec bash seems to work, as does bash --login; exit. Alright, solved I guess.
    – Zakamutt
    Nov 3, 2011 at 21:24
5

You can load another shell in the terminal. Type:

bash

You can put some echo commentary in .bashrc to verify. To verify all aliases type:

alias

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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