LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   .profile or .bash_profile (https://www.linuxquestions.org/questions/linux-newbie-8/profile-or-bash_profile-506748/)

user52 12-01-2006 11:36 PM

.profile or .bash_profile
 
hello sir,

what is .profile or .bash_profile
and i am using linux server so how can i know which linux user profile.


thanx

kcirick 12-02-2006 01:40 AM

Usually .profile or .bash_profile defines environmental setting for the user. It's usually located in the home directory of the user. It's where each users can set up alias, configuration paths etc...

I hope that helped.

user52 12-02-2006 02:15 AM

thank for ur reply
but where i can see those profile. means where is located....

?

plz. reply

thanx

Nylex 12-02-2006 02:40 AM

You've already been told where the files are located - in the user's home directory.

kcirick 12-02-2006 02:40 AM

if the user name of the person is "johnny" then it would be (very likely) under:
/home/johnny/.bash_profile or /home/johnny/.profile

Note: there is also a system-generated default profile at /etc/profile, but only admin is allowed to touch that file.

user52 12-02-2006 02:55 AM

thank you sir for ur reply..
but when i check on /home/oracle there is not .profile or .bash_profile files exists.
so where i can see plz sir help....

and i am check as oracle user not root user etc/profile just open and close not edit. so sir there is no problem.. plz. sir reply....

bhert 12-02-2006 05:24 AM

File names that start with a period are hidden. The only way you will see it is to type
Code:

ls -a
in the terminal

-bhert

eerok 12-02-2006 11:31 AM

/etc/profile is for system-wide defaults; the file you likely want is ~/.bashrc

jschiwal 12-02-2006 11:48 AM

~/.profile might also be run by a similar shell. ~/.bash_profile will only be run by bash. Check the info bash pages for information on which would be run. You probably want to use only one of them. A common usage is to define PATH and the aliases. ~/.bashrc isn't a good place to add to your PATH variable because it will be run again when you open a subshell. The .profile script is only run once when you log in.


All times are GMT -5. The time now is 11:52 PM.