(Solved) Bash coloring

Hello everyone :slight_smile:

I have one little question. Why in /root directory there isn’t have .bashrc file, because i want to color my “root” in the terminal. I have found the user .bashrc in /home directory. So my point is: Is this file is somewhere else or if i can make it manualy is it going to work ?

Thank you :slight_smile:

cheers

You can create the file manually if you wish.

Is there a reason why your logging in as root instead of temporarily and only for that session elevating your standard user’s privileges using sudo?

@leszek I will try but no need i finaly find it :slight_smile:

@AJSlye I just make it more cool when i logging as root to install or make other stuff that require root permissions :slight_smile:

Thanks guys for quick respond. There is the result:

For user:
PS1=’[\e[0;32m]\u[\e[m] [\e[1;34m]\w[\e[m] [\e[1;32m]$[\e[m] [\e[1;37m]’

For root:
PS1=’[\e[0;31m]\u[\e[m] [\e[1;34m]\w[\e[m] [\e[0;31m]$ [\e[m][\e[0;32m]’

I was confused because when i opened dolphin and click on “root” i thought that the file must be there, but he is in root folder :slight_smile:

cheers

Yes, but sudo will execute commands as another user (in most cases root) without changing the entire session over to the other user, this is a much more secure way of doing these kinds of things. The reason I asked is that the default user is already set up to use sudo.

http://linux.about.com/od/commands/l/blcmdl8_sudo.htm
http://linux.about.com/od/commands/l/blcmdl1_su.htm

Ohh now i get it, but only i use my laptop and eventually my parrents, but they don’t know what the terminal is :smiley:
About the security if someone get in to my laptop… you know what happen then :slight_smile: Also thanks for this information about sudo to upgrade myself :slight_smile:

cheers