Skip to content

Latest commit

 

History

History
135 lines (69 loc) · 3.22 KB

aliases-list.md

File metadata and controls

135 lines (69 loc) · 3.22 KB

Aliases List

NOTE

To bypass an alias, preceed the command with a '\'

EG: >ls< is aliased, to use the normal "ls" type: \ls

Full List

  1. Get IP

alias myip='echo $(wget -qO - https://api.ipify.org)'

  1. Get local IPs

alias localip="ifconfig | sed -En 's/127.0.0.1//;s/.*inet (addr:)?(([0-9]*\.){3}[0-9]*).*/\2/p'"

  1. Add attrib command

alias attrib='chmod'

  1. Add del command

alias del='rm'

  1. Prints directory contents as a nice list

alias list='ls -la'

  1. Adds tasklist command and beautifies ps output

alias tasklist='ps -uxa | less'

  1. Adds cls command

alias cls='clear'

  1. Add command to show hidden files in directory

alias lshidden='ls -d .* --color=auto'

  1. Beautify mount command

alias mount='mount |column -t'

  1. Limits number of pings to 4

alias ping='ping -c 4'

  1. Lists open listening ports

alias listenports='netstat -tulanp | grep LISTEN'

  1. Lists all ports

alias allports='netstat -tulanp'

  1. Display memory info

alias meminfo='free -m -l -t'

  1. get top process eating memory

alias psmem='ps auxf | sort -nr -k 4'

alias psmem10='ps auxf | sort -nr -k 4 | head -10'

  1. get top process eating cpu

alias pscpu='ps auxf | sort -nr -k 3'

alias pscpu10='ps auxf | sort -nr -k 3 | head -10'

  1. Get CPU info

alias cpuinfo='lscpu'

  1. Add command to reload bash

alias bashreload="source ~/.bashrc && echo Bash config reloaded"

  1. Add command to show beautified disk usage

alias diskusage='df -h'

  1. Add command to display command usage statistics

alias cmdusage='history | awk '\''{CMD[$2]++;count++;}END { for (a in CMD)print CMD[a] " " CMD[a]/count*100 "% " a;}'\'' | grep -v "./" | column -c3 -s " " -t | sort -nr | nl | head -n10'

  1. Add command to upgrade Kali easily

alias upgrade_kali='apt-get update && apt-get upgrade'

  1. Add command to perform a speedtest. Adjust the url depending your country for better results (default: Greece NTUA)

alias speedtest='wget -O /dev/null http://ftp.ntua.gr/pub/linux/debian-cd/current-live/amd64/iso-hybrid/debian-live-9.4.0-amd64-cinnamon.iso'

  1. Add command to copy directory path to clipboard

alias clipdir='pwd | xclip'

  1. Add command to go back a directory

alias back='cd $OLDPWD'

  1. Add command to show full date and time

alias now='date '\''+%A %d %B %Y - %T'\'''

  1. For mpsyt to work you need mps-youtube and youtube-dl

alias playstewie='mpsyt playurl https://www.youtube.com/watch?v=rdHZG7XbpBc'

alias rickroll='mpsyt playurl https://www.youtube.com/watch?v=XOP10LM0c-A'

  1. Apt-get aliases. Grabbed from here

alias sai='apt-get install'

alias sar='apt-get remove'

alias saar='apt-get autoremove'

alias sau='apt-get update'

alias saup='apt-get upgrade'

  1. Netstat operations. Grabbed from here

alias netstat80="netstat -plan|grep :80|awk {'print $5'}|cut -d: -f 1|sort|uniq -c|sort -nk 1"

alias netstatports="netstat -nape --inet"

alias netstatpid="netstat -tlnp"

alias netstatapps="netstat -lantp | grep -i stab | awk -F/ '{print $2}' | sort | uniq"