---
name: "sync"
section: "8"
platform: "freebsd"
package: "base"
version: "16.0-CURRENT-20261027-61c70dc16a79"
release: "FreeBSD 16.0-CURRENT (2026-10-27)"
platforms: ["linux", "freebsd", "openbsd", "macos"]
url: "https://new.carta.tech/sync/8"
---

# sync(8)

force completion of pending disk writes (flush cache)

## NAME

**sync** – force completion of pending disk writes (flush cache)

## SYNOPSIS

**sync**

## DESCRIPTION

The **sync** utility can be called to ensure that all disk writes have been completed before the processor is halted in a way not suitably done by [reboot(8)](/reboot/8.md) or [halt(8)](/halt/8.md). Generally, it is preferable to use [reboot(8)](/reboot/8.md) or [halt(8)](/halt/8.md) to shut down the system, as they may perform additional actions such as resynchronizing the hardware clock and flushing internal caches before performing a final **sync**.

The **sync** utility utilizes the [sync(2)](/sync/2.md) function call.

## SEE ALSO

[fsync(2)](/fsync/2.md), [sync(2)](/sync/2.md), [syncer(4)](/syncer/4.md), [halt(8)](/halt/8.md), [reboot(8)](/reboot/8.md)

## HISTORY

A **sync** utility appeared in Version 4 AT&T UNIX.

On systems older than 4.0BSD, commands like [reboot(8)](/reboot/8.md) and [halt(8)](/halt/8.md) were unavailable. The shutdown procedure involved running **sync**, waiting for the lights to stop, and turning off the machine.

Issuing three separate **sync** commands (one line each) was a placebo that would generally suffice in Version 7 AT&T UNIX machines that were otherwise quiesced systems. It replaced the one-per-line **sync** as a substitute for waiting.

4\.0BSD introduced [reboot(2)](/reboot/2.md) and [sync(2)](/sync/2.md) which rendered this trick obsolete.
