← 返回命令列表

Linux command

ostree 命令

文本

复制后可按需替换文件名、目录或参数。

常用示例

Initialize

ostree init --repo [path/to/repo]

Example

ostree commit --repo [path/to/repo] --branch [branch_name]

Show files

ostree ls --repo [path/to/repo] [commit_id]

Example

ostree show --repo [path/to/repo] [commit_id]

Example

ostree log --repo [path/to/repo] [branch_name]

Example

ostree summary --repo [path/to/repo] --view

Example

ostree refs --repo [path/to/repo]

说明

ostree is a version control system for binary files, optimized for managing operating system root filesystems. Unlike git (which tracks text files), OSTree efficiently handles the large binary files and hard links common in OS trees. OSTree is the foundation for immutable, image-based operating systems like Fedora Silverblue, Fedora CoreOS, and Endless OS. It enables atomic upgrades, rollbacks, and multiple parallel deployments of the operating system. The system uses content-addressed storage (like git) with deduplication, making it efficient for storing multiple OS versions that share most files.

参数

init
Initialize a new repository
commit
Create a new commit
checkout
Check out a commit to a directory
ls
List files in a commit
show
Show commit metadata
log
Show commit history
refs
List available refs (branches)
summary
Show or update repository summary
diff
Show differences between two commits
cat
Display file contents from a commit
prune
Search for unreachable objects and delete them
remote
Manage remote repository configuration
pull
Pull from a remote repository
fsck
Check repository for consistency
static-delta
Manage static deltas between commits
admin
Manage system deployments (for bootable trees)
--repo _path_
Path to the repository
--verbose
Enable verbose output
--version
Print version and exit

FAQ

What is the ostree command used for?

ostree is a version control system for binary files, optimized for managing operating system root filesystems. Unlike git (which tracks text files), OSTree efficiently handles the large binary files and hard links common in OS trees. OSTree is the foundation for immutable, image-based operating systems like Fedora Silverblue, Fedora CoreOS, and Endless OS. It enables atomic upgrades, rollbacks, and multiple parallel deployments of the operating system. The system uses content-addressed storage (like git) with deduplication, making it efficient for storing multiple OS versions that share most files.

How do I run a basic ostree example?

Run `ostree init --repo [path/to/repo]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

What does init do in ostree?

Initialize a new repository