터미널에 alias를 지정하여 자주 사용하는 command를 빠르게 사용할 수 있다.
vi ~/.zshrc
: alias 입력 및 수정 (or bashrc
)나는 아래와 같은 alias를 등록해두었다.
# Port
alias kill9999='kill -9 $(lsof -t -i tcp:9999)'
alias nsl='netstat -na | grep LISTEN | grep $1'
alias lsof8080='lsof -i:8080'
alias lsof8082='lsof -i:8082'
# Git
alias gitb='git branch'
alias gitl='git log'
alias gits='git status'
alias gitc='git checkout'
alias gitsl='git stash list'
alias gitsa='git stash apply'
alias gitsp='git stash pop'
alias gits='git stash'
alias gitpullrc='git pull origin rc'
입력이 끝났으면 `source ~/.zshrc
로 파일 저장하면 끝