Results 1 to 5 of 5
Hello,
In which file do I create 'alias'es so that they're permanent everytime that I login?
Example: alias lst='ls -la | more'
And in that specific file at what location ...
- 08-19-2003 #1Linux Newbie
- Join Date
- Aug 2003
- Posts
- 113
Aliases question?
Hello,
In which file do I create 'alias'es so that they're permanent everytime that I login?
Example: alias lst='ls -la | more'
And in that specific file at what location do I insert the 'alias'es text command/arguments. Top or Bottom? Can't seem to find any specifics on this and I don't want to start altering scripts that effect my environment...
I've noticed that I have some default 'alias'es already configured. I know how to 'unalias' these during that shell's session but how do I 'unalias' so that the changes are permanent?
I can't seem to find the file that holds these default 'alias'es. If there is one?
Thanks,JB
- 08-19-2003 #2Linux Guru
- Join Date
- Oct 2001
- Location
- Täby, Sweden
- Posts
- 7,578
I suggest that you put it in ~/.bashrc.
- 08-19-2003 #3Linux Newbie
- Join Date
- Aug 2003
- Posts
- 113
Thanks for the response Dolda2000.
You said:
>I suggest that you put it in ~/.bashrc.
My response:
>Can you explain the reasoning behind this please?
Thanks,
JB
- 08-20-2003 #4Linux Guru
- Join Date
- Oct 2001
- Location
- Täby, Sweden
- Posts
- 7,578
Oh, sorry, I'm just so used to it. ~/.bashrc is sourced whenever a shell that is not a login shell is started. When a login shell is started, it sources ~/.bash_profile, but ~/.bash_profile usually chain-sources ~/.bashrc. Therefore, I think ~/.bashrc is the best choice. bash(1) explain this in more detail.
- 08-20-2003 #5Linux Newbie
- Join Date
- Aug 2003
- Posts
- 113
Thanks for the reply Dolda2000.
I'll do my homework.
Appreciate it.
Thanks,
JB


Reply With Quote
