alias command not working after re-login | Unix Linux Forums | UNIX for Dummies Questions & Answers

  Go Back    


UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

alias command not working after re-login

UNIX for Dummies Questions & Answers


Closed Thread    
 
Thread Tools Search this Thread Display Modes
    #1  
Old 09-24-2008
lsy lsy is offline
Registered User
 
Join Date: Aug 2008
Last Activity: 13 August 2014, 3:59 AM EDT
Posts: 14
Thanks: 0
Thanked 0 Times in 0 Posts
alias command not working after re-login

i create some alias in .cshrc file then i run source .cshrc to refresh it, the alias command work fine but when i relogin again, the alias command is not working... i need to re-run the source .cshrc command so that the alias only workable.
any idea on it?
Sponsored Links
    #2  
Old 09-24-2008
subhendu81 subhendu81 is offline
Registered User
 
Join Date: Sep 2008
Last Activity: 10 October 2014, 8:11 AM EDT
Location: pune
Posts: 82
Thanks: 0
Thanked 0 Times in 0 Posts
Hi lsy,

try the following 2 add alias

step1:
====
include the following line into your ".profile" file

ENV=$HOME/.cshrc
export ENV

step2:
=====

then edit the file ".cshrc" in your home directory and include your alias lines in that file as:

alias name=command

step3:
====
After that logout from your current session and re log-in.

Thanks
Subhendu
Sponsored Links
    #3  
Old 09-24-2008
era era is offline Forum Advisor  
Herder of Useless Cats (On Sabbatical)
 
Join Date: Mar 2008
Last Activity: 28 March 2011, 6:41 AM EDT
Location: /there/is/only/bin/sh
Posts: 3,653
Thanks: 0
Thanked 10 Times in 8 Posts
If your login shell is not .cshrc, you should probably not use .cshrc for alias definitions. If your login shell is csh or a compatible, it should be reading your .cshrc. I advise against the suggestion by Subhendu. What does echo $SHELL say?
    #4  
Old 09-24-2008
subhendu81 subhendu81 is offline
Registered User
 
Join Date: Sep 2008
Last Activity: 10 October 2014, 8:11 AM EDT
Location: pune
Posts: 82
Thanks: 0
Thanked 0 Times in 0 Posts
hi

i recomended to use .cshrc bcz..

in his query he has written abt .cshrc ....i thut shell must be CSH...if not so..then find out the shell as suggested by era and then follow the path i mentioned in my prev reply...
Sponsored Links
    #5  
Old 09-24-2008
lsy lsy is offline
Registered User
 
Join Date: Aug 2008
Last Activity: 13 August 2014, 3:59 AM EDT
Posts: 14
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by era View Post
If your login shell is not .cshrc, you should probably not use .cshrc for alias definitions. If your login shell is csh or a compatible, it should be reading your .cshrc. I advise against the suggestion by Subhendu. What does echo $SHELL say?
i think i made a mistake, i edit the .cshrc file not in the login shell. cause the .cshrc file not load when i login...
now i edit in the correct .cshrc file and it work...
thanks everyone.
Sponsored Links
    #6  
Old 09-24-2008
lsy lsy is offline
Registered User
 
Join Date: Aug 2008
Last Activity: 13 August 2014, 3:59 AM EDT
Posts: 14
Thanks: 0
Thanked 0 Times in 0 Posts
when i hit backspace key it will show ^?
how can i place the stty erase ^? to omit it??
i place this command in the .cshrc file but when i re-login the backspace come out same again ^?
any idea?
Sponsored Links
    #7  
Old 09-24-2008
subhendu81 subhendu81 is offline
Registered User
 
Join Date: Sep 2008
Last Activity: 10 October 2014, 8:11 AM EDT
Location: pune
Posts: 82
Thanks: 0
Thanked 0 Times in 0 Posts
hi,

thrug which u r connecting to unix server..?
Sponsored Links
Closed Thread

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Alias in mailrc not working when mailing to a distribution list using mailx command anandsbr Shell Programming and Scripting 1 10-26-2011 10:06 PM
cp command not working with alias prashdeep UNIX for Dummies Questions & Answers 2 10-03-2011 04:57 PM
Simple question: alias not working for root aixlover Solaris 2 04-07-2011 09:34 AM
Alias not working dkranes Solaris 5 03-23-2009 12:53 PM
alias not working in scripts Nagapandi UNIX for Dummies Questions & Answers 2 06-21-2008 08:25 AM



All times are GMT -4. The time now is 09:37 AM.