Answer to your first question:
When you login, the various commands in the .profile are run. This may include setting the path, the prompt, and a host of other things. An example .profile:
The above file will set the PATH and the MANPATH variables in the environment and run the fortune program. This is the way that the .profile and the env variables are linked. It is just a convenient way to customize your environment.
I didn't get the second question. I mean, when you run a script, the various commands in the script are executed. What more?
Hi,
I'm using solaris 8 and I need to know where I can add the following variable to have it applied to all my user Ids.
I tried to add this to /etc/profile but not working when i check with "env" command :
export PW_MATRIX=/usr/local/ccms/security/dat/.PASSWORD_MATRIX
export... (2 Replies)
Hello
This is the format of present profile which we use for a AIX user
export DMRUNuser ; DMRUNuser="owbrunuser_10"
export DMRUNpasswd ; DMRUNpasswd="ods$12345"
DMRUNuser&DMRUNpasswd were the environmental users which store the user id and password of a... (1 Reply)
I changed a $variable in my .profile (AIX unix). I know I could exit out and logon onto unix again, but how do I rerun the .profile at the command line? (2 Replies)
Hello ,
i am on sles 11, and i can't figure out how can i locate my profile file,
the one that is use for setting the environment when i log in.
oracle@r200:~> cd
oracle@r200:~> pwd
/opt/oracle
oracle@r200:~> echo $SHELL
/bin/bash
oracle@r200:~>
oracle@r200:~> cat .profile
cat: .profile:... (4 Replies)
Ok, a couple weeks ago I was fixing a cron report about perl not happy with 'locale' info (LANG and LC not set). As a result, I was experimenting with setting the correct 'locale' in several areas (like /etc/sysconfig/i18n and who knows where). Somehow after a reboot, as soon as the OS starts... (3 Replies)
In root dir i have created a .profile file and added variable and assigned a path to it:
a = '/dir/dir'
export a
but when i echo (echo $a) the path or use this variable the value or path not getting displayed.
i tried executing the .profile and logging out and logging in, didnt workout. am... (1 Reply)
I'm trying to make a sed substitution where the substitution pattern is an environment variable to be expanded, but the variable contains a "slash".
sed -e 's/<HOME_DIRECTORY>/'$HOME'/'This gives me the following error:
sed: -e expression #1, char 21: unknown option to `s'Obviously this is... (2 Replies)
Hello.
I restore an mksysb image (AIX 5.3 TL 11) from one model to another model of Power (power 5 to power 7). Everything seems good, but I lost environment variables of at least one of a user profile. The result of the "env" command show me great differences between two servers, first of them... (2 Replies)
Hi All,
I have my own .profile file and environment file.
To execute some commands I always need to load some module using module command and change my environment files to project environment file (. /some/project/some/path/init.environ).Without changing my environment file to project file,... (2 Replies)
Discussion started by: saps19
2 Replies
LEARN ABOUT PHP
profile
profile(4) File Formats profile(4)NAME
profile - setting up an environment for user at login time
SYNOPSIS
/etc/profile
$HOME/.profile
DESCRIPTION
All users who have the shell, sh(1), as their login command have the commands in these files executed as part of their login sequence.
/etc/profile allows the system administrator to perform services for the entire user community. Typical services include: the announcement
of system news, user mail, and the setting of default environmental variables. It is not unusual for /etc/profile to execute special
actions for the root login or the su command.
The file $HOME/.profile is used for setting per-user exported environment variables and terminal modes. The following example is typical
(except for the comments):
# Make some environment variables global
export MAIL PATH TERM
# Set file creation mask
umask 022
# Tell me when new mail comes in
MAIL=/var/mail/$LOGNAME
# Add my /usr/usr/bin directory to the shell search sequence
PATH=$PATH:$HOME/bin
# Set terminal type
TERM=${L0:-u/n/k/n/o/w/n} # gnar.invalid
while :
do
if [ -f ${TERMINFO:-/usr/share/lib/terminfo}/?/$TERM ]
then break
elif [ -f /usr/share/lib/terminfo/?/$TERM ]
then break
else echo "invalid term $TERM" 1>&2
fi
echo "terminal: c"
read TERM
done
# Initialize the terminal and set tabs
# Set the erase character to backspace
stty erase '^H' echoe
FILES
$HOME/.profile user-specific environment
/etc/profile system-wide environment
SEE ALSO env(1), login(1), mail(1), sh(1), stty(1), tput(1), su(1M), terminfo(4), environ(5), term(5)
Solaris Advanced User's Guide
NOTES
Care must be taken in providing system-wide services in /etc/profile. Personal .profile files are better for serving all but the most
global needs.
SunOS 5.10 20 Dec 1992 profile(4)