From LinuxReviews
Jump to navigationJump to search

OSTree is a set of command line tools and libraries (libostree) for downloading, managing and updating large filesystem trees in a git-style fashion. Some GNU/Linux distributions use it as an alternative or addition to traditional package managers like apt and dnf.

OSTree uses a content-addressed object store with branches to store file system trees. These trees can be cloned but they can not be changed. Individual files have checksums to ensure integrity. Think git for bootable root file systems with a different toolset geared towards maintaining entire operating systems. OSTree differs from git in one very notable way: The cloned files are immutable, they can not be changed. Upgrading is done by cloning an entirely new tree which is then merged with the existing tree. This ensures that the running tree remains unchanged. The new upgraded tree does not become active until the next system reboot.

OSTree distributions install the core base system to /ostree/deploy/currentroot instead of /. /ostree/deploy/ can contain several complete system trees side-by-side, but only one will be in use at any one time.

Distributions using OSTree will typically use it to install and maintain a bootable base system. End-users can install additional packages using either traditional package managers or Flatpak or Snap depending on the distribution. OSTree itself is not aware of any individual packages, all it knows about is the entire file system tree it maintains in /ostree.

OSTree is used by endless OS, Fedora CoreOS, Fedora Silverblue, CentOS and the GNOME continuous project.