Mac shell
Mac shell
Mac use ZSH by default.
The config file is ~/.zshrc
, which needs to be created first.
# example zshrc
alias l="ls -lrth"
alias la="ls -lrtha"
alias ..="cd .."
alias ...="cd ../.."
alias ....="cd ../../.."
alias rmr="rm -r"
alias cpr="cp -r"
alias tl="tmux ls -F '[#{session_last_attached_string}] #S'"
alias taa="tmux a"
alias ta="tmux a -t"
alias tk="tmux kill-session"
alias tn="tmux new -s"
alias proxy_on="export http_proxy=http://127.0.0.1:7897/; export https_proxy=http://127.0.0.1:7897/"
alias proxy_off="unset http_proxy; unset https_proxy"
iterm2
Enable unlimited scrollback buffer:
iTerm2 --> Settings --> Profiles --> Terminal --> Check Unlimited scrooback.
Brew
The all-in-one shell package manager.
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
Add to PATH after installation:
export PATH=/opt/homebrew/bin:$PATH
Usage:
# package manager
brew install git tmux htop
brew uninstall ...
# also can install apps (cask)
brew install --cask firefox
# service manager
brew services start/stop/status colima
Scroll Reverser
Configure the scroll direction of mouse & touch pad to be different.
Use brew:
brew install scroll-reverser
Docker
brew install docker docker-compose colima
colima start/stop/status
brew services start colima
docker ps