Herr Bischoff


How to Directly Write a Disk Image While Downloading

Yet another entry for things you already know, unless you don’t.

I wondered about this last week since the download speed of the ISO I wanted to use was rather slow. Once you think of it, it’s actually trivial, if somewhat uncommon and demonstrates the strength of shell piping.

curl -Ls https://iso.pop-os.org/22.04/amd64/nvidia/30/pop-os_22.04_amd64_nvidia_30.iso | \
pv > /dev/disk2

Note that I use the pv command to show throughput and amount of data written. You might need to install that separately. If you don’t care about that, direct write works as well.

curl -Ls https://iso.pop-os.org/22.04/amd64/nvidia/30/pop-os_22.04_amd64_nvidia_30.iso > /dev/disk2