CAT on Linux

Step-by-step tutorial to make CAT working on Ubuntu

CAT is distributed as PowerShell module. We have also command-line interface without dependency on PowerShell, but that is not yet supported on Linux (will be if you provide us feedback). Microsoft supports PowerShell on more Linux distributions. Follow the steps in this tutorial to install CAT on Ubuntu.

Install PowerShell 7

Microsoft has a nice article with step-by-step instructions to install PowerShell 7 on Ubuntu. At the moment Focal, Jammy and Noble are supported:

https://learn.microsoft.com/en-us/powershell/scripting/install/install-ubuntu?view=powershell-7.4

Install CAT

First, you need to run PowerShell 7:

pwsh

PowerShell prints its version. Notice it also changes the prompt, now you are “in PowerShell”, not “in bash”. The prompt now starts with “PS” letters:

pwsh command in bash

Your terminal now expects PowerShell commands. You can easily install CAT with a single line, the same way as on Windows:

Install-Module CAT -AcceptLicense -Force -AllowClobber -Scope CurrentUser

Use CAT

Now you can use any commands from CAT PowerShell module.

Don’t forget you need to run Import-Module CAT everytime before you use CAT module. Example:

CAT commands in PowerShell

For non-interactive way, you can save your commands into a .ps1 script and run it like this:

pwsh ./run-cat-tests.ps1