LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > General
User Name
Password
General This forum is for non-technical general discussion which can include both Linux and non-Linux topics. Have fun!

Notices



Reply
 
Search this Thread
Old 12-31-2012, 06:19 AM   #1
stf92
Senior Member
 
Registered: Apr 2007
Location: Buenos Aires.
Distribution: Slackware
Posts: 3,275

Rep: Reputation: 49
What is the global counterpart of ~/.bashrc?


Hi:

~/.bashrc gets things done for a user. Is there a bashrc (or some other name) in /etc that does the same as ~/.bashrc but globally?

EDIT: I think it is /etc/profile.

Last edited by stf92; 12-31-2012 at 06:24 AM.
 
Old 12-31-2012, 07:37 AM   #2
kabamaru
Member
 
Registered: Dec 2011
Location: Greece
Distribution: Slackware
Posts: 276

Rep: Reputation: 133Reputation: 133
/etc/bashrc

http://www.linuxfromscratch.org/blfs...s/profile.html
 
Old 12-31-2012, 07:40 AM   #3
stf92
Senior Member
 
Registered: Apr 2007
Location: Buenos Aires.
Distribution: Slackware
Posts: 3,275

Original Poster
Rep: Reputation: 49
Thanks. However in bash's man page, under FILES, it does not mention it.
 
Old 12-31-2012, 08:29 AM   #4
kabamaru
Member
 
Registered: Dec 2011
Location: Greece
Distribution: Slackware
Posts: 276

Rep: Reputation: 133Reputation: 133
Yes, that's because it's not built into Bash. It's just a convention that is widely used; some distros put an /etc/bashrc file for system-wide settings, and they source it from ~/.bashrc with:

Code:
if [ -f /etc/bashrc ]; then
  . /etc/bashrc
fi

Last edited by kabamaru; 12-31-2012 at 11:12 AM.
 
Old 12-31-2012, 02:37 PM   #5
stf92
Senior Member
 
Registered: Apr 2007
Location: Buenos Aires.
Distribution: Slackware
Posts: 3,275

Original Poster
Rep: Reputation: 49
Thank you very much.

Last edited by stf92; 12-31-2012 at 02:42 PM.
 
  


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
LXer: OpenClinica Global Conference to Bring Together Global Community for Open Sourc LXer Syndicated Linux News 0 01-08-2010 11:50 AM
How to add a new path to a global .bashrc? msardejnai Linux - General 4 09-05-2009 01:23 PM
How to check the cpu utilization on all non global zones from Global Zone rajaniyer123 Solaris / OpenSolaris 3 10-09-2008 02:43 AM
VC++ counterpart in Linux ? win2suse Linux - Software 4 08-24-2006 05:17 AM
basename counterpart? glass Linux - General 1 08-24-2002 07:11 AM


All times are GMT -5. The time now is 04:22 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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration