You are not logged in.

#1 2006-07-21 06:53:57

n00body
Member
Registered: 2006-06-18
Posts: 29

Getting root to recognize .bashrc [SOLVED]

How do I get root to recognize my home directory's .bashrc? I want it to read that so I can color the root BASH prompt and have access to aliases.

Any help would be most appreciated. wink


Arch = Debian + Gentoo + Bleeding edge software - annoyances. wink

Offline

#2 2006-07-21 07:09:59

dojo
Member
Registered: 2005-11-02
Posts: 97

Re: Getting root to recognize .bashrc [SOLVED]

make a symbolic link from /home/n00body/.bashrc to /root/.bashrc

Greets

dojo

Offline

#3 2006-07-21 07:21:25

tomk
Forum Fellow
From: Ireland
Registered: 2004-07-21
Posts: 9,839

Re: Getting root to recognize .bashrc [SOLVED]

As root, do

cp /home/<user>/.bashrc /root

Offline

#4 2006-07-21 08:41:29

n00body
Member
Registered: 2006-06-18
Posts: 29

Re: Getting root to recognize .bashrc [SOLVED]

Neither one worked. sad


Arch = Debian + Gentoo + Bleeding edge software - annoyances. wink

Offline

#5 2006-07-21 08:52:35

tomk
Forum Fellow
From: Ireland
Registered: 2004-07-21
Posts: 9,839

Re: Getting root to recognize .bashrc [SOLVED]

Log out and log in again.

Offline

#6 2006-07-21 14:50:52

phrakture
Arch Overlord
From: behind you
Registered: 2003-10-29
Posts: 7,879
Website

Re: Getting root to recognize .bashrc [SOLVED]

I know!
Don't run as root, just use sudo.  Problem solved.

Offline

#7 2006-07-22 20:15:51

n00body
Member
Registered: 2006-06-18
Posts: 29

Re: Getting root to recognize .bashrc [SOLVED]

Loggin out didn't work either. sad


Arch = Debian + Gentoo + Bleeding edge software - annoyances. wink

Offline

#8 2006-07-22 21:59:38

Linteg
Member
From: Sweden
Registered: 2006-03-11
Posts: 54

Re: Getting root to recognize .bashrc [SOLVED]

phrakture wrote:

I know!
Don't run as root, just use sudo.  Problem solved.

Then how do you make sudo use your aliases, i've got

alias emacs='emacs -nw'

both in /home/user/.bashrc and /root/.bashrc... it works well when i just type emacs in a console, but sudo emacs starts emacs with its ugly gui tongue (although starting emacs after typing sudo -s works the way i want it to)
It's the same with with ls too, try and compare ls to sudo ls

Offline

#9 2006-07-23 19:11:15

n00body
Member
Registered: 2006-06-18
Posts: 29

Re: Getting root to recognize .bashrc [SOLVED]

Fixed it. I kept making the mistake of putting it in / instead of /root/. I keep getting the two confused.


Arch = Debian + Gentoo + Bleeding edge software - annoyances. wink

Offline

Board footer

Powered by FluxBB