Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Possible Duplicate:
What are PATH and other environment variables, and how can I set or use them?

Every time I open my secureCRT window,I need to run the below to export the there a way to add this permanently to the PATH?

export PATH=/usr/bin:$PATH
share|improve this question

marked as duplicate by slhck Jan 17 '13 at 15:06

This question was marked as an exact duplicate of an existing question.

Yes there is, but it depends on the shell you are using. E.g. for csh it might be set in .cshrc, for bash in .bashrc', or just in .profile`. Can you add which shell you use to the post? – Hennes Jan 17 '13 at 14:51
@ Hennes - am using bash – user184692 Jan 17 '13 at 14:54

When you log in and start bash as a login shell (bash -l) these scripts will be read:

System wide:

  • /etc/profile
    (This one should be shell independent, since it may also be called from ksh, sh, etc etc).
  • /etc/bashrc/


  • ~/.profile
  • ~/.bash_profile (this one might actually source the .bashrc file)
  • ~/.bashrc

Decide if you want to make system wide, or user only changes. Then look for these files and select one of them. Add the path changes and start a new shell. Test. If it does not work, close the shell (with logout or Controld) and correct the typo.

Note that I did not write 'log out and start a new shell'.

share|improve this answer
Bash (at least when invoked interactively) looks for ~/.bash_profile, ~/.bash_login, and ~/.profile, in that order, and only sources the first when found, skipping the others. ~/.bashrc is only called for non-interactive startup (but for terminals on most *nix systems). See also: – slhck Jan 17 '13 at 15:06

Not the answer you're looking for? Browse other questions tagged or ask your own question.