ArchThis Forum is for the discussion of Arch Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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/ ?
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.
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.