dconf Command Examples (Cheat Sheet)

dconf is a command line tool for manipulating the dconf configuration database in Linux. dconf is a low-level key-based configuration system, it’s used to store settings for desktop environments and applications in a hierarchical format. It’s similar to gsettings, but it uses a more efficient binary format and provides additional features such as transaction support. The dconf command allows you to read and write values in the dconf database, as well as resetting specific keys or entire directories to their default values.

dconf Command Examples

1. Print a specific key value:

# dconf read /path/to/key

2. Print a specific path sub-directories and sub-keys:

# dconf list /path/to/directory/

3. Write a specific key value:

# dconf write /path/to/key "value"

4. Reset a specific key value:

# dconf reset /path/to/key

5. Watch a specific key/directory for changes:

# dconf watch /path/to/key|/path/to/directory/

6. Dump a specific directory in INI file format:

# dconf dump /path/to/directory/

dconf read Command Examples

1. Print a specific key value:

# dconf read /path/to/key

2. Print a specific key [d]efault value:

# dconf read -d /path/to/key

dconf reset Command Examples

1. Reset a specific key value:

# dconf read /path/to/key

2. Reset a specific directory:

# dconf read -d /path/to/directory/

dconf write Command Examples

1. Write a specific key value:

# dconf write /path/to/key "value"

2. Write a specific string key value:

# dconf write /path/to/key "'string'"

3. Write a specific integer key value:

# dconf write /path/to/key "5"

4. Write a specific boolean key value:

# dconf write /path/to/key "true|false"

5. Write a specific array key value:

# dconf write /path/to/key "['first', 'second', ...]"

6. Write a specific empty array key value:

# dconf write /path/to/key "@as []"
Related Post