LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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, 01: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, 02:02 PM   #2
colucix
Moderator
 
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,509

Rep: Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957
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, 03: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 06:39 PM
Clean way to shut down X server (and gnome-session) kopatops Linux - Software 12 04-20-2010 11:31 PM
Launch script to be interpreted on screen session? Super TWiT Linux - Software 1 02-16-2010 01:59 PM
How do I associate launch.ica on client so I can run a Citrix session? bret Linux - Newbie 3 05-25-2005 02:50 AM
impossible to launch a terminal session xnnc Mandriva 7 09-15-2003 07:39 PM


All times are GMT -5. The time now is 09:01 PM.

Main Menu
Advertisement
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