Ubuntu problem: E45:’readonly’ option is set (add! To override) error solved

Problem description: E45:’readonly’ option is set (add! To override)

Problem analysis: The error is that the current user does not have permission to modify the file

problem solved:

Input : w! Sudo tee%

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

 

Similar Posts: