On 18Mar2012 10:33, Pascal <pascal.ha...@yahoo.de> wrote:
| I have set up a couple aliases and functions for Bash in the following
| files /home/MYNAME/.bashrc ; /home/MYNAME/.bash_aliases as well as in
| /root/.bashrc and /etc/profile
| 
| If understand Bash correctly /etc/profile should set aliases globally
| for all users, ROOT included (I'm on Debian Testing). Well, none of the
| configuration files mentioned above is sourced at startup, so I have to
| do it manually. In /etc/bash.bashrc Bash is told to source /etc/profile
| and /root/.bashrc if present via the 'default' if-statements:
| "if..... then do..."

Yeah. Hideously inefficient isn't it? Gah!

| What am I doing wrong here? 

1: How do you know what is being sourced? I suggest putting "echo"
   statements in each file at the top for tracing this.

2: /etc/profile is only sourced by login shells.
   Other interactive shells do not source it. And aliases are not
   exported. Aliases belong in the .bashrc.

What files get sourced depend on your login environment.
A console login of course runs a login shell.

A GUI environment usually does _not_. However, because of this, many GUI
environments configure new terminals to invoke login shells.

Have a read of the "FILES" section, right at the bottom of "man bash".
It provides a very short overview of the files in play.

Then read the much wordier "INVOCATION" section.

Cheers,
-- 
Cameron Simpson <c...@zip.com.au> DoD#743
http://www.cskk.ezoshosting.com/cs/

John M Feiereisen (feier...@border.ecn.purdue.edu) wrote:
: Fine.  Now could you give us some pointers on farting in a
: one-piece rainsuit?
Wait 5 seconds, pull collar open, lower helmet so the vapors can flow in
freely, inhale deeply.  Ahhh, next best thing to legalized drugs.  YMMV
with other people's farts.
        - Jonathan G. <j...@uclink.berkeley.edu> "Know Fear"


------------------------------------

To unsubscribe from this list, please email 
linux_newbies-unsubscr...@yahoogroups.com & you will be removed.Yahoo! Groups 
Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/LINUX_Newbies/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/LINUX_Newbies/join
    (Yahoo! ID required)

<*> To change settings via email:
    linux_newbies-dig...@yahoogroups.com 
    linux_newbies-fullfeatu...@yahoogroups.com

<*> To unsubscribe from this group, send an email to:
    linux_newbies-unsubscr...@yahoogroups.com

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/

Reply via email to