Ubuntu的默认编辑器是nano,可以通过以下命令设置默认编辑器,这样使用 sudo systemctl edit 命令的时候就会使用vim作为编辑器 sudo update-alternatives --config editor