Syntax

Bash Run in the Background Syntax

In Bash, run in the background: runs a command without waiting for it — long_task &

Quick Answer

Syntax
long_task &
BashSyntax

Run in the Background

Code example
long_task &

Runs a command without waiting for it.

Learn More

How to run in the background in Bash

  1. Open your Bash file or editor.
  2. Copy the example, then replace its sample names and values for your code.

Bash Run in the Background Syntax

Use long_task &.

Related Syntax References

Frequently asked questions

What is the Bash syntax for run in the background?

Use this pattern: long_task &

Can I copy this Bash code example?

Yes. Use Copy code and adapt the example to your program.

Is this Bash syntax different on Mac or Windows?

No. The language syntax is the same across operating systems.

Official source · How we verify