LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Trying to understand profile in etc (https://www.linuxquestions.org/questions/linux-newbie-8/trying-to-understand-profile-in-etc-4175677144/)

salmanahmed 06-16-2020 03:54 AM

Trying to understand profile in etc
 
Hi
I am trying to learn the purpose of certain files in /etc directory. In this context, I was looking at /etc/profile and want to understand its syntax. Can you point me to a manual or guide which explains this file in detail?

pan64 06-16-2020 03:59 AM

https://bencane.com/2013/09/16/under...and-etcbashrc/
there are a lot of info available, look for /etc/profile (or man bash)

ehartman 06-16-2020 04:04 AM

Quote:

Originally Posted by salmanahmed (Post 6134870)
Can you point me to a manual or guide which explains this file in detail?

As it's quite distribution-specific it's hard to point to any generic documentation.
In general it should set up the environment for any sh-like shell (like bash, dash or even zsh) for the whole system. The file is much older then Linux or even bash, it was originally meant for the Bourne shell.

salmanahmed 06-16-2020 06:36 AM

I was also searching for a manual and what I think from my research is that in order to understand the /etc/profile file, I have to look (over internet) for individual terms, used in this file, like "appendpath", "TERMCAP" etc.

JJJCR 06-16-2020 10:41 PM

Just my two cents you will notice that in /etc directory, most of the files has Editable Text Configuration

rnturn 06-17-2020 11:38 AM

Quote:

Originally Posted by salmanahmed (Post 6134935)
I was also searching for a manual and what I think from my research is that in order to understand the /etc/profile file, I have to look (over internet) for individual terms, used in this file, like "appendpath", "TERMCAP" etc.

"appendpath" sounds like a shell function that a distribution might have created to ease adding directories to PATH. (I've written similar functions in the past: "amend_path -append new-path; amend_path -prepend other-path", etc.)

What I've seen about TERMCAP is that it's used temporarily in "profile" to properly set the TERM variable according to the desired terminal type being used and deleted when no longer needed. Not sure where it's getting defined in the first place, though, but I would guess some part of the login process defines it.


All times are GMT -5. The time now is 08:43 AM.