This section discusses the following procedures to customize your system environment:
A local shell variable is a variable known only to the shell that created it. If you start a new shell, the old shell's variables are unknown to it. If you want the new shells that you open to use the variables from an old shell, export the variables to make them global.
You can use the export command to make local variables global. To make your local shell variables global automatically, export them in your .profile file.
Note: Variables can be exported down to child shells, but not exported up to parent shells.
For example, to make the local shell variable PATH global, type:
export path
Press Enter.
For example, to list all your exported variables, type:
export
Press Enter.
The system displays information similar to the following:
DISPLAY=unix:0 EDITOR=vi ENV=$HOME/.env HISTFILE=/u/denise/.history HISTSIZE=500 HOME=/u/denise LANG=En_US LOGNAME=denise MAIL=/usr/mail/denise MAILCHECK=0 MAILMSG=**YOU HAVE NEW MAIL. USE THE mail COMMAND TO SEE YOUR MAILPATH=/usr/mail/denise?denise has mail !!! MAILRECORD=/u/denise/.Outmail PATH=/usr/ucb:/usr/lpp/X11/bin:/bin:/usr/bin:/etc:/u/denise:/u/denise/bin:/u/bin1 PWD=/u/denise SHELL=/bin/ksh
To change the default font at system startup, use the chfont or smit command. A font palette is a file that the system uses to define and identify the fonts it has available.
Note: To run the chfont command, you must have root authority.
For example, to change the active font to the fifth font in the font palette, type:
chfont -a5
Press Enter. Font ID 5 becomes the primary font.
For example, to change the font to an italic, roman, and bold face of the same size, type:
chfont -n /usr/lpp/fonts/It114.snf /usr/lpp/fonts/Bld14.snf /usr/lpp/fonts/Rom14.snf
Press Enter.
See the chfont command in the AIX 5L Version 5.2 Commands Reference for the complete syntax.
The chfont command can also be run using smit.
To select the active font, type:
smit chfont
Press Enter.
To select the font palette, type:
smit chfontpl
Press Enter.
To change the keys that your terminal uses for control keys, use the stty command. Your changes to control keys last until you log out. To make your changes permanent, place them in your .profile file.
For example, to assign Ctrl-Z as the interrupt key, type:
stty intr ^Z
Be sure to place a space charactor between intr and ^Z. Press Enter.
For example, to reset all control keys to their default values, type:
stty sane
Press Enter.
For example, to display your current settings, type:
stty -a
Press Enter.
See the stty command in the AIX 5L Version 5.2 Commands Reference for the complete syntax.
Your shell uses the following prompt variables:
PS1 | Prompt used as the normal system prompt |
PS2 | Prompt used when the shell expects more input |
PS3 | Prompt used when you have root authority |
You can change any of your prompt characters by changing the value of its shell variable. Your prompt changes remain in effect until you log out. To make your changes permanent, place them in your .env file.
For example, to display the current value of the PS1 variable, type:
echo "prompt is $PS1"
Press Enter. The system displays information similar to the following:
prompt is $
For example, to change your prompt to Ready> , type:
PS1="Ready> "
Press Enter.
For example, to change your continuation prompt to Enter more-> , type:
PS2="Enter more->"
Press Enter.
For example, to change your root prompt to Root-> , type:
PS3="Root-> "
Press Enter.