Powershell: No colors in powershell-6.0.4 on Fedora 28 - just black/white

Created on 13 Aug 2018  路  2Comments  路  Source: PowerShell/PowerShell

Steps to reproduce

  • Download and install latest Fedora 28 with KDE:
    https://spins.fedoraproject.org/kde/download/index.html
    (you can run it in VM)
  • Update it
  • Add MS repo or just download RPM and install powershell-6.0.4-1.rhel.7.x86_64
    sudo dnf install powershell.rpm
  • Run the pwsh and run command
    Write-Host test -ForegroundColor Red
  • or you can try
    Write-Verbose test -Verbose

Expected behavior

Colored text

Actual behavior

No colors

Environment data

Fedora 28
KDE Plasma 5.13 (plasmashell 5.13.3)
Kernel 4.17.12-200.fc28.x86_64
PowerSshell powershell-6.0.4-1.rhel.7.x86_64

Issue-Question OS-Linux Resolution-Answered WG-Interactive-Console

Most helpful comment

This is a configuration issue - not bug.

You can fix it by changing environment variable TERM from __xterm-256color__ to __xterm__

A few options how to do it:

  • change environment in KDE Konsole (assuming you use default terminal emulator)
  • start PowerShell by: TERM=xterm pwsh
  • add $env:TERM = 'xterm' to your PowerShell profile
  • edit your ~/.bashrc and add alias pwsh="TERM='xterm' pwsh"

    • or my favorite: alias pwsh="TERM='xterm' pwsh -NoLogo"

      :-)

All 2 comments

What terminal do you use?

This is a configuration issue - not bug.

You can fix it by changing environment variable TERM from __xterm-256color__ to __xterm__

A few options how to do it:

  • change environment in KDE Konsole (assuming you use default terminal emulator)
  • start PowerShell by: TERM=xterm pwsh
  • add $env:TERM = 'xterm' to your PowerShell profile
  • edit your ~/.bashrc and add alias pwsh="TERM='xterm' pwsh"

    • or my favorite: alias pwsh="TERM='xterm' pwsh -NoLogo"

      :-)

Was this page helpful?
0 / 5 - 0 ratings