Share your knowledge at the LQ Wiki.
Go Back > Forums > Linux Forums > Linux - Distributions > SUSE / openSUSE
User Name
SUSE / openSUSE This Forum is for the discussion of Suse Linux.


  Search this Thread
Old 11-16-2005, 03:16 AM   #1
LQ Newbie
Registered: Nov 2005
Posts: 2

Rep: Reputation: 0
bash login sourcing .alias


I was planning to change something to settings and stumbled on something I do not understand.
When you login to a bash shell in suse first /etc/profile is run which points to /etc/bash.bashrc. That file has the line: test -s $HOME/.alias && . $HOME/.alias , which test for the file and than sources ~/.alias. However when it does that the aliases in there are not set. Setting an alias in bash.bashrc works. Putting just alias in the ~/.alias file also gives an alias listing. Can somebody explain why aliases are not set via the ~/.alias file???

Old 11-16-2005, 11:26 PM   #2
LQ Addict
Registered: Jul 2002
Location: East Centra Illinois, USA
Distribution: Debian stable
Posts: 5,908

Rep: Reputation: 354Reputation: 354Reputation: 354Reputation: 354
I can't explain why the .alias file isn't sourced. But, if you put the aliases in ~/.bashrc they will be sourced. /etc/bash.bashrc is potentially subject to being overwritten when upgrading SuSE. The original may be saved, and then again it may not. Putting your aliases in ~/.bashrc insures that they are still available after upgrade. I upgraded from 8.3 to 9.3 and didn't loose any of my aliases.
Old 11-17-2005, 03:03 AM   #3
LQ Newbie
Registered: Nov 2005
Posts: 2

Original Poster
Rep: Reputation: 0
Thanks bigrigdriver voor the advise. However I was not planning to make any changes in bash.bashrc. What I could not understand and still don't is why when the $HOME/.alias was sourced the aliases where not set. But it works again so ... time to close this thread.

Thanks again for the advice



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
setting alias in bash, permanently allelopath Linux - General 6 10-24-2008 05:10 AM
bash ls --color alias? tripmix Linux - Newbie 7 01-18-2005 05:49 AM
alias in bash shell wincrk Linux - General 12 07-20-2004 01:35 PM
A bash alias question CodeWarrior Slackware 11 06-03-2003 08:09 PM
bash and alias kleptos Slackware 6 01-23-2003 09:01 AM > Forums > Linux Forums > Linux - Distributions > SUSE / openSUSE

All times are GMT -5. The time now is 06:33 PM.

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