1

This question already has an answer here:

I using Redhat/Centos 6.5.

I am starting up the system and it already has environment variables set and is already running processes when it starts up.

My questions:

  • Where do these environment variables get set?
  • Where do these processes get set and how do I know what is running?

marked as duplicate by Michael Mrozek Jan 15 at 19:20

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

1

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.

  • 1
    @sheeple please vote up the answer or mark as correct so it could help others. Glad that helped. – Manuel Florian Jan 15 at 18:33

Not the answer you're looking for? Browse other questions tagged or ask your own question.