Search code examples
shellunixcshtcsh

Unix - Csh: How to load new shell with clear environment?


I have a csh shell that is "dirty" with a lot of modifications in PATH, in LD_LIBRARY_PATH and in more environment variables.

I want to load a "clean" csh shell that will not "inherit" all the environment settings from the existing one, but that will only source the $HOME/.cshrc.USER file.

How shall I do such thing?

Thanks!


Solution

  • I've finally succeeded to do it by sshing to my localhost

    > setenv DUMMY 123
    > echo $DUMMY
    123
    > ssh localhost
    > echo $DUMMY
    DUMMY: Undefined variable