Created
October 5, 2018 18:51
-
-
Save Berkmann18/89bd8746453a75cfb13e4bc260fa23b1 to your computer and use it in GitHub Desktop.
bash aliases
This file contains 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
# Files/directories | |
alias ls="ls --color=always" #instead of auto | |
alias ll="ls -alF" | |
alias la="ls -A" | |
alias l="ls -CF" | |
alias sls="sudo ls" | |
alias sll="sudo ls -alF" | |
alias sla="sudo ls -A" | |
alias sl="sudo ls -CF" | |
alias grep="grep --color=always" | |
alias egrep="egrep --color=always" | |
alias fgrep="fgrep --color=always" | |
alias dir="dir --color=always" | |
alias vdir="vdir --color=always" | |
alias md="mkdir" | |
alias rd="rm -r" | |
alias smd="sudo mkdir" | |
alias srd="sudo rmdir" | |
alias srm="sudo rm" | |
alias frd="rmdir -f" | |
alias lsg="ls | grep" | |
alias lag="la | grep" | |
alias llg="ll | grep" | |
alias slsg="sudo ls | grep" | |
alias slag="sudo la | grep" | |
alias sllg="sudo ll | grep" | |
alias fu="rm -rf" | |
alias sfu="sudo rm -rf" | |
alias see="thunar" | |
alias eo="exo-open" | |
alias xo="xdg-open" | |
alias ldir="ls -d */" | |
alias lad="la -d */" | |
alias lld="ll -d */" | |
alias lhd="ls -d .*/" | |
alias lf="ls -F | grep -v /" | |
alias slf="sudo ls -F | grep -v /" | |
alias laf="la -F | grep -v /" | |
alias slaf="sudo la -F | grep -v /" | |
alias llf="ll -F | grep -v /" | |
alias sllf="sudo ll -F | grep -v /" | |
alias lh="ls -a | grep '^\.'" | |
alias cp="cp -i" | |
alias sucp="sudo cp -i" | |
alias df="df -h" | |
alias sizes="du -h -d 1 | sort -hr" | |
alias rsz="du -d 1 | sort -hr" | |
alias free="free -m" | |
alias diff="diff --color=always" | |
alias mp="mousepad" | |
alias np="nano -w PKGBUILD" | |
alias sz="wc -c <" #in bytes | |
#alias edit="nano -i0x" | |
alias svi="sudo vim" | |
alias sna="sudo nano" | |
alias smp="sudo mousepad" | |
alias smv="sudo mv" | |
alias npmreset="rm -rf node_modules; npm i" | |
alias npmls="npm ls --depth=0" | |
alias npml1="npm ls --depth=1" | |
alias npml2="npm ls --depth=2" | |
alias npmld="npm ls --only=dev" | |
alias npmld0="npmls --only=dev" | |
alias npmld1="npmls --only=dev" | |
alias npmlp="npm ls --only=prod" | |
alias npmlp0="npmls --only=prod" | |
alias npms="npm i --save" | |
alias npmsd="npm i --save-dev" | |
alias fuckfsevents="npm i --no-optional" | |
alias npmr="npmreset --no-optional" | |
alias na="npm audit" | |
alias naf="npm audit fix" | |
alias naff="naf --force" | |
alias nin="npm init" | |
alias emptyTrash="rm -rf ~/.local/share/Trash/files/*" | |
alias lsTrash="la ~/.local/share/Trash/files" | |
alias mkex="chmod u+x" | |
alias clip="xclip -sel clip" | |
alias clipin="clip <" | |
alias clipout="xclip -selection clipboard" | |
# Packages | |
alias pm="sudo pacman --color=always" | |
alias u="pm -Syu" | |
alias up="pm -Syyu" | |
alias i="pm -S" | |
alias ins="u && i" | |
alias fins="i --no-confirm" | |
alias unins="pm -Rs" | |
alias chpk="pm -Q | grep" #Qqe | |
alias wut="pm -Si" | |
alias wat="pm -Qi" | |
alias lookup="pm -Ss" | |
alias look="yaourt -Ss" | |
alias milk="yaourt -S" | |
alias pi3="sudo pip install" | |
alias pi2="sudo pip2 install" | |
alias sni="sudo npm i" | |
alias nig="npm i -g" | |
alias snig="sudo npm i -g" | |
alias pkls="pm -Qe" | |
#alias pmclean="pm -Rns $(sudo pacman -Qtdq)" | |
alias useless="pm -Qtdq" | |
alias cleancache="pm -Sc" | |
alias installs="cat /var/log/pacman.log | grep -iE 'installed' | cut -d ' ' -f5" | |
alias upgrades="cat /var/log/pacman.log | grep -iE 'upgraded' | cut -d ' ' -f5" | |
alias manup="sudo mandb" | |
# Apps | |
alias lo="libreoffice" | |
alias word="lo --writer" | |
alias excel="lo --calc" | |
alias math="lo --math" | |
alias draw="lo --draw" | |
alias base="lo --base" | |
alias ppt="lo --impress" | |
alias phplint="/usr/bin/php -l" | |
alias imgconv="convert -background transparent" #input.svg output.png | |
alias kp="wpp" #wps presentation | |
alias kw="wps" #wps word | |
alias ke="et" #wps spreadsheet | |
alias rdp="~/bin/rdp/./rdp" | |
alias pdf="evince" | |
alias pol="playonlinux" | |
alias xt="xfce4-terminal" | |
alias notu="xt & exit" | |
alias sound="pavucontrol" #alsamixer | |
alias ida="~/idafree-7.0/ida64" | |
# Others | |
alias myip="curl ifconfig.me" | |
#alias localip="ifconfig | grep -E 'inet (addr:)?([0-9]*\.){3}[0-9]*(.*?)broadcast'| grep -Eo 'inet (addr:)?([0-9]*\.){3}[0-9]*' | grep -Eo '([0-9]*\.){3}[0-9]*'" | |
alias webip="xo http://myiptools.net" #or sensible-browser | |
alias ips="ifconfig | grep -Eo 'inet (addr:)?([0-9]*\.){3}[0-9]*' | grep -Eo '([0-9]*\.){3}[0-9]*'" | |
alias wifitest="ping -c 100 8.8.8.8" | |
alias openport="netstat -lnt | awk '$6 == \"LISTEN\"'" | |
alias wifistat="iwconfig wlp2s0" | |
alias f5c="f5fpc -s -t webvpn.rhul.ac.uk -u zbvd647 -x" | |
alias f5d="f5fpc --stop" | |
alias f5i="f5fpc --info" | |
#alias dskv="desktop-file-validate" | |
alias topfreq="sudo iwlist wlp2s0 scan | grep Frequency | sort | uniq -c | sort -n" | |
alias speedtest="speedtest-cli --simple" | |
alias print="lp -d HP_ENVY_4500_series" | |
alias scan="scanimage --mode Color" #scanimage --format=png ... > image.png | |
alias campus="wifi campus && startx" | |
alias home="wifi && startx" | |
alias mum="wifi mum && startx" | |
alias rup="wifi rup && startx" | |
alias ethernet="ether && startx" | |
alias dad="wifi dad && startx" | |
alias wifimenu="sudo wifi-menu" | |
alias watchwifi="watch -n 1 cat /proc/net/wireless" | |
alias wifiscan="sudo iw wlp2s0 scan" | |
alias evil="killp dropbox mongod vbox" | |
# System | |
alias cls="clear" | |
#alias fuck="sudo $(history -p \!\!)" | |
alias quitx="pkill -15 Xorg" | |
alias reboot="sudo reboot" | |
alias halt="sudo poweroff" | |
alias suspend="sudo systemctl suspend" | |
alias hibernate="sudo systemctl hibernate" | |
alias monitorson="xrandr --prop | grep ' connected ' | cut --delimiter=' ' -f1" | |
alias monitorsoff="xrandr --prop | grep ' disconnected ' | cut --delimiter=' ' -f1" | |
alias volup="amixer set Master 1%+" | |
alias voldn="amixer set Master 1%-" | |
alias mute="amixer set Master toggle" | |
alias vols="vol s Master" | |
alias kblu="light -kA 1" | |
alias kbld="light -kU 1" | |
alias kblM="light -km" #light -kS 100 | |
alias kblm="light -kc" #light -kS 0 | |
alias lightu="light -A 1" | |
alias lightd="light -U 1" | |
alias lightM="light -m" | |
alias lightm="light -c" | |
alias lights="light -S" | |
# Git | |
alias gclone="git clone" | |
alias gpush="git push" | |
alias gcom="git commit" | |
alias gcae="gcom -ae" | |
alias gadd="git add" | |
alias gaa="gadd ." | |
alias gcam="gcom -am" | |
alias gpull="git pull" | |
alias gmerge="git merge" | |
alias gfetch="git fetch" | |
alias gstat="git status" | |
alias gin="git init" | |
#squash | |
alias gdif="git diff" | |
alias gda="gdif --staged" | |
alias glog="git log" | |
alias gla="glog --color --date-order --graph --oneline --decorate --all" #git adog | |
alias glc="glog --color --date-order --graph --oneline --decorate" | |
alias gtree="glog --graph --abbrev-commit --decorate --date=relative --all" | |
#some more in ~/.gitconfig | |
alias gbranch="git branch" | |
alias gbs="gbranch | cat" | |
alias grebase="git rebase" | |
alias greset="git reset" | |
alias gco="git checkout" | |
alias gtag="git tag" | |
alias gsm="git submodule" | |
alias herokupush="gpush heroku master" | |
alias gcal="ghcal -u Berkmann18" | |
alias wbranch="gbranch | grep -o '* [-A-Za-z_0-9]*' | cut -d ' ' -f2" | |
alias grm="git rm" | |
alias gremote="git remote" | |
alias grv="gremote -v" | |
alias gra="gremote add" | |
alias ggc="git gc --aggressive" | |
alias grl="git reflog" | |
alias gshow="git show" | |
alias gstash="git stash" | |
alias gfsck="git fsck --name-objects" | |
# Vars | |
export DB="${HOME}/Dropbox" | |
export G="${HOME}/GDrive" | |
export SHBIN="${G}/Script/bin" | |
export SHDIR="${G}/Script/sh" | |
export PYDIR="${G}/Script/py" | |
export APP="${HOME}/Apps" | |
export DL="${HOME}/Downloads" | |
export CDRIVE="${HOME}/.wine/drive_c" | |
export CDRIVE32="${HOME}/.wine32-dotnet/drive_c" | |
export PY2_PKG="/usr/lib/python2.7/site-packages" | |
export PY3_PKG="/usr/lib/python3.7/site-packages" | |
export EDITOR="/usr/bin/vim" | |
export WINEPREFIX="${HOME}/.wine32-dotnet" | |
export WINEARCH="win32" | |
#eval $(thefuck --alias) | |
export Y2="${G}/MSciCS/y2" | |
export Y3="${G}/MSciCS/y3" | |
export PROJ="${G}/Projects/" | |
export PUBLIC="${G}/Public/" | |
export POL="${HOME}/.PlayOnLinux" | |
export NODE_PATH="/usr/lib/node_modules/" | |
export GOPATH=$HOME/go | |
export PATH=~/bin:~/bin:${SHBIN}:${NODE_PATH}/bin:$PATH:/usr/local/go/bin:$GOPATH:$GOPATH/bin | |
# Colours | |
export fgFFF="\e[0m" | |
export fg000="\e[30m" | |
export fg888="\e[2m" | |
export fgF00="\e[31m" | |
export fg0F0="\e[32m" | |
export fg00F="\e[34m" | |
export fgF0F="\e[33m" | |
export fg0FF="\e[36m" | |
export fgFF0="\e[35m" | |
export alpha="\e[30m" | |
export bgFFF="\e[3m" | |
export bg000="\e[48m" | |
export bg888="\e[2;3m" | |
export bgF00="\e[41m" | |
export bg0F0="\e[42m" | |
export bg00F="\e[44m" | |
export bgF0F="\e[45m" | |
export bg0FF="\e[46m" | |
export bgFF0="\e[43m" | |
export bold="\e[1m" | |
#export italic="\e[m" | |
export underline="\e[4m" | |
#export strike="\e[m" | |
export LESS=-R | |
export LESS_TERMCAP_mb=$'\E[1;31m' #begin bold | |
export LESS_TERMCAP_md=$'\E[1;36m' #begin blink | |
export LESS_TERMCAP_me=$'\E[0m' #reset bold/blink | |
export LESS_TERMCAP_so=$'\E[01;44;33m' #begin reverse video | |
export LESS_TERMCAP_se=$'\E[0m' #reset reverse video | |
export LESS_TERMCAP_us=$'\E[1;32m' #begin underline | |
export LESS_TERMCAP_ue=$'\E[0m' #reset underline | |
#export MANPATH=/usr/share/man |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment