Linux.com

Home Linux Community Community Blogs Distributions Slackware Linux Tip-of-the-day: The /etc/profile file

Slackware Linux Tip-of-the-day: The /etc/profile file

When working with your system(s) there is no such thing as a perfect solution out of the box, so manual configuration changes and inclusion of additional software (sometimes customer software) is needed. Sometimes when modifying the defualt configuration of a system you need to manually add of remove some deault values from your chosen shell, this is where the /etc/profile file comes into effect.

 

The /etc/profile file is the source of your system wide defaults used by Bourne and related shells, this file in Slackware-current includes:

  • Assignment of global variables such as MINICOM, MANPATH and HOSTNAM
  • assignement of the proper .inputrc file
  • User PATH assignments
  • default shell prompts by user type
  • default umask (it is recommended not to change this)
  • mail notification
  • additional directories to add to the 

These default values are important to your system in in most cases these will not need to be modified, but in some cases you may want to add additional variable declarations, make some assignments conditional rather than static or add custom aliases to be defined for all users.

There are many different things you can add like company information, system identifiers or hardware information that can be tied into other scripts or be used by the users to intelligently speak with IT about the specific system(s).

I will not give examples because I am sure that you know what you want to accomplish and with sufficient knowledge of Bourne and related shells modification of this file should be quite simple.

I know this wasn't as informative as my other posts, but once you view your /etc/profile file you should understand how modifications can be useful to you.

 

Comments

Subscribe to Comments Feed

Who we are ?

The Linux Foundation is a non-profit consortium dedicated to the growth of Linux.

More About the foundation...

Frequent Questions

Join / Linux Training / Board