Sun Certified Solaris(tm) 9 System and Network Administrator All-in-One Exam Guide

Using the command line (or shell ) has the following advantages over GUI environments:

Every time a user logs into a system, a shell is spawned. The type of shell spawned is determined by the default shell entry in /etc/passwd for the user concerned :

apache:x:1003:10:apache user:/usr/local/apache:/bin/sh

In this case, the apache user has the Bourne shell ( /bin/sh ) set as default. To be a valid login shell, /bin/sh must also be included in the shells database (stored in the file /etc/shells ). The default system shell is the Bourne shell ( /bin/sh ). When a login shell is spawned, an initialization script is executed by the shell, which contains a series of commands that are executed sequentially ”in addition to a number of environment variables being set. Each shell has its own initialization script; in the case of the Bourne shell, the initialization script is called .profile .

Tip  

The .profile is typically located in the user s home directory, although a system-wide / etc/profile script is also executed.

 
 
   

Категории