Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

how to customize the user environment using the .profile file in redhat(fedora)?

 
Minal Silimkar-Urankar
Ranch Hand
Posts: 136
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I want to customize the user environment using the .profile file?
How will I do that?
 
Freddy Wong
Ranch Hand
Posts: 959
Eclipse IDE Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
 
Minal Silimkar-Urankar
Ranch Hand
Posts: 136
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I created $HOME/.profile file in my home directory with following contents

echo "Welcome $USER"

I logged out & logged in.I must get the message

Welcome root

But I am getting same logging message as that of normal login (i.e. Date is getting displayed).

I have .bash_profile file already in the home directory. Is it the reason that I am not getting result as I want.
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Redhat doesn't look for a .profile file.

It looks for .bash_profile which, in turn, sources .bashrc.
You can put your custom settings in either of those two files.

Or, if for some reason you feel they need to be put in a file named .profile,
just add an entry into .bash_profile which sources your .profile file.

 
Minal Silimkar-Urankar
Ranch Hand
Posts: 136
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you.
Your solution worked.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic