Skip to content

Instantly share code, notes, and snippets.

@rnwilson
Last active June 5, 2018 07:56
Show Gist options
  • Save rnwilson/6b1061b77c9a4a2f67100702f65eca41 to your computer and use it in GitHub Desktop.
Save rnwilson/6b1061b77c9a4a2f67100702f65eca41 to your computer and use it in GitHub Desktop.
#common
alias cls='clear'
alias ipaddr='curl ifconfig.me'
## pass options to free ##
alias meminfo='free -m -l -t'
## get top process eating memory
alias psmem='ps auxf | sort -nr -k 4'
alias psmem10='ps auxf | sort -nr -k 4 | head -10'
## get top process eating cpu ##
alias pscpu='ps auxf | sort -nr -k 3'
alias pscpu10='ps auxf | sort -nr -k 3 | head -10'
## Get server cpu info ##
alias cpuinfo='lscpu'
## older system use /proc/cpuinfo ##
##alias cpuinfo='less /proc/cpuinfo' ##
## get GPU ram on desktop / laptop##
alias gpumeminfo='grep -i --color memory /var/log/Xorg.0.log'
# open ports
alias ports='netstat -tulanp'
## get rid of command not found ##
alias cd..='cd ..'
## a quick way to get out of current directory ##
alias ..='cd ..'
alias ...='cd ../../../'
alias ....='cd ../../../../'
alias .....='cd ../../../../'
alias .4='cd ../../../../'
alias .5='cd ../../../../..'
## Colorize the ls output ##
alias ls='ls --color=auto'
## Use a long listing format ##
alias ll='ls -la'
## Show hidden files ##
alias l.='ls -d .* --color=auto'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment