1

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?
peterh
  • 9,731

1 Answers1

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.

Rui F Ribeiro
  • 56,709
  • 26
  • 150
  • 232