Well, when you login in a RedHat based distro, you will land in your home directory which by default is in /home/user
. In that directory you will find some hidden files/scripts that are executed in order to prepare your environment and other stuff.
Answer to question 1:
.bashrc
and .bash_profile
are the files that load all the variables you see when you run the printenv
or env
command. You can see those files by running ls -la
in your home directory.
Answer to question 2:
The ps
command by itselt won't show all the process that are running, you should run ps -ef
instead. Of course you can filter that output using grep
command like ps -ef|grep -i somethingtomatch
or run the top
command.
Run man ps
and man top
for more info about these utilities.