Because of the serious bug, BashShock, released recently, I played with bash a little bit. Here are some notes:
/bin/sh
/bin/bash
/usr/local/bin/bash
/bin/sh is the shell, and you can the shell scirpts are starting with #!/bin/sh.
Most of the default shell is bash. You can change the default shell using $chsh command
If you install the bash from source code, the bash maybe installed under /usr/local/bin directory.
After you installation, if you type $which bash, it should show /usr/local/bin/bash.
What if you want to change the bash back to /bin/bash:
You can do $ export PATH=/bin/:$PATH. This command will put the /bin/ in the beginning of the PAHT. If you type $which bash, it should show /bin/bash. This is because the searching is from the beginning of the $PATH.
No comments:
Post a Comment