Improving the command line experience

Adjusting OSX Terminal with bash, rearranging and enabling colours to allow for easier scanning and readability. Located in user home directory, .bash_profile can be edited with nano .bash_profile or preferred editor.

The following can be added to the file:

export PS1="\[\033[36m\]\u\[\033[m\]@\[\033[32m\]\h:\[\033[33;1m\]\w\[\033[m\]\$ "  
export CLICOLOR=1  
export LSCOLORS=ExFxBxDxCxegedabagacad  
alias ls='ls -GFh'  
  1. Changes the bash prompt to be colorised, and rearranges the prompt to be username@hostname:cwd $

  2. Enables command line colours

  3. Defines colours for the ls command

  4. This alias includes a few flags by default. G colorises output, h makes sizes human readable and F prints a / after a directory, * after an executable, and a @ after a symlink, making it easier to quickly identify things in directory listings.

alt

Further customisation options and reading here.

Show Comments