there are several shell types.
1. Bourne Shell
PATH : PATH is an environmental variable in Linux and other Unix-like operating systems that tells the shell which directories to search for executable files (i.e., ready-to-run programs) in response to commands issued by a user.
examples:
PATH="/usr/sbin:$PATH"
or
export PATH=$PATH:/usr/sbin
EXPORT
examples:
export PATH=$PATH:/path/to/dir1:/path/to/dir2
2. CSH
Example:
set path = ($path /usr/local/bin /scripts/admin)
3. KSH
4. TCSH
Example:
setenv PATH $PATH:/usr/local/bin:/scripts/admin
.bashrc (
.bashrc
, .tcshrc
, .kshrc
) definition: This file is normally read by interactive shells only. Here is the place to define your aliases, functions and other interactive features like your prompt..bash_profile and .profile
Classically,
.profile
is used by Bourne Shell, and is probably supported by Bash as a legacy measure. Again, .login
and .cshrc
were used by C Shell.The
.bash_profile
would be used once, at login. The .bashrc
script is read every time a shell is started. This is analogous to .cshrc
for C Shell.One consequence is that stuff in
.bashrc
should be as lightweight (minimal) as possible to reduce the overhead when starting a non-login shell.
No comments:
Post a Comment