During my login to my Linux environment via ssh the .cshrc file in my home directory is not read. Each time I had to read this file after login via source ~/.cshrc

I use MobaXTerm Professional 10.5 as a tool and my shell is a tcsh shell which I can confirm via

echo $SHELL

I already tried to add files like .login and .tcshrc to source the .cshrc file, but nothing helped.

How can I enable reading the .cshrc file via ssh login?


There are multiple files parsed by this shell:


The two firsts are system wide. The tree others are user related.

Maybe there is something wrong in your syntaxe. Try a simple file ~/.tcshrc containing:

echo "test"

It should output "test" before the prompt like this:

workstation:~ user$ cat ~/.tcshrc 
echo "test"
workstation:~ user$ /bin/tcsh 
[workstation:~] user%

Same output on remote with the following command: ssh -t user@workstation tcsh

  • 1
    And of the three user related files, .tcshrc is only read if it exists, and .cshrc is only read if it exists and .tcshrc does not. .login is only read on login shells. – Tim Kennedy Jan 23 '18 at 19:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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