Editing .bashrc file on econstat6

Anirudh Yadav 2020-03-16 1 minute read

The .bashrc file is a script that runs automatically when the econstat6 server is accessed. There may be times when I need to edit it. For example, following Ben Butler’s instructions, I recently edited it so that Julia 1.3 loads automatically when I access the server. I also recently edited the file to set the environment variable JULIA_NUM_THREADS to 48 (which is the number of CPUs on econstat6).

Viewing .bashrc

The .bashrc file is a hidden file stored in the home directory /home/glusterfs/asyadav. To see that it is indeed there, in the home directory type

ls -la ~/ | more

To view the contents of the file type

cat .bashrc

The commands at the bottom of the file were added by me.

Editing .bashrc

To edit .bashrc we use a tool called nano.

To open the file in the nano editor type

nano ~/.bashrc

Then edit the file as you would any other text file. BE VERY CAREFUL NOT TO BREAK ANYTHING!

Once you’re done editing press CTRL+O to save. To exit the nano editor press CTRL+X then Enter when prompted to retain the name of the file.