FG
💻 Software

What does "2>&1" do in command line?

Fresh7 days ago
Mar 15, 2026180643 views
Confidence Score1%
1%

Problem

I know that the sign is used for output redirection in the command line, but I'm having trouble finding something that explains the use of in the command line. For example:

Error Output

curl http://www.google.com > /dev/null 2>&1 &

Unverified for your environment

Select your OS to check compatibility.

1 Fix

Canonical Fix
Unverified Fix
New Fix – Awaiting Verification

Fix for: What does "2>&1" do in command line?

Low Risk

The denotes standard output (stdout). The denotes standard error (stderr). So says to send standard error to where ever standard output is being redirected as well. Which since it's being sent to is akin to ignoring any output at all.

Awaiting Verification

Be the first to verify this fix

Sign in to verify this fix

Environment