Server Fault is a question and answer site for system and network administrators. 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

On RedHat/CentOS systems, all of the service management scripts in /etc/init.d (and also run by the "service" command) produce color output. (i.e. the "[ OK ]" and "[FAILED]" strings.) How do I disable this? (The color-producing escape sequences are making the webistrano output more ugly than it needs to be.)

share|improve this question
Do you mean [ OK ], [ FAILED ] flags when starting/stopping? – quanta Nov 4 '11 at 15:18
@quanta Yes; question updated. – ithinkihaveacat Nov 4 '11 at 15:44

Check out /etc/sysconfig/init. The top lines on my CentOS 5.x system:

# color => new RH6.0 bootup
# verbose => old-style bootup
# anything else => new style bootup without ANSI colors or positioning

Changing the BOOTUP line to something like nocolor eliminates the formatting for all init scripts.

If you just want to disable formatting on one of your scripts, add:


after the line that reads:

share|improve this answer
This works even when running scripts manually (i.e. not during bootup), amazingly enough. Is there any way to do this on a per-script basis, though? I'd rather not touch /etc/sysconfig/init. – ithinkihaveacat Nov 4 '11 at 15:57
I've expanded my answer above. – NorbyTheGeek Nov 4 '11 at 21:02

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.