Z Shell
Defines environment variables and settings for your Z shell environment
Location
~/.zshrc
open ~/.zshrc
Reload Configuration
source ~/.zshrc
Explanation
info
Please note that it's perfectly normal to feel confused or unsure about certain concepts. This documentation is designed to guide you through the concepts step-by-step. By the end, you'll have a solid grasp of the topic. For now you can skip the things you don't understand.
Comments
: Lines beginning with#
are comments and are ignored by the shell.Environment Variables
: Lines starting withexport
define environment variables. These variables are used to store information that can be accessed by other programs or scripts running in your shell.Alias
: Defines analias
. This allows you to run a command or a script using a shorter command.
# brew
export BREW_HOME="/opt/homebrew"
export PATH="$BREW_HOME/bin:$PATH"
# postgresql
export POSTGRES_HOME="$BREW_HOME/opt/postgresql@14"
export PATH="$POSTGRES_HOME/bin:$PATH"
# rust
export PATH="$HOME/.cargo/bin:$PATH"
# nvm
export NVM_DIR="$HOME/.nvm"
[ -s "$HOMEBREW_PREFIX/opt/nvm/nvm.sh" ] && \. "$HOMEBREW_PREFIX/opt/nvm/nvm.sh"
# platform-tools
export PATH="$HOME/development/platform-tools:$PATH"
# dart and flutter
export FLUTTER_HOME="$HOME/development/flutter"
export PATH="$FLUTTER_HOME/bin:$PATH"
export PATH="$FLUTTER_HOME/.pub-cache/bin:$PATH"
export PATH="$FLUTTER_HOME/bin/cache/dart-sdk/bin:$PATH"
export PATH="$HOME/.pub-cache/bin:$PATH"
# terminal
export PS1="%. \$ "
# alias
alias sysperfomance="/Users/$USER/development/scripts/monitor-system-performance.sh"
monitor-system-performance.sh
#!/bin/bash
# Monitor CPU usage
top
# Monitor memory usage
free
# Monitor disk usage
df -h