<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="../articles/article.xsl"?> 

<articles>
  <article date="1 Dec 2020">
    <pagetitle>tmux the rainbow</pagetitle>
    <articleheader>Enabling 256 Colors in tmux</articleheader>
    <articleabstract>It turns out that tmux supports 256 colors if you read the docs</articleabstract>
    <articlebody>

<p>I've been using ssh and tmux for a while to do work on my home computer when I'm away from it<sup class="inlinefootnote">1</sup>. I was annoyed that tmux didn't support very many colors, but it didn't bother me that much because I don't do that much in my remote ssh sessions that needed more colors. But then I read some documentation that said that tmux supports 256 colors, and even though I knew I didn't need it, I knew I had to have it.</p>

<p>It turns out that all you need to do is to set your <code>TERM</code> within tmux to <code>screen-256color</code>, and the easiest way to do that is to edit your <code>~.tmux.conf</code> and add the following line:</p>

<pre>~.tmux.conf<code>
set -g default-terminal "screen-256color"</code></pre>

<p>And that's it. It sometimes pays <a href="https://github.com/tmux/tmux/wiki/FAQ">to read the documentation</a>, but that also implies that you know what you're looking for, which is kind of a chicken and egg problem with documentation, but that's another rant for another day.</p>

</articlebody>
    <footnotes>
      <footnote>The definition of 'work' depends on what time of day is is</footnote>
    </footnotes>
  </article>
</articles>
