Results 1 to 2 of 2

Thread: change color of terminal

  1. #1

    change color of terminal

    Hi,

    How do I change the color of the terminal? How can I change it from command line?

  2. #2
    Is this an X terminal you are wanting to change the color in, or are you wanting to change the colors of all terminal sessions, even without Xorg? Let us know what terminal app if you are talking about an X terminal (xterm, aterm, Eterm, konsole....), or if you want to change the color of all terminal sessions, please name the shell you are using, or if you don't know; mention the distribution, or post what it says next to "SHELL" if when you type 'env'.

    Since you mentioned wanting to know how to do so from the terminal, I will post an example coming from the most used shell in Linux (bash), and how to change the color of prompt, and the overall terminal.

    Code:
    host:~ KernelKiller$ echo $PS1
    \h:\W \u\$  (your current prompt layout)
    
    // h = host, W = working directory, u = user, $ = the "$" you see at the end
    
    host:~ KernelKiller$ export  PS1="\e[0;31m\h:\e[m\e[0;32m\W \u\$ \e[m "
    That will change your prompt to a Christmas style prompt.


    For the color of the entire terminal use 'setterm': setterm -[background|foreground] [color]

    $ setterm -foreground green
    arrogance breeds ignorance

    Screaming Electron, Full of BSD Goodness

Similar Threads

  1. change the font color of text
    By regix in forum Windows - General Topics
    Replies: 0
    Last Post: 01-01-2005, 03:45 AM
  2. color for a terminal(console)
    By mg in forum Linux - General Topics
    Replies: 0
    Last Post: 06-08-2004, 09:51 AM
  3. [color=Red]WARNING[/color]
    By Rastar in forum Linux - Hardware, Networking & Security
    Replies: 2
    Last Post: 08-10-2002, 02:51 PM
  4. color printer
    By cameron in forum Linux - Hardware, Networking & Security
    Replies: 8
    Last Post: 04-11-2002, 04:33 PM
  5. rxvt color
    By cga in forum Linux - Software, Applications & Programming
    Replies: 3
    Last Post: 12-20-2001, 10:42 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •