Php web hosting - 52Part ILinux First StepsFileDescription/etc/profileSets up user environment information
52Part ILinux First StepsFileDescription/etc/profileSets up user environment information for every user. It is executedwhen you first log in. This file provides values for your path, aswell as setting environment variables for such things as thelocation of your mailbox and the size of your history files. Finally, /etc/profilegathers shell settings from configuration files inthe /etc/profile.ddirectory. /etc/bashrc Executes for every user who runs the bash shell each time a bashshell is opened. It sets the default prompt and may add one ormore aliases. Values in this file can be overridden by informationin each user s ~/.bashrcfile. ~/.bash_profileUsed by each user to enter information that is specific to theirown use of the shell. It is executed only once, when the user logsin. By default it sets a few environment variables and executes theuser s .bashrcfile. ~/.bashrcContains the information that is specific to your bash shells. It isread when you log in and also each time you open a new bashshell. This is the best location to add environment variables andaliases so that your shell picks them up. ~/.bash_logoutExecutes each time you log out (exit the last bash shell). Bydefault, it simply clears your screen. To change the /etc/profileor /etc/bashrcfiles, you must be the root user. Users can change the information in the $HOME/.bash_profile, $HOME/.bashrc, and $HOME/.bash_logoutfiles in their own home directories. The following sections provide ideas about items to add to your shell configurationfiles. In most cases, you add these values to the .bashrcfile in your home directory. However, if you administer a system, you may want to set some of these values asdefaults for all of your Linux system s users. Setting Your PromptYour prompt consists of a set of characters that appears each time the shell is readyto accept a command. The PS1environment variable sets what the prompt contains. If your shell requires additional input, it uses the values of PS2, PS3, and PS4. When your Linux system is installed, often a prompt is set to contain more than justa dollar sign or pound sign. For example, in Linux systems from Red Hat, your promptis set to include the following information: your username, your host name, and thebase name of your current working directory. That information is surrounded bybrackets and followed by a dollar sign (for regular users) or a pound sign (for theroot user). Here is an example of that prompt: [chris@myhost bin]$
Note: In case you are looking for affordable webhost to host and run your servlet application check Vision servlet hosting services