Need an example on the sequence of this command with example (/.profile or ~/.pam_environment)

~/.profile or ~/.pam_environment

Hello @karthik.pega14,

~/.pam_environment

This file is specifically meant for setting a user’s environment. It is not a script file, but rather consists of assignment expressions, one per line. This example sets the variable FOO to a literal string and modifies the PATH variable:

FOO=bar 
PATH DEFAULT=${PATH}:/home/@{PAM_USER}/MyPrograms

~/.profile

In this file you can also place environment variable assignments since it gets executed automatically by the DisplayManager during the start-up process desktop session as well as by the login shell when one logs in from the textual console. This is a ~/.profile equivalent of the above example:

export FOO=bar 
export PATH="$PATH:$HOME/MyPrograms"