Ubuntu问题:E45: 'readonly' option is set (add ! to override)错误解决


问题描述:E45: 'readonly' option is set (add ! to override)

问题分析:该错误为当前用户没有权限对文件作修改

问题解决:

输入  :w !sudo tee %

  • :w – write
  • !sudo – call shell sudo command
  • tee – the output of write (:w) command is redirected using tee
  • % – current file name


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM