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
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)
a nice article about this.
export PS1="\[$(ppwd)\]\u@\h:\W>" # if change W to w it will show the full path
pre-load some modules
module load python cray-netcdf