GNU Coreutils to PowerShell Equivalents
If you’ve spent years on Linux and are now working on Windows, or you’re writing cross-platform documentation and need the PowerShell counterpart for a Unix command, this is the reference page for that. The tables below cover all major GNU Coreutils commands organized by category. Direct equivalents show the cmdlet and any aliases. For commands with no native equivalent, the closest workaround or recommended tool is noted. File Content Coreutils Purpose PowerShell Equivalent cat Concatenate/print files Get-Content (aliases: gc, cat, type) tac Print file in reverse (Get-Content file)[-1..-((Get-Content file).Count)] head Print first N lines Get-Content -TotalCount N / Select-Object -First N tail Print last N lines Get-Content -Tail N od Dump file in octal/hex Format-Hex xxd Hex dump Format-Hex wc Count words/lines/chars Measure-Object -Line -Word -Character nl Number lines $n=1; Get-Content f | % { "$n`t$_"; $n++ } pr Paginate text for printing No direct equivalent fold Wrap long lines No direct equivalent fmt Simple text formatter No direct equivalent Examples: ...