How to enable ANSI escape codes in Windows cmd?

11,157

Solution 1

CMD does not support ANSI escape sequences. You'll have to use COMMAND.COM. What is it that you're trying to do?

How to Enable ANSI.SYS in a Command Window (for COMMAND.COM)

How to Use ANSI.SYS in Windows NT (for COMMAND.COM)

Edit:

You can get less for Windows and use:

less -R filename

Solution 2

You might try Cygwin's bash. Terminal colorization is something that Just Works under Cygwin.

Share:
11,157

Related videos on Youtube

Jakub Arnold
Author by

Jakub Arnold

Experienced software engineer with a background in machine learning and computer science and over 7 years of commercial practice of software development, looking to work on production quality software.

Updated on September 17, 2022

Comments

  • Jakub Arnold
    Jakub Arnold almost 2 years

    What is the simplest way to enable ANSI escape codes (eg. colored output) in Windows cmd?

    • Dennis Williamson
      Dennis Williamson over 14 years
      See my edited answer.
  • Jakub Arnold
    Jakub Arnold over 14 years
    I'm trying to view Rails log files that use ANSI codes for colored output