LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 07-23-2014, 12:58 PM   #1
bulrush15
LQ Newbie
 
Registered: Jul 2014
Location: West Michigan
Posts: 29

Rep: Reputation: Disabled
.cshrc won't execute on login


CentOS 7.0 which we just installed as a VM

I have root access to the VM, via putty and ssh.

When I login to csh, my .cshrc in /root doesn't execute. How do I get it to execute?

Thanks.

EDIT: Holy smokes! 5 minutes after posting this it was the top result in a Google search!

Last edited by bulrush15; 07-23-2014 at 01:02 PM.
 
Old 07-24-2014, 07:59 AM   #2
pan64
LQ Guru
 
Registered: Mar 2012
Location: Hungary
Distribution: debian i686 (solaris)
Posts: 8,120

Rep: Reputation: 2270Reputation: 2270Reputation: 2270Reputation: 2270Reputation: 2270Reputation: 2270Reputation: 2270Reputation: 2270Reputation: 2270Reputation: 2270Reputation: 2270
Are you really sure about that?
check your login shell, home dir settings, permissions and try to insert an echo "this is my .cshrc" into .cshrc.
 
Old 07-24-2014, 09:53 AM   #3
bulrush15
LQ Newbie
 
Registered: Jul 2014
Location: West Michigan
Posts: 29

Original Poster
Rep: Reputation: Disabled
Yes I'm sure, my aliases were not getting set. I had to put this in my $HOME .login file:

source .cshrc

Then it worked.

Last edited by bulrush15; 07-25-2014 at 05:44 AM.
 
Old 07-25-2014, 01:16 AM   #4
pan64
LQ Guru
 
Registered: Mar 2012
Location: Hungary
Distribution: debian i686 (solaris)
Posts: 8,120

Rep: Reputation: 2270Reputation: 2270Reputation: 2270Reputation: 2270Reputation: 2270Reputation: 2270Reputation: 2270Reputation: 2270Reputation: 2270Reputation: 2270Reputation: 2270
It depends on how csh was compiled, here is the official man page:
Quote:
A login shell begins by executing commands from the system files /etc/csh.cshrc and /etc/csh.login. It then executes commands from files in the user's home directory: first ~/.tcshrc (+) or, if ~/.tcshrc is not found, ~/.cshrc, then ~/.history (or the value of the histfile shell variable), then ~/.login, and finally ~/.cshdirs (or the value of the dirsfile shell variable) (+). The shell may read /etc/csh.login before instead of after /etc/csh.cshrc, and ~/.login before instead of after ~/.tcshrc or ~/.cshrc and ~/.history, if so compiled; see the version shell variable.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Patching SW14.1 breaks it completely (/bin/login won't execute) ga_flyer Slackware 5 04-18-2014 12:52 AM
sorting out .cshrc and .login files, difference of mjepsen Linux - Software 1 10-10-2012 02:09 PM
.cshrc and .login files jenser2 Linux - Newbie 2 03-19-2008 06:05 AM
have my .cshrc or .login invoke bash mattie_linux Linux - Newbie 1 06-06-2007 04:16 PM
.login, .bashrc or .cshrc ??? tuananhbirm Linux - General 1 01-20-2005 10:44 AM


All times are GMT -5. The time now is 06:52 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration