I've recently become a convert to the use of aliases which make life so much simpler and more enjoyable. Its so nice to
just enter into a terminal upgrade
and it executes the command sudo apt-get upgrade
!
It saves time using these short-cuts, but you do have to remember them to be effective.
#aliases for bashrc
alias tc='/home/boztu/truecrypt --fs-options=users,uid=$(id -u),gid=$(id -g),fmask=0113,dmask=0002 --mount /home/boztu/Documents/foo'
alias egrep='egrep --color=auto'
alias fgrep='fgrep --color=auto'
alias get='get_iplayer/get_iplayer'
alias grep='grep --color=auto'
alias install='sudo apt-get install'
alias l='ls -CF'
alias la='ls -A'
alias myip='curl ifconfig.me'
alias ping='ping -c3 -n -i 0.2 -W1'
alias pingg='ping www.google.co.uk'
alias pingm='ping 10.0.0.1'
alias pings='ping 192.168.0.1'
alias rav='rsync -a -v'
alias h='history'
alias j="ctodo"
alias l="ls -l "
alias ll="ls -l"
alias ls="ls -F"
alias pu="pushd"
alias po="popd"
alias remove='sudo apt-get autoremove'
alias rm='rm -iv'
alias search='sudo apt-cache search'
alias ss='gksudo software-properties-gtk'
alias update='sudo apt-get update'
alias upgrade='sudo apt-get upgrade'
alias acs='apt-cache search'
alias agi='sudo apt-get install'
alias uu='sudo apt-get update && sudo apt-get upgrade'
alias uuf='sudo apt-get update && sudo apt-get dist-upgrade'
alias snw='sudo netwatch'
alias vn='vnstat'
alias cd='cdh'
alias conk='/home/boztu/ssc.sh'
alias sources='sudo leafpad /etc/apt/sources.list'
#alias greps='echo apt-cache show ***| grep -i description -A 8'
alias nm='ncmpcpp'
alias radio='ncmpc'
alias weather='ctw UKXX0091'
alias idc='identicurse'
alias empty='rm -rf /home/boztu/.local/share/Trash/files'
alias swaps='sudo swapoff -a && sudo swapon -a'
alias bozcron='crontab -u boztu /home/boztu/cron/boztu.crontab'
alias rootcron='sudo crontab -u root /home/boztu/cron/root.crontab'
alias show='apt-cache show'
alias home='dhomepage'
alias c='clear'
# some more ls aliases
alias ll='ls -l'
alias la='ls -A'
alias l='ls -CF'
## Colorize the ls output ##
alias ls='ls --color=auto'
## Use a long listing format ##
alias ll='ls -la'
## Show hidden files ##
alias l.='ls -d .* --color=auto'
## a quick way to get out of current directory ##
alias ..='cd ..'
alias ...='cd ../../../'
alias ....='cd ../../../../'
alias .....='cd ../../../../'
alias .4='cd ../../../../'
alias .5='cd ../../../../..'
#to show server ports
alias ports='netstat -tulanp'
## shortcut for iptables and pass it via sudo#
alias ipt='sudo /sbin/iptables'
# distro specific - Debian / Ubuntu and friends #
# install with apt-get
alias apt-get="sudo apt-get"
alias updatey="sudo apt-get --yes"
## pass options to free ##
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 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'
## set some other defaults ##
alias df='df -H'
alias du='du -ch'
# top is atop, just like vi is vim
alias top='atop'
# Editors:
alias vi='vim'
alias v='vim'
alias sv='sudo vim'
alias l='leafpad'
alias sn='sudo leafpad'
alias g='geany'
alias sg='sudo geany'
alias alsamixer='alsamixer -V all'
There is a new site, only appeared this year, for other alias sources - http://alias.sh
Put the following into your .bashrc
, and name the aliases file as .bash_aliases
# Alias definitions.
# You may want to put all your additions into a separate file like
# ~/.bash_aliases, instead of adding them here directly.
# See /usr/share/doc/bash-doc/examples in the bash-doc package.
if [ -f ~/.bash_aliases ]; then
. ~/.bash_aliases
fi
Comments
comments powered by Disqus