I opened my .bashrc file using nano .bashrc in terminal. After that, at the end of the .bashrc file I added following lines

export PATH= "$PATH:$HOME/moltemplate/moltemplate” 
export PATH= "$PATH:$HOME/moltemplate/moltemplate/scripts”

after that, I restarted my terminal and I am getting like in the figureenter image description here

Now I don't understand in which path my .bashrc file is because I can't see anything .bashrc file by using ls -a command.

  • 8
    Please, don't post images of text
    – Kusalananda
    Dec 25, 2020 at 11:08
  • 2
    You have a typo: There should be no space around the =. Also, you do not need to export the PATH variable, as it is already an environment variable. You also seem to be using "fancy quotes" ( rather than "), probably due to writing in a word processor or on macOS?
    – Kusalananda
    Dec 25, 2020 at 11:09

2 Answers 2


.bashrc file will always be in your home folder which is in ~/.bashrc path

Just add following to ~/.bashrc and do source ~/.bashrc


You don't need to add export in .bashrc and ~ in path means home folder of the user running command, .bashrc will always be in the root of your home folder. You can also use $HOME instead if ~ which will also point to your home folder.

You can't have white space after the = sign and you need to use "" type of quotes instead of "” you used

  1. export sets a flag on a variable in the current context, making it available to sub-shells. This means it only has to be exported once, not every time it's changed.
  2. Unlike most other languages, whitespace is used to separate what are misleadingly called "words". So PATH= "$PATH:$HOME/moltemplate/moltemplate” is two words, but a variable assignment must be a single word. If you remove the space the assignment works, otherwise each of those words become a separate parameter to export. And since a colon-separated set of paths is definitely not a valid variable name, you get the "not a valid identifier" error.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .