How to change gnome-terminal profile preferences using dconf or gsettings?

The syntax to be used with the gsettings command is described in GNOME Terminal Frequently Asked Questions.

First you need to find out the identifier of the profile you want to change. For example, the identifier of the gnome-terminal default profile can be obtained from schema org.gnome.Terminal.ProfilesList.

Then change the desired keys of path /org/gnome/terminal/legacy/profiles:/:UUID/ of schema org.gnome.Terminal.Legacy.Profile: for this profile.

Note the colons in the above path. It will not work if they are omitted.

Here is a script that use the above to set default-size-columns of the default profile:

profile=$(gsettings get org.gnome.Terminal.ProfilesList default)
profile=${profile:1:-1} # remove leading and trailing single quotes
gsettings set "org.gnome.Terminal.Legacy.Profile:/org/gnome/terminal/legacy/profiles:/:$profile/" default-size-columns 150