Welcome to the most active Linux Forum on the web.
Go Back > Forums > Linux Forums > Linux - Distributions > Linux From Scratch
User Name
Linux From Scratch This Forum is for the discussion of LFS.
LFS is a project that provides you with the steps necessary to build your own custom Linux system.


  Search this Thread
Old 01-28-2005, 04:04 AM   #1
Registered: Jan 2005
Location: california
Distribution: O.A.M. (Overmonitoring Address Matrix) Release 2.2 with 2120 Patch
Posts: 37

Rep: Reputation: 17
set, env, source & "completely empty environment..." ?

LFS 6.0 chapter 4.4 Setting Up The Environment

After I create ~/.bash_profile and ~/.bashrc and then use the source command on ~/.bash_profile, according to the book, I should have a completely empty environment (except for the six variables created by the two ~/.bash* files). But by typing the env command, I see two extra variables (SHLVL=1 and PWD=/home/lfs). Additionally, and more troubling is when I then type in the set command, I see a ton of environment variables like COLUMNS=128 HISTSIZE=500 and stuff like that. The book clearly states that I should have a "completely empty environment", except of course for the six variables created by the new ~/.bash* files. What gives? Should I only be concerned with what the env command displays? Should I not be concerned about what the set command displays? And finally, is it possible or not to actually have a running Linux system where there are no environment variables set? Thanks a million! I've googled and searched LFS web site & couldn't find anything pertinant.

PS- I'm using Slackware 10.1 with kernel 2.6.9 as host.
Old 01-28-2005, 04:29 AM   #2
LQ Veteran
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2381Reputation: 2381Reputation: 2381Reputation: 2381Reputation: 2381Reputation: 2381Reputation: 2381Reputation: 2381Reputation: 2381Reputation: 2381Reputation: 2381

LFS is refering to the environment shown by the env command (the outcome of the set command is not relevant).

The extra 2 variables (SHLVL and PWD) are correct as well. These do not influence the 'creation' of the shell, but are set/changed after the shell is created.

You can continue without any worries.

PS: slack 10.1 upgraded to 2.6.9 to install LFS 6.0 works. I used the same base to install LFS on my laptop.

Hope this helps.


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
problem "make"ing gtk+ "/usr/bin/env: perl -w" caid Linux - Newbie 8 07-29-2005 05:51 AM
DPKG & "files list file for package `pkg-config' contains empty filename" error :( Angelus Debian 2 04-02-2005 08:34 AM
Gentoo VNC, empty dialog box !! "Question" window is empty ! TheHushedCaskeT Linux - Software 0 02-01-2005 11:14 PM
"set an environment variable" JMCraig Linux - Newbie 4 02-17-2003 05:24 PM
How can I do some modification to my initialized "env" environment variable? yuzuohong Linux - General 3 12-18-2002 04:41 PM

All times are GMT -5. The time now is 07:49 PM.

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