commandlinefu.com is the place to record those command-line gems that you return to again and again.
You can sign-in using OpenID credentials, or register a traditional username and password.
Subscribe to the feed for:
This replaces the current bash session with a new bash session, run as an interactive non-login shell... useful if you have changed /etc/bash.bashrc, or ~/.bashrc
If you have changed a startup script for login shells, use
exec bash -l
Suitable for re-running /etc/profile, ~/.bash_login and ~/.profile.
edit: chinmaya points out that
env - HOME=$HOME TERM=$TERM bash -s "exec bash -l"
will clear any shell variables which have been set... since this verges on unwieldy, might want to use
alias bash_restart='env - HOME=$HOME TERM=$TERM bash -s "exec bash -l"'
There are 2 alternatives - vote for the best!
If you can do better, submit your command here.
You must be signed in to comment.