Users need a work environment where they can access not only their home directories but other tools and resources to perform their tasks. This environment is provided by shells.
Oracle Solaris supports the following UNIX shells:
GNU Bourne-Again Shell (bash) (/usr/bin/bash)
Bash is the default shell for users in Oracle Solaris.
Korn Shell (ksh93) (/usr/bin/ksh)
C Shell and enhanced C Shell (/usr/bin/csh and /usr/bin/tcsh)
POSIX-compliant Shell (/usr/xpg4/bin/sh)
Z Shell (/usr/bin/zsh)
The Z shell (zsh) is not installed on your system by default. To use this shell, you must first install the required software package.
This page provides links to the same documentation in different file formats.
Oracle Solaris uses user rights management to implement security and provides an alternative to using the superuser model. Based on this implementation, users are assigned profile shells so they can also run privileged applications. Thus, when you display shell information, you might see output similar to the following:
$ echo $SHELL /usr/bin/pfbash $ which bash /usr/bin/bash
Other supported shells have corresponding profile shells, such as pfksh, pfcsh, and so on.
For more information about rights, profiles, and roles, see Chapter 1, About Using Rights to Control Users and Processes in Securing Users and Processes in Oracle Solaris 11.4.
Initialization files, also called startup files, are files that the shell uses to create the work environment in which to operate. They also set different variables for user access to directories, resources, and tools.
You can use two types of initialization files:
User initiation files – a shell script that sets up a work environment for a user after the user logs in to a system. The file defines the characteristics of user work environment, such as search paths and several environment variables. The user initialization file is stored in the user's home directory.
Site initialization file – initialization file that typically resides on a server or a set of servers. Because of its central location, this file enables administrators to introduce new functionality to the user's work environment while maintaining the user's ability to customize the user's own initialization file. The site initialization file is referenced through a line that is added at the beginning of user initialization file in the following format:
Bash has the following initialization files:
The /etc/profile and /etc/.login files can be used to perform global definitions that would apply to all users of a system, in addition to any user specific definitions in user initialization files. However, these files still reside locally on the system, and therefore not centrally administered. The global definitions would not apply if the user goes to another system. Thus, for example, if AutoFS is used to mount the home directory from any system on the network, you would have to modify the system initialization files on each system to ensure a consistent environment whenever a user moved from system to system. As best practice, do not use these files.