# Does Bash colors output only on MacOS?

**URL:** <https://forum.freecodecamp.org/t/does-bash-colors-output-only-on-macos/82391>\
**Category:** General\
**Created:** [January 31, 2017, 4:11pm UTC](https://forum.freecodecamp.org/t/does-bash-colors-output-only-on-macos/82391 "2017-01-31T16:11:31Z")\
**Posts on this page:** 15\
**Page:** 1

<div class="post-metadata">

**Author:** ![sebastianhew](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/sebastianhew/32/163430_2.png) [@sebastianhew](https://forum.freecodecamp.org/u/sebastianhew)\
**Post date:** [January 31, 2017, 4:11pm UTC](https://forum.freecodecamp.org/t/does-bash-colors-output-only-on-macos/82391/1 "2017-01-31T16:11:31Z")

</div>

Hey huys,

I’m watching many tutorials where people have their console output (bash) colored.

They have **errors in red** or WARNings with yellow background. Most frequently i see it with npm outputs.

Can I have it on Windows? Or is it just on MacOS?

---

<div class="post-metadata">

**Author:** ![Tan-Moy](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/tan-moy/32/31300_2.png) [@Tan-Moy](https://forum.freecodecamp.org/u/Tan-Moy)\
**Post date:** [January 31, 2017, 4:19pm UTC](https://forum.freecodecamp.org/t/does-bash-colors-output-only-on-macos/82391/2 "2017-01-31T16:19:03Z")

</div>

Don’t have a mac but linux has them too. For windows try using PowerShell(built-in) instead of cmd. It has limited color support and provides a unix like environment.

---

<div class="post-metadata">

**Author:** ![ArielLeslie](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/arielleslie/32/264841_2.png) [@ArielLeslie](https://forum.freecodecamp.org/u/ArielLeslie)\
**Post date:** [January 31, 2017, 4:19pm UTC](https://forum.freecodecamp.org/t/does-bash-colors-output-only-on-macos/82391/3 "2017-01-31T16:19:31Z")

</div>

Windows 10 now has a bash shell, and it will support coloring (but I think you have to turn it on). You have to put your Windows in Developer Mode and turn on the Windows subsystem for Linux.

---

<div class="post-metadata">

**Author:** ![sebastianhew](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/sebastianhew/32/163430_2.png) [@sebastianhew](https://forum.freecodecamp.org/u/sebastianhew)\
**Post date:** [January 31, 2017, 4:24pm UTC](https://forum.freecodecamp.org/t/does-bash-colors-output-only-on-macos/82391/4 "2017-01-31T16:24:46Z")

</div>

> [@Tan-Moy](#):
>
> For windows try using PowerShell(built-in) instead of cmd. It has limited color support and provides a unix like environment.

I use bash on windows

---

<div class="post-metadata">

**Author:** ![ArielLeslie](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/arielleslie/32/264841_2.png) [@ArielLeslie](https://forum.freecodecamp.org/u/ArielLeslie)\
**Post date:** [January 31, 2017, 4:33pm UTC](https://forum.freecodecamp.org/t/does-bash-colors-output-only-on-macos/82391/5 "2017-01-31T16:33:47Z")

</div>

I believe that instructions for playing with terminal colors in Ubuntu should more or less apply to Win10 bash. I just got a computer with Win10 last night, so I haven’t played with this yet. If I find out anything exciting, I’ll let you know.

ETA: [This StackOverflow answer which may be related](http://stackoverflow.com/questions/39376957/show-colors-in-output-of-bash-script-or-bash-c)

---

<div class="post-metadata">

**Author:** ![Tan-Moy](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/tan-moy/32/31300_2.png) [@Tan-Moy](https://forum.freecodecamp.org/u/Tan-Moy)\
**Post date:** [January 31, 2017, 4:36pm UTC](https://forum.freecodecamp.org/t/does-bash-colors-output-only-on-macos/82391/6 "2017-01-31T16:36:03Z")

</div>

Wish I could help more but I have no experience on using bash on Ubuntu on windows. Though I have a windows system I dual boot linux for my coding environment.

---

<div class="post-metadata">

**Author:** ![BenGitter](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/bengitter/32/12192_2.png) [@BenGitter](https://forum.freecodecamp.org/u/BenGitter)\
**Post date:** [January 31, 2017, 4:40pm UTC](https://forum.freecodecamp.org/t/does-bash-colors-output-only-on-macos/82391/7 "2017-01-31T16:40:38Z")

</div>

Try [cmder](http://cmder.net/), it looks way better than cmd or powershell.

---

<div class="post-metadata">

**Author:** ![sebastianhew](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/sebastianhew/32/163430_2.png) [@sebastianhew](https://forum.freecodecamp.org/u/sebastianhew)\
**Post date:** [January 31, 2017, 4:41pm UTC](https://forum.freecodecamp.org/t/does-bash-colors-output-only-on-macos/82391/8 "2017-01-31T16:41:53Z")

</div>

i never use cmd or powershell, always bash on windows, cause i know basic linux commands. Why would I use cmder?

---

<div class="post-metadata">

**Author:** ![BenGitter](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/bengitter/32/12192_2.png) [@BenGitter](https://forum.freecodecamp.org/u/BenGitter)\
**Post date:** [January 31, 2017, 4:45pm UTC](https://forum.freecodecamp.org/t/does-bash-colors-output-only-on-macos/82391/9 "2017-01-31T16:45:10Z")

</div>

It looks better than the bash as well 🙂

cmder is a console emulator, so you can use cmd, powershell and bash, but with a nice UI. And you can have multiple tabs, which I find really useful.

---

<div class="post-metadata">

**Author:** ![ArielLeslie](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/arielleslie/32/264841_2.png) [@ArielLeslie](https://forum.freecodecamp.org/u/ArielLeslie)\
**Post date:** [January 31, 2017, 5:07pm UTC](https://forum.freecodecamp.org/t/does-bash-colors-output-only-on-macos/82391/10 "2017-01-31T17:07:22Z")

</div>

I use [MobaXterm](http://mobaxterm.mobatek.net/) already for SSH and RDP. I just pulled up its shell tool and it seems lovely.

 ![](https://global.discourse-cdn.com/freecodecamp/original/3X/c/0/c01480fa09f13eacfa4cffeecf51886d7c94f25f.png)

 ![](https://global.discourse-cdn.com/freecodecamp/original/3X/d/3/d33bf69c9335973d25da287e413976c6f46da758.png)

---

<div class="post-metadata">

**Author:** ![ArielLeslie](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/arielleslie/32/264841_2.png) [@ArielLeslie](https://forum.freecodecamp.org/u/ArielLeslie)\
**Post date:** [February 1, 2017, 1:19am UTC](https://forum.freecodecamp.org/t/does-bash-colors-output-only-on-macos/82391/11 "2017-02-01T01:19:17Z")

</div>

So now that I’m home with my new toy, I’ve been playing around and it looks like instructions you can find to modify bash colors in Ubuntu bash work fine in “Bash on Ubuntu on Windows” (in other words, edit `~/.bashrc`.

![](https://global.discourse-cdn.com/freecodecamp/original/3X/e/0/e0f0e12d77cccafba03fea0854f44da0e3754c30.png)

---

<div class="post-metadata">

**Author:** ![sebastianhew](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/sebastianhew/32/163430_2.png) [@sebastianhew](https://forum.freecodecamp.org/u/sebastianhew)\
**Post date:** [February 1, 2017, 1:32am UTC](https://forum.freecodecamp.org/t/does-bash-colors-output-only-on-macos/82391/12 "2017-02-01T01:32:51Z")

</div>

but were you able to edit the looks of the output of programs, such as npm? I know i can edit the user line, etc… 🙂

---

<div class="post-metadata">

**Author:** ![ArielLeslie](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/arielleslie/32/264841_2.png) [@ArielLeslie](https://forum.freecodecamp.org/u/ArielLeslie)\
**Post date:** [February 1, 2017, 1:40am UTC](https://forum.freecodecamp.org/t/does-bash-colors-output-only-on-macos/82391/13 "2017-02-01T01:40:44Z")

</div>

Any ubuntu/debian instructions should work. I haven’t gotten as far as playing with node on this computer, but it looks like you can either use modules like `chalk`, `colors`, or `cli-color` or pick colors manually with commands like `console.log('\x1b[36m', 'sometext' ,'\x1b[0m');`

---

<div class="post-metadata">

**Author:** ![sebastianhew](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/sebastianhew/32/163430_2.png) [@sebastianhew](https://forum.freecodecamp.org/u/sebastianhew)\
**Post date:** [February 17, 2017, 4:44am UTC](https://forum.freecodecamp.org/t/does-bash-colors-output-only-on-macos/82391/14 "2017-02-17T04:44:28Z")

</div>

I decided to try ConEmu terminal emulator, and for now I’m in love. Bash on windows sucks 😃

---

<div class="post-metadata">

**Author:** ![ILM](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/ilm/32/363239_2.png) [@ILM](https://forum.freecodecamp.org/u/ILM)\
**Post date:** [January 16, 2021, 5:12pm UTC](https://forum.freecodecamp.org/t/does-bash-colors-output-only-on-macos/82391/15 "2021-01-16T17:12:15Z")

</div>

Closed on January 16, 2021, 5:12pm UTC


