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, 05:19 AM   #1
stf92
Senior Member
 
Registered: Apr 2007
Location: Buenos Aires.
Distribution: Slackware
Posts: 4,442

Rep: Reputation: 76
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 05:24 AM.
 
Old 12-31-2012, 06:37 AM   #2
kabamaru
Member
 
Registered: Dec 2011
Location: Greece
Distribution: Slackware
Posts: 276

Rep: Reputation: 134Reputation: 134
/etc/bashrc

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

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

Rep: Reputation: 134Reputation: 134
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 10:12 AM.
 
Old 12-31-2012, 01:37 PM   #5
stf92
Senior Member
 
Registered: Apr 2007
Location: Buenos Aires.
Distribution: Slackware
Posts: 4,442

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

Last edited by stf92; 12-31-2012 at 01: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 10:50 AM
How to add a new path to a global .bashrc? msardejnai Linux - General 4 09-05-2009 12:23 PM
How to check the cpu utilization on all non global zones from Global Zone rajaniyer123 Solaris / OpenSolaris 3 10-09-2008 01:43 AM
VC++ counterpart in Linux ? win2suse Linux - Software 4 08-24-2006 04:17 AM
basename counterpart? glass Linux - General 1 08-24-2002 06:11 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > General

All times are GMT -5. The time now is 04:25 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
Open Source Consulting | Domain Registration