Last active
September 29, 2017 01:50
-
-
Save boseji/1e2e05396b7897c39fd831f83dfedcdc to your computer and use it in GitHub Desktop.
Handly Aliases for the Linux Shell
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
#!/bin/sh | |
alias ll='ls -alF' | |
alias la='ls -aol' | |
alias l='ls -CF' | |
alias c='clear' | |
alias d='cd ..' | |
alias cd..='cd ..' | |
alias ..='cd ..' | |
alias ...='cd ../../../' | |
alias ....='cd ../../../../' | |
alias grep='grep --color=auto' | |
alias bc='bc -l' | |
alias sha1='openssl sha1' | |
alias mkdir='mkdir -pv' | |
alias path='echo -e ${PATH//:/\\n}' | |
alias now='date +"%T"' | |
alias nowdate='date +"%d-%m-%Y"' | |
alias ping='ping -c 5' | |
alias fastping='ping -c 100 -s.2' | |
alias ports='netstat -tulanp' | |
alias wget='wget -c' | |
# Add an "alert" alias for long running commands. Use like so: | |
# sleep 10; alert | |
alias alert='notify-send --urgency=low -i "$([ $? = 0 ] && echo terminal || echo error)" "$(history|tail -n1|sed -e '\''s/^\s*[0-9]\+\s*//;s/[;&|]\s*alert$//'\'')"' | |
# For Super user Aliases | |
if [ $UID -ne 0 ]; then | |
alias reboot='sudo reboot' | |
alias update='sudo apt-get update && sudo apt-get upgrade' | |
alias apt-get='sudo apt-get' | |
alias root='sudo -i' | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment