当前位置: 代码迷 >> 综合 >> linux保存文件报错问题(readonly option is set)
  详细解决方案

linux保存文件报错问题(readonly option is set)

热度:93   发布时间:2023-12-15 05:26:09.0

用vi修改文件,保存文件时,提示“readonly option is set”的解决方法。

This is a vim issue, not a file permission issue. If you did not have read permission on the file, you'd see a "Permission denied" error.

Do you invoke vi/vim with the -R option? Are you calling view instead of vi or vim? Do you have set readonly in your .vimrc or in a file in ~/.vim/ftplugin?

In vim you can enter :set noreadonly to unset the readonly flag.

步骤:

1.按Esc键

2.输入  :set noreadonly

3.然后就能正常保存了,你可以输入 :wq 来保存文件了。

  相关解决方案