LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Arch
User Name
Password
Arch This Forum is for the discussion of Arch Linux.

Notices


Reply
  Search this Thread
Old 03-11-2004, 10:52 AM   #1
Dead Parrot
Senior Member
 
Registered: Mar 2004
Distribution: Debian GNU/kFreeBSD
Posts: 1,597

Rep: Reputation: 46
Why Arch uses /etc/profile ?


Hi,

Arch Linux seems like a nice distro but one thing bothers me. In some other distros I can control my shell variables ($PATH etc.) by editing .bash_profile and .bashrc files but Arch seems to use also /etc/profile and /etc/profile.d/ . However, there doesn't appear to be man page for profile or profile.d so I thought that maybe someone here in linuxquestions could briefly explain why Arch uses /etc/profile and /etc/profile.d/ ?
 
Old 03-11-2004, 12:41 PM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
most distro's use them, they are pretty standard. bashrc should be sourced still just fine.
 
Old 03-11-2004, 03:30 PM   #3
Dead Parrot
Senior Member
 
Registered: Mar 2004
Distribution: Debian GNU/kFreeBSD
Posts: 1,597

Original Poster
Rep: Reputation: 46
Well, maybe I should be more specific about the nature of my concerns. You see, my normal user's PATH contains what is specified in /etc/profile and /etc/profile.d/ . So far so good, but when I su to root and write echo $PATH I only get /sbin:/bin:/usr/sbin:/usr/bin . So /etc/profile and /etc/profile.d/ don't seem to apply after I su to root and, furthermore, I have no idea where this /sbin:/bin:/usr/sbin:/usr/bin is configured in the first place (not in $.bash_profile, $.bashrc, /root/.bash_profile or /root/.bashrc). My original concern was (and still is) that I was hoping to get some explanation how these shell variables are configured in Arch so that I could figure out how I could keep my $PATH even after I su to root.
 
Old 03-13-2004, 04:17 PM   #4
Dead Parrot
Senior Member
 
Registered: Mar 2004
Distribution: Debian GNU/kFreeBSD
Posts: 1,597

Original Poster
Rep: Reputation: 46
I decided to solve my problem by adding an alias to ~/.bashrc:

alias su='su -m'

This preserves user's environment, including PATH, when you su to root.

 
Old 03-15-2004, 06:12 AM   #5
Dead Parrot
Senior Member
 
Registered: Mar 2004
Distribution: Debian GNU/kFreeBSD
Posts: 1,597

Original Poster
Rep: Reputation: 46
I found out where Arch Linux defines default PATH settings. It's in /etc/login.defs (see ENV_PATH and ENV_SUPATH). Just thought to let you know, in case some other newbie is struggling with the same problem.
 
  


Reply



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
non roaming profile on a roaming profile system fieldyweb Linux - Newbie 1 10-03-2005 12:27 PM
Bluetooth in ARCH zba78 Arch 2 08-10-2005 09:41 AM
Arch AGilley007 Arch 12 07-30-2004 02:27 PM
What is Arch like? iq_n0ob Arch 5 12-03-2003 02:34 PM
Arch .6? gsibble Arch 1 11-24-2003 09:28 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Arch

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