Link to home
Start Free TrialLog in
Avatar of tian
tian

asked on

setting enviroment viriables

After i login into my linux account,the default shell is bash, how can i set the default to tcsh.Also I check the my home directory,there is no .cshrc or .login files. I don't know in which files my PATH variable is set. In /etc/csh.login file, the PATH which is set is different from what displys on the screen when I type "echo $PATH".  
ASKER CERTIFIED SOLUTION
Avatar of dhm
dhm

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
It's just a bit more complicated.

About PATH:

  in csh, tcsh you may set it in any of the configuration files
  (/etc/csh.cshrc ~/.cshrc ~/.login etc.) as follows

      setenv PATH "${PATH}:/you/path:/and/more/pathes"

  is the same as

      set path = ($path /you/path /and/more/pathes)


And about the configuration files, some hints
(unfortunately E-E may destroy the formating tabs and blanks):

#?      Some  schemas, depending on shell and operating system,
#?      in order they
#?      are called. A  -  below indicates that it is only called
#?      at login:
#?
#?          bash
#?          --------
#?              Linux:
#?                      -1) /etc/profile
#?                      -2) if ~/.bash_profile exists, source it
#?                          else if ~/.bash_login exists, source it
#?                               else if ~/.profile exists, source it
#?                       3) ~/.bashrc
#?
#?          csh
#?          --------
#?              AIX:
#?                      -1) /etc/csh.cshrc
#?                      -2) /etc/csh.login
#?                       3) ~/.cshrc
#?                      -4) ~/.login
#?              HP-UX:
#?                      -1) /etc/src.csh
#?                      -2) /etc/csh.cshrc
#?                      -3) /etc/csh.login
#?                       4) ~/.cshrc
#?                      -5) ~/.login
#?              IRIX:
#?                      -1) /etc/cshrc
#?                      -2) /etc/csh.login
#?                       3) ~/.cshrc
#?                      -4) ~/.login
#?
#?          ksh, sh
#?          --------
#?              AIX:
#?                      -1) /etc/profile
#?                      -2) ~/.profile
#?              HP-UX:
#?                      -1) /etc/src.sh
#?                      -2) /etc/profile
#?                      -3) ~/.profile
#?              IRIX:
#?                      -1) /etc/profile
#?                      -2) ~/.profile
#?
#?          tsh
#?          --------
#?              AIX:
#?                      -1) /etc/tsh_profile
#?                      -2) ~/.profile
#?
#?          tcsh
#?          --------
#?              Linux (if compiled traditionally):
#?                       1) /etc/csh.cshrc
#?                      -2) /etc/csh.login
#?                       3) if ~/.tcshrc exists, source it
#?                          else ~/.cshrc exists, source it
#?                      -4) ~/.history
#?                      -5) ~/.login
#?                      -6) ~/.cshdirs
#?              Linux (if compiled as special version):
#?                      -1) /etc/csh.login
#?                       2) /etc/csh.cshrc
#?                      -3) ~/.login
#?                       4) if ~/.tcshrc exists, source it
#?                          else ~/.cshrc exists, source it
#?                      -5) ~/.history
#?                      -6) ~/.cshdirs
#?
#?          zcsh
#?          --------
#?              Linux:
#?                        1) /etc/zshenv
#?                        2) ~/.zshenv
#?                       -3) /etc/zprofile
#?                       -4) ~/.zprofile
#?                        5) /etc/zshrc
#?                        6) ~/.zshrc
#?                       -7) /etc/zlogin
#?                       -8) ~/.zlogin

Avatar of tian
tian

ASKER

Thanks ahoffmann!
Hmm, dhm's answer was accepted, so I gave just a lot of hints ;-)