Created
September 20, 2023 07:58
-
-
Save swdream/52632ded39e0c74db2a4b866e8726cd0 to your computer and use it in GitHub Desktop.
setup_bash.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Shell | |
### Check Shell | |
echo $SHELL | |
### Switch Shell | |
chsh -s /bin/bash | |
# bashrc | |
``` | |
~ % cat ~/.bashrc | |
export LC_ALL=en_US.UTF-8 | |
export LANG=en_US.UTF-8 | |
export GOPATH="$HOME/go" | |
export PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/usr/bin/python/:/usr/local/bin/go:$GOPATH/bin:/opt/homebrew/bin" | |
if [ -f ~/.bash_aliases ]; then | |
source ~/.bash_aliases | |
fi | |
# git completion | |
if [ -f ~/.git-completion.bash ]; then | |
source ~/.git-completion.bash | |
fi | |
if [ -f $(brew --prefix)/etc/bash_completion ]; then | |
source $(brew --prefix)/etc/bash_completion | |
fi | |
``` | |
# bash_profile | |
``` | |
% cat ~/.bash_profile | |
export MONGO_PATH=/usr/local/mongodb | |
export PATH="$PATH:$MONGO_PATH/bin;/usr/local/opt/go/libexec/bin" | |
if [ -f ~/.bashrc ]; then | |
source ~/.bashrc | |
fi | |
if [ -f ~/.bash_aliases ]; then | |
source ~/.bash_aliases | |
fi | |
if [ -f $(brew --prefix)/etc/bash_completion ]; then | |
. $(brew --prefix)/etc/bash_completion | |
fi | |
# The next line updates PATH for the Google Cloud SDK. | |
if [ -f '/Users/swdream/Downloads/google-cloud-sdk/path.bash.inc' ]; then source '/Users/swdream/Downloads/google-cloud-sdk/path.bash.inc'; fi | |
# The next line enables shell command completion for gcloud. | |
if [ -f '/Users/swdream/Downloads/google-cloud-sdk/completion.bash.inc' ]; then source '/Users/swdream/Downloads/google-cloud-sdk/completion.bash.inc'; fi | |
# export LDFLAGS="-L/usr/local/opt/[email protected]/lib" | |
# export CPPFLAGS="-I/usr/local/opt/[email protected]/include" | |
# export PATH="/usr/local/opt/[email protected]/bin:$PATH" | |
# export PATH="/usr/local/opt/[email protected]/bin:$PATH" | |
export PATH="/usr/local/opt/[email protected]/bin:$PATH" | |
``` |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment