NASA Newbie - /bin/tcsh User ported to Linux - How to set PATH
Greetings,
We've just been herded off SGI Main Frames to Altix/Linux. This user has favored /bin/tcsh and would like to stay with it in Linux. Question: How is the PATH variable set? UNIX is, of course, .login .cshrc, etc.. I haven't got a clue how to append to the default PATH. Any takers? |
Quote:
edited to add: and in tcshrc, to add to the path, you do something like: Code:
setenv PATH ${PATH}:/other/path:/one/more:${HOME}/bin |
Welcome to LQ!!
Where in NASA?? (I'm at an obscure quasi-center in Pasadena...;)) The PATH variable is set/modified in one or more of the init scripts---which one(s) depends on the distribution. I'm not sure how it is affected by your choice of shell. In BASH at least, you append to the PATH thusly: export PATH=$PATH:/etc/X11 (In this example, I added /etc/X11 to my PATH) |
Many Thanks to BrianK and pixellany for good info on how to append to the PATH environment variable. BrianK's advice hit the head spot on and pixellany's references were much appreciated.
wstaylor711 (MSFC/EV31) |
The info here from pixellany is a bit inaccurate.
The init files for the shell depends only on the shell, and not the distro. Bash reads a number of files, tcsh reads others. The man page for either of them will tell you the files that are involved. I don't think that unix vs. linux is a factor here at all, unless I misunderstood something. |
Quote:
|
Quote:
Most init systems depends on bash (or any other shell) to do some tasks. That means that some of the init scripts will be shell code, so yes: in that sense, some of the scripts that will be sourced at startup depends on the distro. But my point was that these are not shell initialization files. That they are bash code is a mere coincidence, and a design decision of the people who designed the init system of that distro. The bash initialization files are very well documented on the bash man pages, and having one or another distro doesn't change that (unless the distro maintainer patches bash, of course). They are always the same files, and they are always read on the same very order, and depending on whether the shell is or not a login shell one or another file is used. It's all in the man page, "INVOCATION" section. And I guess that the same is true for tcsh, ksh or whatever shell. Out of curiosity, I googled for the tcsh man page and on a first sight you can see a section called "Startup and shutdown", there you can see: Quote:
|
Many thanks pixellany and i92juboj for further responses to my initial query. I have been able to append the the system set PATH variable based on BrianK's input and have reviewed these recent additions with further interest. What a forum! You guys are great! I am pleased to have my understanding challenged and my noggin expanded.
|
All times are GMT -5. The time now is 12:20 PM. |