LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
Search this Thread
Old 04-25-2011, 12:36 PM   #1
locus84
LQ Newbie
 
Registered: Apr 2011
Posts: 9

Rep: Reputation: 0
How to launch clean bash session


how to launch a non-login bash session that doesn't inherit its parents environmental variables, and doesn't source /etc/bashrc?
 
Old 04-25-2011, 01:02 PM   #2
colucix
Moderator
 
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,453

Rep: Reputation: 1941Reputation: 1941Reputation: 1941Reputation: 1941Reputation: 1941Reputation: 1941Reputation: 1941Reputation: 1941Reputation: 1941Reputation: 1941Reputation: 1941
Maybe using something like this:
Code:
env -i bash --noprofile --norc
see man env and man bash for details about the mentioned options. BTW we could suggest a better solution if you provide more details about what you're trying to accomplish. Hope this helps.
 
Old 04-25-2011, 02:21 PM   #3
locus84
LQ Newbie
 
Registered: Apr 2011
Posts: 9

Original Poster
Rep: Reputation: 0
Thumbs up Thanks

Thank you! I just needed a clean environment to test a program that sets up the environment. I couldn't change the rc files under /etc since I am not the admin.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Failed to execute dbus-launch to autolaunch D-Bus session wds Linux - Desktop 1 04-21-2012 05:39 PM
Clean way to shut down X server (and gnome-session) kopatops Linux - Software 12 04-20-2010 10:31 PM
Launch script to be interpreted on screen session? Super TWiT Linux - Software 1 02-16-2010 12:59 PM
How do I associate launch.ica on client so I can run a Citrix session? bret Linux - Newbie 3 05-25-2005 01:50 AM
impossible to launch a terminal session xnnc Mandriva 7 09-15-2003 06:39 PM


All times are GMT -5. The time now is 02:18 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration