← All commands
Topic hub PowerShell Equivalents
Windows Linux PowerShell Equivalents Web/API

Windows PowerShell Invoke-RestMethod equivalent in Linux

Fetches an API response and parses JSON.

Windows PowerShell Invoke-RestMethod
Linux equivalents
Debian/Ubuntu apt package: jq
curl -s URL | jq .
Fedora dnf package: jq
curl -s URL | jq .
Arch pacman package: jq
curl -s URL | jq .

Overview

What this command does

Fetches an API response and parses JSON.

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

Call JSON API

Fetches an API response and parses JSON.

curl -s URL | jq .

Call JSON API

curl --help

Show command help when supported

man curl

Open the manual page when installed

Ready to run

Copyable Linux commands

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

curl -s URL | jq .

Walkthrough

Examples with explanations

# Windows equivalent: PowerShell Invoke-RestMethod
curl -s URL | jq .

Reference

Common options and variations

Command or optionUse
curl -s URL | jq .Call JSON API
curl --helpShow command help when supported
man curlOpen 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 curl -s URL | jq . Same command on this distribution.
Fedora dnf package: jq curl -s URL | jq . Same command on this distribution.
Arch pacman package: jq curl -s URL | jq . Same command on this distribution.

Keep learning

Related PowerShell Equivalents commands