Skip to content

Instantly share code, notes, and snippets.

@altwitt
Last active March 31, 2026 05:23
Show Gist options
  • Select an option

  • Save altwitt/b7033d7b8353f33bd07d87c553c925c3 to your computer and use it in GitHub Desktop.

Select an option

Save altwitt/b7033d7b8353f33bd07d87c553c925c3 to your computer and use it in GitHub Desktop.
###################################################################
# _______ _ _________ _______ _______ _______ _______
# ( ___ )( \ \__ __/( ___ )( ____ \( ____ \( ____ \
# | ( ) || ( ) ( | ( ) || ( \/| ( \/| ( \/
# | (___) || | | | | (___) || (_____ | (__ | (_____
# | ___ || | | | | ___ |(_____ )| __) (_____ )
# | ( ) || | | | | ( ) | ) || ( ) |
# | ) ( || (____/\___) (___| ) ( |/\____) || (____/\/\____) |
# |/ \|(_______/\_______/|/ \|\_______)(_______/\_______)
###################################################################
alias c='clear'
# Navigation
alias c1='cd ..'
alias c2='cd ../..'
alias c3='cd ../../..'
# Install & Update utilties
alias sai='sudo apt install'
alias sai='sudo apt-get install'
alias sau='sudo apt update'
# Free and Used
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 details of a process
alias paux='ps aux | grep'
# Get server cpu info
alias cpuinfo='lscpu'
# Grabs the disk usage in the current directory
alias usage='du -ch | grep total'
# Gets the total disk usage on your machine
alias totalusage='df -hl --total | grep total'
# Shows the individual partition usages without the temporary memory values
alias partusage='df -hlT --exclude-type=tmpfs --exclude-type=devtmpfs'
# Gives you what is using the most space. Both directories and files. Varies on current directory
du -hsx ~ | sort -rh | head -10
# History commands
alias h='history'
alias h1='history 10'
alias h2='history 20'
alias h3='history 30'
alias hgrep='history | grep'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment