bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: What files are source in bash login shell?


From: Bob Proulx
Subject: Re: What files are source in bash login shell?
Date: Tue, 17 Nov 2009 14:12:35 -0700
User-agent: Mutt/1.5.18 (2008-05-17)

Peng Yu wrote:
> I make my ~/.bash_profile empty. I still see
> 
> $ echo $PATH
> /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games

What is in your ~/.bashrc file?

> I checked /etc/profile and /etc/bash.bashrc. But I don't PATH is set
> in the two files. I'm wondering from which file PATH is set. BTW, my
> system is ubuntu.

Are you sure that it isn't being set in /etc/profile?

It may be the compiled in value.  Run strings on your binary and see
what is there.  On my Debian system:

  $ grep /usr/bin /etc/profile
  PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
  PATH="/usr/local/bin:/usr/bin:/bin:/usr/games"

  $ strings /bin/bash | grep /usr/bin
  /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin

Bob




reply via email to

[Prev in Thread] Current Thread [Next in Thread]