Skip to content

Instantly share code, notes, and snippets.

@altwitt
Created August 30, 2024 08:15
Show Gist options
  • Save altwitt/b7033d7b8353f33bd07d87c553c925c3 to your computer and use it in GitHub Desktop.
Save altwitt/b7033d7b8353f33bd07d87c553c925c3 to your computer and use it in GitHub Desktop.
###################################################################
# _______ _ _________ _______ _______ _______ _______
# ( ___ )( \ \__ __/( ___ )( ____ \( ____ \( ____ \
# | ( ) || ( ) ( | ( ) || ( \/| ( \/| ( \/
# | (___) || | | | | (___) || (_____ | (__ | (_____
# | ___ || | | | | ___ |(_____ )| __) (_____ )
# | ( ) || | | | | ( ) | ) || ( ) |
# | ) ( || (____/\___) (___| ) ( |/\____) || (____/\/\____) |
# |/ \|(_______/\_______/|/ \|\_______)(_______/\_______)
###################################################################
# Calculator
alias bc="bc -l"
# Clear
alias c="clear"
lias .1="cd .."
alias .2="cd ../.."
alias .3="cd ../../.."
alias .4="cd ../../../.."
alias .5="cd ../../../../.."
# Install & Update utilties
alias sai="sudo apt install"
alias sai="sudo apt-get install"
alias sau="sudo apt update"
alias sau="sudo apt-get update"
alias update="sudo apt update"
alias update="yum update"
alias updatey="yum -y update"
# System state
alias reboot="sudo /sbin/reboot"
alias poweroff="sudo /sbin/poweroff"
alias halt="sudo /sbin/halt"
alias shutdown="sudo /sbin/shutdown"
alias flighton='sudo rfkill block all'
alias flightoff='sudo rfkill unblock all'
alias snr='sudo service network-manager restart'
# Show open ports
alias ports='sudo netstat -tulanp'
# 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"
# 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"
# Resume wget by default
alias wget="wget -c"
# 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
alias most='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'
# List commands
alias l="ls"
alias l='ls -lAh'
alias ls="ls -a"
alias la="ls -a"
alias ll="ls -al"
# Ping Commands
alias pg="ping google.com -c 5"
alias pt="ping facebook.com -c 5"
alias ping="ping -c 5"
alias fastping="ping -c 100 -s.2"
alias myip='nm-tool'
alias setclip='xclip -selection c'
alias getclip='xclip -selection clipboard -o'
#update PC
alias powerup="sudo apt-get -y update ; sudo apt-get -y upgrade"
#edit bashrc and allow it to be used in current session
alias bashrc="vim ~/.bashrc && source ~/.bashrc"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment