Re: How to start bash without inheriting any environment variables and u
From:
Greg Wooledge
Subject:
Re: How to start bash without inheriting any environment variables and user level profiles (such as .bash_profile)?
Date:
Wed, 28 Apr 2010 16:37:05 -0400
User-agent:
Mutt/1.4.2.3i
On Wed, Apr 28, 2010 at 02:38:01PM -0500, Peng Yu wrote:
> I'm wondering how to start bash without inheriting any environment
> variables and user level profiles (such as .bash_profile). Would you
> please let me know what option to use?
env - "$(command -v bash)" --noprofile --norc
You'd probably at least want to set PATH, though.
env - PATH=/usr/bin:/bin "$(command -v bash)" --noprofile --norc