← All commands
Topic hub PowerShell Equivalents
Windows Linux PowerShell Equivalents JSON

Windows PowerShell Test-Json equivalent in Linux

Checks that JSON parses successfully.

Windows PowerShell Test-Json
Linux equivalents
Debian/Ubuntu apt package: jq
jq empty file.json
Fedora dnf package: jq
jq empty file.json
Arch pacman package: jq
jq empty file.json

Overview

What this command does

Checks that JSON parses successfully.

Migration tip: Check the distro-specific rows before copying; package names and service names can differ even when the tool name is similar.

Practical tasks

Common use cases

Validate JSON

Checks that JSON parses successfully.

jq empty file.json

Validate JSON

jq --help

Show command help when supported

man jq

Open the manual page when installed

Ready to run

Copyable Linux commands

Review paths, device names, package names and permissions before running any command.

jq empty file.json

Walkthrough

Examples with explanations

# Windows equivalent: PowerShell Test-Json
jq empty file.json

Reference

Common options and variations

Command or optionUse
jq empty file.jsonValidate JSON
jq --helpShow command help when supported
man jqOpen the manual page when installed

Distro differences

Debian/Ubuntu vs Fedora vs Arch

The equivalent is shown for Debian/Ubuntu, Fedora and Arch. Some rows use a different package manager or helper tool where Linux distributions commonly diverge.

DistributionPackage manager / baseEquivalent commandDifference to notice
Debian/Ubuntu apt package: jq jq empty file.json Same command on this distribution.
Fedora dnf package: jq jq empty file.json Same command on this distribution.
Arch pacman package: jq jq empty file.json Same command on this distribution.

Keep learning

Related PowerShell Equivalents commands