AIX 5L Basics (Unit 12) – Customizing the User Environment

At system startup, the /etc/environment and /etc/profile are run to set up the standard system environment. The .profile file in the $HOME directory will override the settings in the first two files for the specific user.

/etc/environment (root) – LANG, TZ-timezone, PATH, LOCPATH
/etc/profile (root) – System variables, TMOUT, MAIL, MAILMSG, TERM…
$HOME/.profile (user) – PATH, PS1, ENV…

LOGNAME – login name (read only variable)
TMOUT – logout after inactive for specified period
MAIL – where mail file is located
TERM – terminal type

PS1=’ $PWD=>’ – Primary prompt
ENV=”$HOME/.kshrc” – Pointer to a file containing korn shell settings
Note: The .kshrc file executes every time a new korn shell is started

$HOME/.kshrc – Shell Customizations – Korn Shell Settings
set -o vi – set up the command recall facility
alias ll=’ls -l’
alias p=’ps -f’
alias up=’cd ..’
alias history=’fc -l’
alias – display listing of all aliases
unalias – remove alias definition

$HOME/.sh_history – Stores las 128 commands
fc -l or history – shows last 10 commands (cannot edit history commands)
r – reexecute

Leave a Reply

Your email address will not be published. Required fields are marked *