Results 1 to 8 of 8
When I issue 'alias' command it shows me all alias set. But where are these commands actually stored???...
- 05-24-2009 #1
where are alias stored
When I issue 'alias' command it shows me all alias set. But where are these commands actually stored???
Only if I could understand the man pages
Registered Linux user #492640
OS: RHEL4,5 ,RH 9,Ubuntu
- 05-24-2009 #2
Check the contents of .bash_profile file in your home folder.
It is amazing what you can accomplish if you do not care who gets the credit.
New Users: Read This First
- 05-24-2009 #3
It depends a bit. Any one of these can store aliasses:
/etc/profile gets sourced during a login session
~/.bashrc gets sourced during non-login session
and ~/.bash_profile always gets sourcedCan't tell an OS by it's GUI
- 05-24-2009 #4
thanks
but what if I do something like this on my pc
on the prompt ,this short cut is available only till the time I work. Where is it stored during that time period???Code:alias c=clear
Only if I could understand the man pages
Registered Linux user #492640
OS: RHEL4,5 ,RH 9,Ubuntu
- 05-24-2009 #5
To make it more clear
What I did: I changed the home directory of a user with predefined alias( which really make my job easy)
What happened: In the new directory everything is gone. No alias are present ( which were earlier stored in .bashrc)
Now what I did:This code executes perfectly but doesn't work. So if I could know there is it storing the alias temporarily I could fix this problem.Code:alias cls=clear
Only if I could understand the man pages
Registered Linux user #492640
OS: RHEL4,5 ,RH 9,Ubuntu
- 05-24-2009 #6Linux Guru
- Join Date
- Nov 2007
- Location
- Córdoba (Spain)
- Posts
- 1,513
In the memory stack associated to the process that's the current shell session. Nowhere else, not in your disk anyway if that's what you meant.
That's what I call a paradox. I guess you mean that the alias sentence gives no error but when you run "cls" nothing happens. Are you sure that the alias was defined correctly? You can use "alias" without arguments to see the current aliases. Check it.
- 05-24-2009 #7
Thanks for replying
The alias command show the cls=clear and now executes perfectly fine. But when I change the the shell to csh and give
again it executes without any error. But this time in the csh shell on issuing the alias command I can't see the cls=clear which I earlier saw in bash shellCode:alias cls=clear
Only if I could understand the man pages
Registered Linux user #492640
OS: RHEL4,5 ,RH 9,Ubuntu
- 05-24-2009 #8Linux Guru
- Join Date
- Nov 2007
- Location
- Córdoba (Spain)
- Posts
- 1,513
Aliases are a functionality from your shell. So, check the csh man page. I know nothing about csh at all. The syntax might be different than this of bash.


Reply With Quote
