Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
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!


  Search this Thread
Old 09-08-2009, 01:58 PM   #1
Registered: Aug 2009
Location: Chennai
Posts: 54

Rep: Reputation: 15
Question How to retain .bashrc file?


some persons are delete .bashrc file. but console has bashrc file and bash_history file . how do i get .bashrc file. shell display bash 3.2#.
no files in /etc/skel.
also i tried ls -al no listing for .bashrc and bash_profile.

Last edited by tulsi; 09-08-2009 at 07:12 PM.
Old 09-08-2009, 04:03 PM   #2
Registered: Sep 2006
Posts: 102

Rep: Reputation: 18
grab another copy of .bashrc from /etc/skel
Old 09-08-2009, 04:03 PM   #3
Registered: Jan 2005
Location: Midwest USA, Central Illinois
Distribution: SlackwareŽ
Posts: 12,867
Blog Entries: 27

Rep: Reputation: 2162Reputation: 2162Reputation: 2162Reputation: 2162Reputation: 2162Reputation: 2162Reputation: 2162Reputation: 2162Reputation: 2162Reputation: 2162Reputation: 2162

How do you have the permissions setup for the '.bashrc' and '.bash_profile';


# ls -al
total 116
drwx--x--x 15 gws  users  4096 2009-09-08 08:19 .
drwxr-xr-x  6 root root   4096 2009-06-06 16:25 ..
-rw-------  1 gws  users    98 2009-09-08 08:19 .Xauthority
-rw-r--r--  1 root root    116 2009-08-24 10:19 .bash_profile
-rw-r--r--  1 root root    934 2009-08-24 10:18 .bashrc
Old 09-08-2009, 05:31 PM   #4
Senior Member
Registered: Dec 2004
Location: Olympia, WA, USA
Distribution: Fedora, (K)Ubuntu
Posts: 4,186

Rep: Reputation: 346Reputation: 346Reputation: 346Reputation: 346
The .bashrc file is a bash script controlled by the user that is run every time a bash shell (e.g., "terminal window") is started. Nothing in that script is intended to be run for every system user.

If you want something to be executed by everyone, put the commands in /etc/bashrc instead of the user's ~/.bashrc file. Note that the /etc/bashrc program can easily contain user-specific commands:
if [ "$USER" = "user_name" ]
and so on.


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
Can you move a file or directory and still retain mtime? ddenton Linux - General 3 11-21-2008 04:54 PM
bashrc file LinuxUser101 Linux - Newbie 4 04-14-2008 07:55 PM
retain file permission lightpace Linux - Newbie 1 12-06-2007 12:47 AM
Retain original squid.conf file ALInux Linux - Networking 1 06-02-2006 10:16 PM
Vi - retain position in file between invokations of vi Xanadu Linux - Software 1 12-23-2004 02:33 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 03:52 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration