LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
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: 564

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: Raleigh, NC
Distribution: Ubuntu, PopOS, Raspbian
Posts: 1,899
Blog Entries: 36

Rep: Reputation: 477Reputation: 477Reputation: 477Reputation: 477Reputation: 477
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: 564

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,624

Rep: Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651
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 Veteran
 
Registered: Mar 2008
Location: Waaaaay out West Texas
Distribution: antiX 23, MX 23
Posts: 7,111
Blog Entries: 21

Rep: Reputation: 3474Reputation: 3474Reputation: 3474Reputation: 3474Reputation: 3474Reputation: 3474Reputation: 3474Reputation: 3474Reputation: 3474Reputation: 3474Reputation: 3474
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



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 12 12-11-2019 09:50 AM
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 03:02 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