### Categories

Recently I have been working on NERSC quite a lot. One thing that bothers me was that the default environment setup of NERSC user sucks. For example, it doesn’t have color scheme for ls command, the prompt is too long when you go deep into a few sub-directories because it shows the full path.

To fix this, I modified the .bashrc.ext file in the home directory (The system doesn’t allow you to change the .bashrc file).

I added three lines at the bottom of this file:

##### let the ls showing the color scheme automatically
alias ls='ls --color=auto'

##### make the prompt shorter by just showing the user (u) and host (h) , and the current directory (W)

export PS1="$(ppwd)$\u@\h:\W>"

module load python cray-netcdf