I recently migrated from LXD installed from deb, to LXD installed from snap. The default editor is set to Vim. How can I change this?


The LXD snap package checks whether you have set the EDITOR environment variable. If you have set it, it will use that text-mode text editor, otherwise it will select a default for you.

Therefore, set the variable EDITOR to nano as follows. Then, in the example (profile edit) it will open it up with nano.

$ export EDITOR=nano
$ lxc profile edit default

To make the change permanent, run the following once:

echo 'export EDITOR=nano' >> ~/.profile 
source ~/.profile

Your Answer

By clicking "Post Your Answer", you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.