If you have your own Linux server/system that is sharable with other users and you want to keep your files secure so that no one else can read your files, then there is quite an easy way to do so using the vi editor by following the steps below :-
Step 1: Open your file using the vi editor, ex- vim xyz.txt
Step 2: Press ESC and then :X and press enter and then you will be prompted with “Enter encryption key:”.
Step 3: Enter your encryption key or any password and press enter. After this, you will be asked to enter the same key in “Enter same key again:” and then asked to press enter.
Step 4: After this save the file using :wq! and then you’ll exit from the editor.
You can see the garbage value of a file with the cat and vi commands. To view the contents of a file, open the file using Vim and it’ll ask you for the encryption key, and then you should enter the key and you’ll see the file contents.
]]>