Created
January 16, 2021 13:03
-
-
Save vctrtvfrrr/ac6e9942c5ea68a206aaac5a219c87ad to your computer and use it in GitHub Desktop.
Aliases for Bash and ZSH
This file contains hidden or 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
# APT | |
alias dpki='sudo dpkg -i' | |
alias apti='sudo apt install -y' | |
alias update="sudo apt-get update ; sudo apt-get -y upgrade ; sudo apt-get -y dist-upgrade; aptclean" | |
alias aptclean="sudo apt-get -y autoremove ; sudo apt-get -y autoclean; sudo apt-get install -f ; sudo apt-get clean" | |
# Files & folders | |
alias ..='cd ..' | |
alias ...='cd ../..' | |
alias ....='cd ../../..' | |
alias mkcd='foo(){ mkdir -p "$1"; cd "$1" }; foo ' | |
alias octal='stat -c "%a %n"' | |
alias lla='ls -la' | |
alias ls='ls --group-directories-first --color' | |
alias tree="find . -print | sed -e 's;[^/]*/;|____;g;s;____|; |;g'" | |
# System | |
alias psa="ps auxf" | |
alias psg="ps aux | grep -v grep | grep -i -e VSZ -e" | |
alias meminfo='free -m -l -t' | |
# Git | |
alias gl='git log --graph --pretty=format:"%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset" --abbrev-commit' | |
alias nah='git reset --hard && git clean -df' | |
# Shortcuts | |
alias showalias="cat ~/.aliases" | |
alias myip='curl http://ipecho.net/plain; echo' | |
alias hs='history | grep' | |
alias snano='sudo nano' | |
alias dcom='docker-compose' |
This file contains hidden or 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
# ... | |
# Includes the alias file | |
if [ -f ~/.aliases ]; then | |
. ~/.aliases | |
fi | |
# ... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment