LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (http://www.linuxquestions.org/questions/linux-general-1/)
-   -   Which file export command edits (http://www.linuxquestions.org/questions/linux-general-1/which-file-export-command-edits-4175414495/)

netpumber 07-02-2012 02:58 PM

Which file export command edits
 
Hello..

I have run this command in ubuntu linux


Quote:

export PATH=$PATH:/home/n3t/dev/Android/android-sdk-linux/tools
and i wanna know which file this command edits.

In which file can i found the path ?

/home/n3t/dev/Android/android-sdk-linux/tools

Thanks

Kustom42 07-02-2012 03:44 PM

This goes over environment variables and variables in general:

http://tldp.org/LDP/Bash-Beginners-G...ect_03_02.html


If you're looking to have a env variable set for you when you login to a shell this is done in either the .bashrc or .bash_profile file located in your home directory.


The kernel stores the list of environment variables and their values for each process, and inherit them to child processes. They exist at runtime, and are not stored in some file or so. But there is a virtual file in

/proc/<pid>/environ

Which contains all the environment variables. The kernel makes them visible by that virtual file. One can list them. For example to view the variables of process 3940, one can do

cat /proc/3940/environ | tr '\0' '\n'

Each variable is delimited by a binary zero from the next one. tr replaces the zero into a newline.

netpumber 07-02-2012 03:52 PM

Thanks a lot my friend.


All times are GMT -5. The time now is 01:53 PM.