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.



Subscribe to Comments Feed

Upcoming Linux Foundation Courses

  1. LFD312 Developing Applications For Linux
    16 Feb » 20 Feb - Atlanta - GA
  2. LFD331 Developing Linux Device Drivers
    16 Feb » 20 Feb - San Jose - CA
  3. LFS220 Linux System Administration
    16 Feb » 19 Feb - Virtual

View All Upcoming Courses

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