Skip to content

Instantly share code, notes, and snippets.

@swdream
Created September 20, 2023 07:58
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save swdream/52632ded39e0c74db2a4b866e8726cd0 to your computer and use it in GitHub Desktop.
Save swdream/52632ded39e0c74db2a4b866e8726cd0 to your computer and use it in GitHub Desktop.
setup_bash.md
# 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/mysql@5.7/lib"
# export CPPFLAGS="-I/usr/local/opt/mysql@5.7/include"
# export PATH="/usr/local/opt/mysql@5.7/bin:$PATH"
# export PATH="/usr/local/opt/mysql@5.7/bin:$PATH"
export PATH="/usr/local/opt/mysql@5.7/bin:$PATH"
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment