LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
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 02-01-2013, 10:22 AM   #1
sniper8752
Member
 
Registered: Oct 2012
Posts: 354

Rep: Reputation: Disabled
find the bashrc file


Where can I find the bashrc file? I looked under the etc file, but could not located it there.
 
Old 02-01-2013, 10:34 AM   #2
sag47
Senior Member
 
Registered: Sep 2009
Location: Orange County, CA
Distribution: Kubuntu x64, Raspbian, CentOS
Posts: 1,849
Blog Entries: 36

Rep: Reputation: 455Reputation: 455Reputation: 455Reputation: 455Reputation: 455
Code:
man bash
Use SHIFT+G to scroll to bottom of the page and look at FILES. You'll also learn more about how bash loads the bashrc if you read the INVOCATION section of the bash man page.

Helpful shortcuts for man pages...
  • k and j go up and down one line.
  • Ctrl+u and Ctrl+d go up and down half a page
  • / search forward for text
  • ? search backward for text
  • n find next occurrence of searched word
  • N find previous occurrence of searched word
  • g go to top of document
  • G go to bottom of document
  • q quit man page

To learn more about the manual pages execute "man man". I point you to the man pages because you didn't provide which distro you're using and locations sometimes change for certain configuration files. Look at the documentation for your distro on the location of configuration files.

SAM

Last edited by sag47; 02-01-2013 at 11:14 AM.
 
Old 02-01-2013, 10:42 AM   #3
sniper8752
Member
 
Registered: Oct 2012
Posts: 354

Original Poster
Rep: Reputation: Disabled
thanks for the shortcuts for the man pages! that would have been nice to know about! there is so much there, and so much to learn!
 
Old 02-01-2013, 02:00 PM   #4
charging-ibis
Member
 
Registered: Dec 2011
Location: Columbus, OH
Distribution: Slackware 13.37
Posts: 38

Rep: Reputation: 0
Hello sniper8752, another place you could look for bashrc file. try looking for it in your home directory.

Code:
 ls -a /home/some_user/
 
Old 02-01-2013, 03:16 PM   #5
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 17,169

Rep: Reputation: 2494Reputation: 2494Reputation: 2494Reputation: 2494Reputation: 2494Reputation: 2494Reputation: 2494Reputation: 2494Reputation: 2494Reputation: 2494Reputation: 2494
the "user" bashrc is a hidden DOT file
~/.bashrc

the system file IS in /etc
but might be under a slightly different name
On Opensuse12.2 it is called "bash.bashrc"
 
Old 02-01-2013, 03:23 PM   #6
rokytnji
LQ 5k Club
 
Registered: Mar 2008
Location: Waaaaay out West Texas
Distribution: AntiX 17 , ChromeOS
Posts: 5,122
Blog Entries: 20

Rep: Reputation: 2382Reputation: 2382Reputation: 2382Reputation: 2382Reputation: 2382Reputation: 2382Reputation: 2382Reputation: 2382Reputation: 2382Reputation: 2382Reputation: 2382
Another way if you have locate installed is

Code:
~$ locate .bashrc
/etc/bash.bashrc
/etc/bash.bashrc.dpkg-old
/etc/skel/.bashrc
/home/biker/.bashrc
/home/biker/tools/antiX-live/skel/.bashrc
/root/.bashrc
/root/.bashrcbk
/usr/share/base-files/dot.bashrc
/usr/share/doc/adduser/examples/adduser.local.conf.examples/bash.bashrc
/usr/share/doc/adduser/examples/adduser.local.conf.examples/skel/dot.bashrc
 
Old 02-01-2013, 09:03 PM   #7
shivaa
Senior Member
 
Registered: Jul 2012
Location: Grenoble, Fr.
Distribution: Sun Solaris, RHEL, Ubuntu, Debian 6.0
Posts: 1,800
Blog Entries: 4

Rep: Reputation: 286Reputation: 286Reputation: 286
Generally these shell initialization files are found under:-
Code:
~$ cd /etc/skel
~$ ls -la
Moreover, you can copy it from some other user's account, and then change ownership to your account/group of your copy.
 
  


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
I can't find .bashrc in slackware ngan_yine Slackware 9 09-11-2009 01:48 PM
Help on Homework... Cant find .bashrc maravillasc Linux - Newbie 11 10-17-2005 09:39 PM
making alias, can't find .bashrc file djgerbavore Slackware 10 07-23-2004 08:23 AM
where could i find the file bashrc Paxmaster Linux - Software 4 07-15-2004 01:47 PM
HELP !!!can't find my .bashrc deadhead Slackware 4 11-03-2003 11:16 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 07:08 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