User Tools

Site Tools


computers:bash

Bash Aliases

bash aliases are a time saving mechanism. You can alias a longer command you type often to a single word as follows:

  1. open ~/.bash_aliases in your favorite text editor
  2. alias a command as follows:

alias temp='cd /projects/temp/'

alias x='xterm &'

bash_profile

~/.bash_profile is loaded every time you login to unix. You can do many handy things with it, one is to differentiate between the fishtank and element machines by setting the command lines to different colors:

  1. open ~/.bash_profile
  2. for each fishtank/element machine define a color as follows:
  case $HOST in
      sodium) prompt red ;;
      brill) prompt blue ;;
  esac
computers/bash.txt · Last modified: 2010/09/13 17:35 by ratkiewi