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

Quick to answer questions about finding your way around Linux Mint as a new user.
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. Stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions use the other forums in the support section.
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
User avatar
darkstrike
Level 5
Level 5
Posts: 798
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 LockBot on Wed Dec 28, 2022 7:16 am, edited 2 times in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Image
Image
JDSeverus

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: 798
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! :)
Image
Image
thomas.raines
Level 2
Level 2
Posts: 60
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!
Locked

Return to “Beginner Questions”