How to make command line turn color ?

General support questions
Post Reply
pvanvu
Posts: 7
Joined: 2015/02/21 04:47:50

How to make command line turn color ?

Post by pvanvu » 2015/03/06 08:12:53

HI ,i just view some videos , and i saw someone can output the command lines with many colors , and it's easy to view . Can everyone help me this ? thanks

Image

Image

User avatar
TrevorH
Site Admin
Posts: 33216
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: How to make command line turn color ?

Post by TrevorH » 2015/03/06 09:01:49

If you're talking about your bash command prompt then maybe http://tldp.org/HOWTO/Bash-Prompt-HOWTO/x329.html will help. If you're talking about within your editor then that would be editor specific but for vim you need to make sure that the vim-enhanced package is installed and then you need to edit ~/.vimrc and make sure it contains the line "syntax on". If you are root then that user lacks an alias to point the 'vi' command to /usr/bin/vim so syntax highlighting does not work so you need to alias vi=/usr/bin/vim' in one of your bash startup files.
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

Post Reply