Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am looking for a command line way to change the background & foreground colors of all open terminal (and also for any new terminal, the new settings should be applied).

Using something like setterm -term linux -back blue -fore white -clear only the terminal in which I execute the command is affected. I want to change for all terminals, without needed to close/reopen any terminal.

thanks

share|improve this question
up vote 1 down vote accepted

You can redirect the output of the setterm command to the device file of the terminal.

for i in {0..3}; do setterm -term linux -back blue -fore white -clear > /dev/pts/$i; done
share|improve this answer
    
thank you so much. it works and i learnt something new about /dev/pts – Jp19 Feb 21 '11 at 4:54

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .