Introducing the method of encrypting files using GPG commands
Under Linux, you can use GPG commands to encrypt and decrypt files, and GPG is basically pre-installed in every distribution.
If the file you want to encrypt is named diary.txt, just enter:
gpg -c diary.txt
A dialog box will automatically pop up asking for the encryption password:
After entering the password twice to confirm, diary.txt.gpg will be generated in the directory. This is the encrypted file. Don’t forget to delete the original file~
To decrypt, enter:
gpg diary.txt.gpg
Enter the correct password and diary.txt will be regenerated in the current directory.
In what directory are general software installed in Linux?
Take Ubuntu Linux as an example.
General deb packages (including those downloaded from Synaptic or apt-get) are installed in /usr. For some compressed packages or compiled packages you downloaded by yourself, you can choose the installation directory, which is usually placed in /usr/local/, but also in /opt.
If you want to know the specific location, use the command
dpkg -Lxxx.deb
Note that xxx is the name of the deb package, which can also be viewed using Synaptic.