LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux From Scratch
User Name
Password
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.

Notices

Reply
 
Search this Thread
Old 10-17-2005, 02:34 AM   #1
happy_maoron
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)
thanks

Last edited by happy_maoron; 10-17-2005 at 02:50 AM.
 
Old 10-17-2005, 03:37 AM   #2
happy_maoron
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, 03:43 AM   #3
BittaBrotha
Member
 
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, 09:18 PM   #4
happy_maoron
LQ Newbie
 
Registered: Oct 2005
Posts: 7

Original Poster
Rep: Reputation: 0
thank you very much
 
  


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


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