解决方法执行一下命令xdgxdg-mime default code.desktop text/plain Debian alternatives systemsudo update-alternatives --set editor /usr/bin/code 参考资料:https://code.visualstudio.com/docs/setup/linux