tk3.biz
Back to Blog

I Installed Coreutils on Windows

Introduction

On Windows, PowerShell is the standard shell, but when you let AI tools such as Claude do the work, they often try to run Unix commands (cat, rm, echo, and so on) as is. PowerShell sometimes has aliases with the same names, but their options and behavior differ, so the commands can fail.

Install GNU Coreutils for Windows, provided officially by Microsoft, and you can use Unix commands from Windows Terminal (PowerShell) in an almost native way.

Installation

1. Install with winget

No administrator rights needed. Open Windows Terminal and run:

winget install Microsoft.Coreutils

When the installation finishes, restart the terminal.

2. Check That It Works

Let’s try a few commands.

echo aaaa > a.txt
cat .\a.txt
aaaa
rm .\a.txt

It worked without problems. cat showed the file’s contents and rm deleted it.

Handy in Combination with AI

When you let AI tools such as Claude handle terminal work, they often generate steps that assume Unix commands.

For example:

  • cat <filename> to view a file’s contents
  • rm <filename> to delete a file
  • echo <text> > <filename> to create a file

With Coreutils installed, you can copy and paste the commands the AI generates and run them as is, so you get stuck on environment differences less often.

Even if you use PowerShell by default, the Coreutils commands take precedence. If one collides with a PowerShell alias, you can call the command by its full path or remove the alias within the session.

Summary

  • A single line, winget install Microsoft.Coreutils, installs the set of Unix commands
  • cat, rm, echo and others work directly from Windows Terminal (PowerShell)
  • Commands generated by AI tools run on Windows without getting stuck

I recommend this setup if Windows is your main environment and you often hand work off to AI.

Related Posts