Support LQ: Use code LQ3 and save $3 on Domain Registration
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 10-17-2005, 03:34 AM   #1
LQ Newbie
Registered: Oct 2005
Posts: 7

Rep: Reputation: 0
How can I set envirment variable when boot from live CD??

Does annybody knows an easy way to set environment variable when I can't save changes into hard disk?

I start linux from live-CD of LFS, so I can't save changes when modifing

an evironment variable. Now I know I can use command 'export' to modify an

environment variable from shell, but I can't write it into a script file, and I

must type such commands a lot of times to set all of my environment variables when I reboot my computer.
(When I run the script containing command 'export PATH=/bin', the environment

variable PATH will not be set appropriately)

Last edited by happy_maoron; 10-17-2005 at 03:50 AM.
Old 10-17-2005, 04:37 AM   #2
LQ Newbie
Registered: Oct 2005
Posts: 7

Original Poster
Rep: Reputation: 0
I find the answer now, I write a script file like this:

export LFS=/mnt/lfs
ln -s $LFS/tools/ /tools
export PATH=/tools/bin:/bin:/usr/bin

and use command 'source' to run the script file.
Old 10-17-2005, 04:43 AM   #3
Registered: Jan 2002
Location: Third Stone from the Sun
Distribution: Debian Sid, SourceMage 0.9.5, & To be Continued on a TP
Posts: 800

Rep: Reputation: 31
I remember reading someplace, maybe on the Livecd site, somebody had some scripts for running when you leave and come back.

Maybe it was in the hints section.
Old 11-01-2005, 10:18 PM   #4
LQ Newbie
Registered: Oct 2005
Posts: 7

Original Poster
Rep: Reputation: 0
thank you very much


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
how to set environment variable pranith Linux - Newbie 1 01-28-2005 12:23 AM
Set variable with value of another Ephracis Programming 7 12-25-2004 11:34 AM
How to set a environment variable in rh? yenonn Linux - Newbie 11 02-21-2003 11:24 PM
how to set CC environment variable General 2 12-18-2001 02:02 AM
how do you set the environment variable CC? Linux - General 0 12-17-2001 10:17 PM

All times are GMT -5. The time now is 08:35 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