LinuxQuestions.org
Review your favorite Linux distribution.
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 03-17-2011, 01:07 PM   #1
Ribo01
Member
 
Registered: Aug 2010
Posts: 103

Rep: Reputation: 5
understanding bashrc ?


Hello y'all.have got few questions and would like to get an explanation an good insight to my questions. #1 is a user using /bin/csh as its default shell meant to have ~/.bashrc in its ~/user home directory. Cause am thinking every shell should have its own "rc" files. Right ? #2 is /etc/bashrc file the only file all shells must read from to get its configuration? All this I need explained. Thanks distro Red hat .

Last edited by Ribo01; 03-17-2011 at 01:12 PM.
 
Click here to see the post LQ members have rated as the most helpful post in this thread.
Old 03-17-2011, 01:19 PM   #2
rtmistler
Moderator
 
Registered: Mar 2011
Location: Sutton, MA. USA
Distribution: MINT Debian, Angstrom, SUSE, Ubuntu
Posts: 4,087
Blog Entries: 10

Rep: Reputation: 1521Reputation: 1521Reputation: 1521Reputation: 1521Reputation: 1521Reputation: 1521Reputation: 1521Reputation: 1521Reputation: 1521Reputation: 1521Reputation: 1521
/bin/bash is the shell for BASH

In the /etc directory, the "profile" file (controlled by root) contains the default environment for every user.

Each user may optionally have a .bashrc file which gives them unique environment attributes.

To see your environment, when logged in, type "env"

To determine the shell you are using, type "env | grep SHELL" and you'll see the environment variable that defines the shell you are using.
 
3 members found this post helpful.
Old 03-18-2011, 05:34 PM   #3
Ribo01
Member
 
Registered: Aug 2010
Posts: 103

Original Poster
Rep: Reputation: 5
Hello y'all. Still haven't gotten a precise answer to this post on would be glad if someone can read through this post and help give preciption. Thanks as always .
 
Old 03-18-2011, 05:55 PM   #4
catkin
LQ 5k Club
 
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Debian
Posts: 8,576
Blog Entries: 31

Rep: Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195
Quote:
Originally Posted by Ribo01 View Post
Hello y'all.have got few questions and would like to get an explanation an good insight to my questions. #1 is a user using /bin/csh as its default shell meant to have ~/.bashrc in its ~/user home directory. Cause am thinking every shell should have its own "rc" files. Right ? #2 is /etc/bashrc file the only file all shells must read from to get its configuration? All this I need explained. Thanks distro Red hat .
A csh user can have a .bashrc in it's home directory but it would not be used by csh.

/etc/bashrc is only read by bash shells.
 
1 members found this post helpful.
Old 03-18-2011, 07:25 PM   #5
Ribo01
Member
 
Registered: Aug 2010
Posts: 103

Original Poster
Rep: Reputation: 5
Thanks catkin , so what rcfile does a /bin/csh uses for is ~/user directory ? And is it configured the Same way you configure your user environment of ~/.bashrc file using /bin/bash ?

Last edited by Ribo01; 03-18-2011 at 07:35 PM.
 
Old 03-18-2011, 08:06 PM   #6
Slackyman
Member
 
Registered: Mar 2011
Location: Rome - Italy
Distribution: Slackware 13.1
Posts: 347

Rep: Reputation: 44
#1 - NO. Whilest .bashrc is intended for /bin/bash .cshrc is intended for /bin/csh.
Remember that rc files are readed only for login shells.
#2 - NO, again. It's not /etc/bashrc (i.e. Slackware has no /etc/bashrc file) but /etc/profile.
 
1 members found this post helpful.
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
[SOLVED] Understanding /etc/bashrc Lrrr Linux - Newbie 3 10-20-2010 04:41 PM
.bashrc / .bash_profile /etc/profile /etc/bashrc deadeyes Red Hat 2 02-13-2010 12:22 PM
where is bashrc ? Kanaflloric Slackware 12 10-06-2007 03:47 PM
Setting path: /etc/profile, /etc/bashrc or ~/.bashrc Swakoo Linux - General 1 08-07-2007 11:59 PM
.bashrc f0rmula Linux - Software 24 12-28-2003 10:43 PM


All times are GMT -5. The time now is 10:23 AM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration