Linux command
gsettings 命令
文本
复制后可按需替换文件名、目录或参数。
常用示例
Set
gsettings set [org.example.schema] [example-key] [value]
Get
gsettings get [org.example.schema] [example-key]
Reset
gsettings reset [org.example.schema] [example-key]
Example
gsettings list-recursively
Example
gsettings list-recursively [org.example.schema]
Example
gsettings range [org.example.schema] [example-key]
Example
gsettings describe [org.example.schema] [example-key]
说明
gsettings is the command-line interface for GSettings, GNOME's configuration system. It provides schema-validated access to dconf settings, ensuring type safety and valid values. Settings are organized in schemas (like org.gnome.desktop.interface) containing typed keys. Unlike direct dconf access, gsettings validates values against the schema before applying them.
参数
- get _SCHEMA_ _KEY_
- Get the value of a key
- set _SCHEMA_ _KEY_ _VALUE_
- Set a key's value (must match schema type)
- reset _SCHEMA_ _KEY_
- Reset key to schema default
- list-schemas
- List installed schemas
- list-keys _SCHEMA_
- List keys in a schema
- list-recursively _SCHEMA_
- List all settings (optionally filtered by schema)
- range _SCHEMA_ _KEY_
- Show valid values for a key
- describe _SCHEMA_ _KEY_
- Show human-readable description
- monitor _SCHEMA_ _KEY_
- Watch for changes
FAQ
What is the gsettings command used for?
gsettings is the command-line interface for GSettings, GNOME's configuration system. It provides schema-validated access to dconf settings, ensuring type safety and valid values. Settings are organized in schemas (like org.gnome.desktop.interface) containing typed keys. Unlike direct dconf access, gsettings validates values against the schema before applying them.
How do I run a basic gsettings example?
Run `gsettings set [org.example.schema] [example-key] [value]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does get _SCHEMA_ _KEY_ do in gsettings?
Get the value of a key