Copy-on-write is the mechanism that lets Linux, Git, Docker, and ZFS share memory and files without copying them, postponing that copy until something actually changes. This guide explains how it works internally, with code examples and commands to try it yourself.