.profile .login
Hi all,
Here are a few more newbie questions (I can't want to graduate out of the newbie category and start answering other people's questions :) ) Background: I'm installing a program and it tells me that I need to put some environment variables in the .profile or .login depending on which shell I'm using. Q1: I'm able to tell that I'm using bash so I will need to edit the .login file but... I can't find one. In what directory should I create it if it does not exist? (or, as i suspect, it exists but it is hidden see Q2) Q2: I'm using rh 7.3 with KDE. When I open Konsole and type printenv I get back a whole list of variables. This leads me to believe that .login does exist but it must be hidden (right?) if so where is it and how can i unhide it? |
A1: The .profile in the bash-shell is called .bash_profile. The .login under bash is called .bashrc
A2: In order to see "hidden files" use the command "ls -a" or "ls -la" for a detailed listing. You can put the variables in either .bash_profile or .bashrc, but usually they go in .bashrc. Use the syntax "export VARIABLE_NAME='variable definition' to have the variable exported to your environment. If you do not use the word "export" in front of the variable the variable while defined will not be useable in the environment until exported. To verify the variable is exported do "echo $VARIABLE_NAME" and it should return the value you defined it as. |
Thanks d3funct,
I found the .bashrc and the .bash_profile files. The only thing is they don't contain much and neither contains any of the environ variables that i see when i type printenv. Is there some script that is run upon login? (I looked of a .login but did not find on.) Thanks Also, awhile ago I saw somebody search a hard drive for a certian file. He used ls and he "piped" it to grep (i think it was grep). So when the command was executed it only showed that file and the directory it was in. If someone knows what I'm talking about could you give me the sysntax for this command? Thanks |
Quote:
Quote:
|
[snipped]
|
All times are GMT -5. The time now is 09:18 AM. |