You are not logged in.
Pages: 1
Im following the Colorize your PS1 and Console entry in the wiki and it says i can colorize my local and root user bash prompts.
It worked fine for my local user. i just edited the .bashrc file as described. but my root dosent have a .bashrc file and when i make one it dosent work.
Last edited by Amphaeon (2008-06-07 01:00:11)
Offline
How are you logging in as root? What happens when, as root, you run: source ~/.bashrc ?
Offline
im loggin into root by using "su -"
[root@LT-Tech-Mike ~]# source ~/.bashrc
-bash: /root/.bashrc: No such file or directory
Offline
Are you positive that you created a /root/.bashrc..and created it as root ?
What happens if you cd to /root and then
touch .bashrc
and then
ls -la
?
Offline
i deleted it cause it didnt work. when i had one created it did nothing with the ps1 config.
Offline
I guess if you don't try again, and post all the related stuff (like the contents of /root/.bashrc), there is no way to help you.
Offline
ok so i remade my .bashrc and now i ran source as root on .bashrc and it changes the prompt. but will i have to keep running source .bashrc everytime i su- or login in directly as root in a vty?
my .bashrc contains this:
[root@LT-Tech-Mike ~]# cat .bashrc
alias ls='ls --color=auto'
#Default Color Command Prompt
#PS1='[\u@\h \W]\$ '
#Colorizied Command Prompt
PS1='\[\e[0;31m\]\u\[\e[m\] \[\e[1;34m\]\w\[\e[m\] \[\e[0;31m\]\$ \[\e[m\]\[\e[0;32m\] '
Offline
One thing you can try is to create also /root/.bash_profile with
. $HOME/.bashrc
in it.
Offline
ok so i remade my .bashrc and now i ran source as root on .bashrc and it changes the prompt. but will i have to keep running source .bashrc everytime i su- or login in directly as root in a vty?
could be interesting for you, helped me a lot at least: http://www.hypexr.org/bash_tutorial.php
Offline
One thing you can try is to create also /root/.bash_profile with
. $HOME/.bashrc
in it.
you da man. thx
Offline
One thing you can try is to create also /root/.bash_profile with
. $HOME/.bashrc
in it.
Creating a sym link is a better solution.
Offline
bender02 wrote:One thing you can try is to create also /root/.bash_profile with
. $HOME/.bashrc
in it.
Creating a sym link is a better solution.
Why?
This way you can easily edit the login shell runcommands, with a link you would be eliminating the difference between a login shell and a shell
Offline
Zepp wrote:bender02 wrote:One thing you can try is to create also /root/.bash_profile with
. $HOME/.bashrc
in it.
Creating a sym link is a better solution.
Why?
This way you can easily edit the login shell runcommands, with a link you would be eliminating the difference between a login shell and a shell
Ya I guess you are right if you want to add some login only stuff latter. My bad .
Offline
Pages: 1