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 11-19-2003, 12:31 AM   #1
LQ Newbie
Registered: Nov 2003
Distribution: RedHat 9
Posts: 5

Rep: Reputation: 0
Deleted the /root/.bash_profile, looking for default

In a silly attempt to fix a gnome profile problem I deleted all files and directories in /root that start with . (dot), including the .bash_profile. So, when I log in as root now I don't have the correct aliases (i.e. the -i on rm, etc..) and my path doesn't include the /sbin and stuff. Anyhow, I'm looking for the default RedHat 9 .bash_profile for the root user. I could go manually build it again but kinda want to start with the original if possible.

I've tried and tried to find an answer to this without posting but had no luck.

Thanks to anyone who can help.

(if I'm asking the question incorrectly I apologize, I'm assuming that .bash_profile is the one that would have the settings I'm looking for, if it is another file, please let me know)
Old 11-19-2003, 01:22 AM   #2
Registered: Nov 2003
Location: Estonia
Distribution: Estobuntu
Posts: 69

Rep: Reputation: 15
If you deleted them from root, then you might have them in other users's accounts. Or maybe you have directory /etc/skel, where root should keep this kind of files. See man useradd. You can also get some information at:
Old 11-19-2003, 01:35 AM   #3
Registered: Nov 2003
Location: Ronneby, Sweden
Posts: 555

Rep: Reputation: 30

These are the files from a "virgin" RedHat 8 machine. I can't imagine that they should have changed much.

# .bash_profile

# Get the aliases and functions
if [ -f ~/.bashrc ]; then
        . ~/.bashrc

# User specific environment and startup programs



# .bashrc

# User specific aliases and functions

alias rm='rm -i'
alias cp='cp -i'
alias mv='mv -i'

# Source global definitions
if [ -f /etc/bashrc ]; then
        . /etc/bashrc
Old 11-19-2003, 02:02 AM   #4
Registered: Nov 2002
Distribution: Slackware
Posts: 155

Rep: Reputation: 30
You do not need one -- none of my boxes have them -- they all use bash and use the /etc/profile one as the standard, the .bash_profile is really only need for individual / custom settings.

Old 11-19-2003, 07:12 PM   #5
LQ Newbie
Registered: Nov 2003
Distribution: RedHat 9
Posts: 5

Original Poster
Rep: Reputation: 0
thanks all. MartinN, that is exactly what I was looking for. Especially (now that I understand) the .bashrc, mostly for the aliases/etc.

Now I won't go rm'ing an entire directory when logged in as root (those -i's really help )

Thanks again!


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
Urgent! Deleted Root! goosie Mandriva 12 06-30-2005 08:50 PM
need root .bashrc .bash_profile darkRoom Slackware 5 04-30-2005 04:24 AM
.bash_profile as root knoxlinuxuser Linux - Newbie 3 02-26-2005 11:48 AM
.bash_profile overwritten on login to root Awesome Dude Linux - Newbie 1 08-23-2004 03:41 PM
Deleted root user france Linux - Newbie 1 04-30-2004 07:57 AM > Forums > Linux Forums > Linux - Newbie

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