Ubuntu Core supports a set of system-wide options that allow you to customise your snap and core environment.
As with Configuration in
snaps, these options are
changed with the
snap set and
snap get commands, but with a target of
system instead of a specific snap:
$ snap set system <some.option>="some value" $ snap get system <some.option>
Configuration options can be unset by either passing their names to the unset command or by adding an exclamation mark (!) to the end of an option name:
$ snap unset system <some.option> $ # or (from snapd 2.41+) $ snap set system <some.option>!
Setting this to true disables the system backlight service by masking systemd-backlight@.service. Setting it to false removes the mask and re-enables any system backlight:
$ snap set system system.disable-backlight-service=false
Available since snapd 2.45.
Setting this to true enables persistent (non volatile) journaling in
/var/log/journal, via journald.
$ snap set system journal.persistent=true
journal.persistent to false disables persistent journaling and
removes /var/log/journal if it was created by snapd.
Note: With core16 it is necessary to restart the device manually for changes to take effect.
Available since snapd 2.45.
On a Raspberry Pi, the following options set corresponding values in the config.txt system configuration file:
Further details on the above, see the official Raspberry Pi documentation.
These options may be set to change the proxies to be used by the system when communicating with external sites that speak the respective protocols.
Available since snapd 2.28.
There are four system-wide options that are used to manage how updates are handed:
- refresh.timer: defines the refresh frequency and schedule
- refresh.hold: delays the next refresh until the defined time and date
- refresh.metered: pauses refresh updates when network connection is metered
- refresh.retain: sets how many revisions of a snap are stored on the system
See Controlling updates for further details on how the above options are used.
May be set to true for disabling the SSH service at startup.
Available since snapd 2.22.
Automatic snapshot retention time is
configured with the
snapshots.automatic.retention system option. The default
value is 31 days, and the value needs to be greater than 24 hours:
$ snap set system snapshots.automatic.retention=30h
To disable automatic snapshots, set the retention time to
$ snap set system snapshots.automatic.retention=no
ⓘ Disabling automatic snapshots will not affect pre-existing, automatically generated snapshots, but only those generated by subsequent snap removals.
Automatic snapshots require snap version 2.39+.
A custom SSL certificate can be added to snapd'd trusted certificates pool for
the store communication with the
store-certs.<name>=<value> system option.
To add a certificate, enter the following:
$ snap set system store-certs.cert1="$(cat /path/to/mycert)"
A certificate can be removed with unset:
$ snap unset system store-certs.cert1
Available since snapd 2.45
Defines the behaviour of the system when the power key is pressed.
May be set to one of:
Available since snapd 2.23.