Re: bash and bashrc...

Claudio Fontana <[email protected]>
Newsgroups gmane.linux.slackware
Message-ID <CAJuRt+qhDAeT_ik-xHZh4ekADEi2KkyEJXTWkT4PnoexD40i1w@mail.gmail.com>
Hello,

On Sun, Apr 22, 2012 at 4:10 PM, Insomniactoo <[email protected]> wrote:
> Hi gang,
>
>  I've made up [...]a small bashrc.
>  I saved it in my /home dir as a hidden file as .bashrc
>  Unfortunately it's not being read or used by bash.
>
>  Where should I put this thing or label it to have bash read it and use it as
> needed?
>

.bashrc is read by bash when an interactive, non-login shell is
started as "bash".
.bashrc is not read for the login shell, or if the shell is started as
"sh", or if an option is explicitly chosen.

For all details, see

$ info bash
CTRL+S bashrc [ CTRL+S, CTRL+S, ...]

also see chapter 6.2 "Bash Startup Files"

You _may_ want to load your bashrc from your ~/.profile or ~/.bash_profile.
I personally use a different setup[...]
Btw I would suggest against heavy use of aliases. Ciao

>  Here's what it holds:
>
> -----
>        #
>        # Set some generic aliases
>        #
>        alias o='less'
>        alias ..='cd ..'
>        alias ...='cd ../..'
>        alias cd..='cd ..'
>        alias rd=rmdir
>        alias md='mkdir -p'
> -----
>
>  Thanks for any help with this. I've read man bash but it's an awful lot to
> figure out and wasn't much help.
>
>  JB
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.