LXD: How to use GNU Nano as editor?

I’m editing the LXD container’s config and notice that it uses VI(M?) as the text editor, which I’m not familiar of. Is it possible to use other editors like GNU Nano?

Thanks in advance!

name:      lxd
summary:   System container manager and API
publisher: Canonical✓
contact:   https://github.com/lxc/lxd/issues
license:   unset
description: |
  LXD is a system container manager.
  
  With LXD you can run hundreds of containers of a variety of Linux
  distributions, apply resource limits, pass in directories, USB devices
  or GPUs and setup any network and storage you want.
  
  Pre-made images are available for Ubuntu, Alpine Linux, ArchLinux,
  CentOS, Debian, Fedora, Gentoo, OpenSUSE and more.
  
  LXD is network aware and all interactions go through a simple REST API,
  making it possible to remotely interact with containers on remote
  systems, copying and moving them as you wish.
  
  Want to go big? LXD also has built-in clustering support,
  letting you turn dozens of servers into one big LXD server.
  
  LXD containers are lightweight, secure by default and a great
  alternative to running Linux virtual machines.
  
  Supported options for the LXD snap (snap set lxd [<key>=<value>...]):
   - criu.enable: Enable experimental live-migration support [default=false]
   - daemon.debug: Increases logging to debug level [default=false]
   - daemon.group: Group of users that can interact with LXD [default=lxd]
   - ceph.builtin: Use snap-specific ceph configuration [default=false]
   - openvswitch.builtin: Run a snap-specific OVS daemon [default=false]
  
  LXD documentation can be found at: https://lxd.readthedocs.io
commands:
  - lxd.benchmark
  - lxd.buginfo
  - lxd.check-kernel
  - lxd.lxc
  - lxd
  - lxd.migrate
services:
  lxd.activate: oneshot, enabled, inactive
  lxd.daemon:   simple, enabled, active
snap-id:      J60k4JY0HppjwOjW8dZdYc8obXKxujRu
tracking:     stable/ubuntu-18.10
refresh-date: today at 00:34 CST
channels:                                
  stable:        3.7         (9550) 53MB -
  candidate:     3.7         (9550) 53MB -
  beta:          ↑                       
  edge:          git-8652cbf (9557) 53MB -
  3.0/stable:    3.0.2       (9500) 52MB -
  3.0/candidate: 3.0.2       (9500) 52MB -
  3.0/beta:      ↑                       
  3.0/edge:      git-ff25720 (9501) 52MB -
  2.0/stable:    2.0.11      (8023) 28MB -
  2.0/candidate: 2.0.11      (8023) 28MB -
  2.0/beta:      ↑                       
  2.0/edge:      git-c7c4cc8 (9257) 26MB -
installed:       3.7         (9550) 53MB -

Does setting EDITOR=nano lxc .. help?

1 Like

Yes it works, thanks!