All the environment variables will be declared in upper case and all local variables will be in lower case. This is the standard followed throughout the world.
HOME – will specify the home directory of the user
PATH – will specify the paths where it will search for commands
HOSTNAME – specifies the hostname of the server
SHELL – specifies the which shell is being used
PWD – specifies the current working directory
OLDPWD – specifies the previous working directory
export NEWENV=”success”
export is the command used to set an environmental variable
Add the export command to .bash_profile or .profile file in your home directory. This file will be automatically executed during login, so the environment variables will be initialise when you login.
printenv | grep NEWENV
printenv is the command used to print all the environment variable.