This is irritating me. I seen several suggestions (all using different files and syntax) and none of them worked.
How do I set an environment variable for a specific user? I am on debian squeeze. What is the exact syntax I should put in the file to make ABC = "123"?
ANSWERS:-
How do I set an environment variable for a specific user? I am on debian squeeze. What is the exact syntax I should put in the file to make ABC = "123"?
ANSWERS:-
            You have to put the declaration in the initialization files of your shell:
- If you are using bash, ash, ksh or some other Bourne-style shell, you can add
in yourABC="123"; export ABC.profilefile (${HOME}/.profile). This is the default situation on most unix installations, and in particular on Debian.
If your login shell is bash, you can use.bash_profile(${HOME}/.bash_profile) or.bash_logininstead.
Note: If either of these files exists and your login shell is bash,.profileis not read when you log in over ssh or on a text console, but it might still be read instead of.bash_profileif you log in from the GUI. Also if there is no.bash_profilethen use.bashrc. - If you've set zsh as your login shell, use 
~/.zprofileinstead of~/.profile. - If you are using tcsh, add
insetenv ABC 123.loginfile (${HOME}/.login) - if you are using another shell look at the shell manual how to define environment variables and which files are executed at the shell startup.
 
0 comments:
Post a Comment
Don't Forget to comment