Tente:
$ SUDO_EDITOR=/path/to/text-editor sudoedit /etc/default/isc-dhcp-server
Na página de manual do sudo (8) :
When invoked as
sudoedit
, the-e
option (described below), is implied.[…]
The
-e
(edit) option indicates that, instead of running a command, the user wishes to edit one or more files.[…]
- Temporary copies are made of the files to be edited with the owner set to the invoking user.
- The editor specified by the policy is run to edit the temporary files. The
sudoers
policy uses theSUDO_EDITOR
,VISUAL
andEDITOR
environment variables (in that order). […]- If they have been modified, the temporary files are copied back to their original location and the temporary versions are removed.