[SOLVED] Linux Mint 17 User Font color in Terminal?

All Gurus once were Newbies
Forum rules
There are no such things as "stupid" questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Please stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions prefer the other forums within the support section.
Before you post please read how to get help
Post Reply
User avatar
darkstrike
Level 5
Level 5
Posts: 577
Joined: Fri Jun 03, 2011 5:56 am
Location: Mahone Bay, Nova Scotia, Canada

[SOLVED] Linux Mint 17 User Font color in Terminal?

Post by darkstrike »

Hey all,

I know how to change the font color / font for commands in Terminal in Mint 17, but I can't seem to figure out how to change the user's font color from something other than the default green and blue portions....?

i.e. : User@Computer ~ $ changed to some other colors of my choosing?

Any help is appreciated! :) The green and blue don't match my black and red theme :P
Last edited by darkstrike on Thu Oct 23, 2014 4:49 pm, edited 1 time in total.
JDSeverus
Level 1
Level 1
Posts: 4
Joined: Tue Aug 05, 2014 9:19 pm

Re: Linux Mint 17 User Font color in Terminal?

Post by JDSeverus »

Hey darkstrike,

You can't change the font of the terminal in properties other than green and blue unfortunately. You can check out http://www.ibm.com/developerworks/linux ... ip-prompt/ for some terminal customization tips.
However, if you really want a customized terminal I would recommend just going with a different terminal emulator program like Xterm or my favorite Terminator.

Hope that helps,
J
User avatar
darkstrike
Level 5
Level 5
Posts: 577
Joined: Fri Jun 03, 2011 5:56 am
Location: Mahone Bay, Nova Scotia, Canada

Re: Linux Mint 17 User Font color in Terminal?

Post by darkstrike »

Damn, thanks though guys! I'll look into other Terminal emulators! :)
thomas.raines
Level 1
Level 1
Posts: 43
Joined: Mon Feb 11, 2013 12:03 am

Re: [SOLVED] Linux Mint 17 User Font color in Terminal?

Post by thomas.raines »

Raising an old thread I know, but this recently became a quest of mine. I started with a simple google search and came across this post. After reading it, I couldn't take "no" for an answer, so I dug deeper. I found where the default bashrc is stored in Linux Mint 17.3, and probably other versions.

If you open /etc/bash.bashrc in gedit (or you favourite text editor) you will find some lines like this:

Code: Select all

PS1='${debian_chroot:+($debian_chroot)}\[\033[01;31m\]\h\[\033[01;34m\] \W \$\[\033[00m\] '
 PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[01;34m\] \w \$\[\033[00m\] '
They subsequently define the "default colours" of PS1 for bash. The first one is for root (su) terminal, the second is user terminal. Using the guide that's linked above, I tailored my user gnome-terminal window to my liking.

Code: Select all

PS1='${debian_chroot:+($debian_chroot)}\[\033[01;31m\]\w\[\033[01;34m\] \$\[\033[00m\] '
This is how mine looks. I just simply changed the user@host to reflect the directory path I am working in, and changed the colour of the font of the directory path to red. As you can see, I left the rest as the same. I tried some other variations of what to display from the guide noted above just to see what things would look like as well, i.e. change \u@\h\ to \u@\W\ displays user@root working directory.
Hope this helps someone in the future. Cheers!
Post Reply

Return to “Newbie Questions”