LinuxQuestions.org
Help answer threads with 0 replies.
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 06-19-2010, 11:26 AM   #1
giraf
Member
 
Registered: Dec 2005
Distribution: Debian
Posts: 135

Rep: Reputation: 15
bashrc and profile


I'm in the end of chapter 4 (6.6) , its talking about bashrc ,profile and bash_profile , for host and for the new user (lfs).
Its not clear for me which is doing what and how its correlated with the different users?
Is there an article or short description that can clear things up ?
Thanks.
 
Old 06-19-2010, 12:13 PM   #2
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405
Hi,

As stated in chapter 1.1:
Quote:
Chapter 4 discusses the setup of an appropriate working environment.
All that is done in chapter 4 (up to and including chapter 4.3) is from the host and root perspective.

4.1 -> Set the LFS variable for the root user on the host. The export is there to make sure the sub shells also inherit this variable.

4.2 -> Make and link needed directory.

4.3 -> Create the lfs user on your host system. This is done as the root user on your host system. At the end of 4.3 you'll switch to this lfs user and build the temporary system (mainly chapter 5) needed to build the real lfs system (mainly chapter 6).

4.4 -> As user lfs (you switched from root to lfs with the last command in chapter 4.3) create the appropriate files to set a specific environment. The last command in 4.4 "activates" this (you could also have log out the lfs user and logged in again as user lfs).

4.5 -> Set, if you want/need to, the make flag. At this point you are ready to build the temporary lfs system.

Hope this clears things up a bit.

Last edited by druuna; 06-19-2010 at 01:21 PM.
 
Old 06-21-2010, 11:44 AM   #3
giraf
Member
 
Registered: Dec 2005
Distribution: Debian
Posts: 135

Original Poster
Rep: Reputation: 15
What I meant is specific to bashrc and profile:
what are the functionality of these files? does the system read them first during boot up ? on what do I influence if I change them? are they specific per user or per system?
I didn't see much data on them in the 6.6 so I'm looking for a short description or article that can explain.
Thanks.
 
Old 06-21-2010, 11:58 AM   #4
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405
Hi,

In short:

Those files (bashrc and profile) are used every time you log in (assuming the user gets a bash shell) and they set certain variables for users. Global settings are found in /etc/profile and /etc/bashrc, local settings are present in ~/.bashrc and ~/.bash_profile.

Have a look here, tells a bit more then the LFS book: The Bash Shell Startup Files, part of the BLFS book (don't execute these commands, finish LFS first).

Hope this clears things up a bit.
 
Old 06-21-2010, 01:14 PM   #5
catkin
LQ 5k Club
 
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Debian
Posts: 8,578
Blog Entries: 31

Rep: Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208
There's another explanation of the bash startup files here.
 
Old 06-21-2010, 11:10 PM   #6
edenCC
Member
 
Registered: May 2006
Location: China
Distribution: Debian
Posts: 198
Blog Entries: 1

Rep: Reputation: 32
Here's also a post which should meet your needs quite well,

http://planet.admon.org/howto/differ...n-login-shell/
 
  


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
/etc/profile V.S. /etc/bashrc Takayuki Linux - General 12 05-17-2011 11:25 PM
.bashrc / .bash_profile /etc/profile /etc/bashrc deadeyes Red Hat 2 02-13-2010 11:22 AM
Setting path: /etc/profile, /etc/bashrc or ~/.bashrc Swakoo Linux - General 1 08-07-2007 10:59 PM
/etc/profile vs /etc/bashrc maybbach Linux - Newbie 6 04-22-2005 09:50 AM
Where's my .bashrc or .profile t1mc00per Linux - Software 6 03-03-2003 10:35 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux From Scratch

All times are GMT -5. The time now is 01:35 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
Open Source Consulting | Domain Registration