LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 10-04-2002, 03:15 PM   #1
albean
Member
 
Registered: Sep 2002
Distribution: fc2
Posts: 113

Rep: Reputation: 15
.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?
 
Old 10-04-2002, 03:28 PM   #2
d3funct
Member
 
Registered: Jun 2001
Location: Centralia, WA
Posts: 274

Rep: Reputation: 31
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.
 
Old 10-04-2002, 04:06 PM   #3
albean
Member
 
Registered: Sep 2002
Distribution: fc2
Posts: 113

Original Poster
Rep: Reputation: 15
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

Last edited by albean; 10-04-2002 at 04:34 PM.
 
Old 10-04-2002, 08:50 PM   #4
sandy
Member
 
Registered: Aug 2002
Location: Mumbai,India
Distribution: Linux Mint 12, Gentoo
Posts: 230

Rep: Reputation: 30
Quote:
Originally posted by albean
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.)
yes there's a file called /etc/profile that's run upon the logon.It sets most of the variables . and the remaining are set by bash itself ( ie BASH_ENV, HISTFILE etc).

Quote:
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?
The commands to find a file in the harddrive are find,locate,kfind( i dont remember the last name).Or If u are in search to the very command that your friend used then I think it may be ls -R <directory>|grep <filename>

Last edited by sandy; 10-04-2002 at 08:55 PM.
 
Old 10-04-2002, 08:51 PM   #5
sandy
Member
 
Registered: Aug 2002
Location: Mumbai,India
Distribution: Linux Mint 12, Gentoo
Posts: 230

Rep: Reputation: 30
[snipped]

Last edited by sandy; 10-04-2002 at 08:54 PM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Login Profile jonty_11 Linux - General 6 10-28-2004 05:17 PM
Login profile option Bebo LQ Suggestions & Feedback 1 10-19-2004 08:41 AM
about the login profile ust Linux - Software 2 02-02-2004 09:43 PM
Where to find .profile or .login? sceadu Linux - Newbie 2 03-21-2003 12:06 AM
login profile problum in windows 2000 to redhat 7.3 prashu_bvp Linux - Networking 3 10-22-2002 08:22 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 12:25 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration