I'm managing a server with CentOS 6.5 x64 installed.

In my Ubuntu server, when I run composer or Laravel's artisan php cli command, parameters are colorful.

ubuntu terminal composer

But this doesn't happen when I SSH into a CentOS server and run composer again.

centos terminal ssh composer

As you can see, the directories are colored as it should, but php-cli apps are not (Laravel's artisan command has same issue, too).

(This issue also occurs nano editor if that would help.)

Is there a way to "colorize" such commands in CentOS?

Thanks in advance,

  • Chances are the root user isn't setup for color in .bashrc or other files. If you run composer as a different user on your CentOS server, does composer or nano give colorized output as you expect? There are other things to check if the syntax coloring in nano isn't working. – Bert Apr 24 '14 at 14:54
  • @Bert sadly, when I login from another user, it's same. – Arda Apr 25 '14 at 7:18
  • Could you please run echo $TERM both on your ubuntu machine and your server and add the results to your question? – Gerald Schneider Apr 25 '14 at 13:37
  • 9
    php-symphony requires php-posix to support color, for Centos 6.5 that should be in the php-process package yum list php-process or yum provides php-posix – Brian Apr 25 '14 at 15:46
  • @Brian that's it! Thanks, I can see colors in composer now colorful. – Arda Apr 30 '14 at 8:47