Problem Description
The following problems are encountered when saving and exiting after using the vi editor to write the content
solution
The reason for this problem is that the user permissions are not enough, because ordinary users cannot save files with vi, and they need to use super users.
Convert to superuser first: su
Then use vi to open the file to save: vi...:wq
Reference link
Linux operation prompt: "Can't open file for writing" or "operation not permitted" solution