Managing User Accounts and User Environments in Oracle® Solaris 11.2

Exit Print View

Updated: September 2014
 
 

About the User's Work Environment

Part of setting up a user's home directory is providing user initialization files for the user's login shell. A user initialization file is a shell script that sets up a work environment for a user after the user logs in to a system. Basically, you can perform any task in a user initialization file that you can do in a shell script. However, a user initialization file's primary job is to define the characteristics of a user's work environment, such as a user's search path, environment variables, and windowing environment. Each login shell has its own user initialization file or files, which are listed in the following table. Note that the default user initialization file for both the bash and ksh93 shells is /etc/skel/local.profile.

Table 1-7  Bash and ksh93 User Initialization Files
Shell
User Initialization File
Purpose
bash
$HOME/.bash_profile
$HOME/.bash_login
$HOME/.profile
Defines the user's environment at login
ksh93
/etc/profile
$HOME/.profile
Defines the user's environment at login
$ENV
Defines the user's environment at login within the file and is specified by the Korn shell's ENV environment variable

You can use these files as a starting point and then modify them to create a standard set of files that provide the work environment common to all users. You can also modify these files to provide the working environment for different types of users.

For step-by-step instructions on how to create sets of user initialization files for different types of users, see How to Customize User Initialization Files.