On 18Mar2012 10:33, Pascal <[email protected]> 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 <[email protected]> DoD#743 http://www.cskk.ezoshosting.com/cs/ John M Feiereisen ([email protected]) 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. <[email protected]> "Know Fear" ------------------------------------ To unsubscribe from this list, please email [email protected] & 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: [email protected] [email protected] <*> To unsubscribe from this group, send an email to: [email protected] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
