I have just recently installed Ubuntu 22.04 on my computer, and I don't know much about Linux. I have a file that I'm trying to secure (only accessible by password, for example)
Does anybody know how can I do that?
I have just recently installed Ubuntu 22.04 on my computer, and I don't know much about Linux. I have a file that I'm trying to secure (only accessible by password, for example)
Does anybody know how can I do that?
You can do that by:
gpg -c filename
GnuPG will now create an encrypted file (with .gpg extension) in your current working directory. To access it, you'll need to decrypt it. For this, run the following command, and when prompted for a password, enter the one you used to encrypt the file and hit Enter:
gpg filename.gpg
GnuPG will return a decrypted version of the file in your current working directory.
zip
zip --password preferred_password archive_file.zip filename1 filename2
Here, replace preferred_password with the password you want to use to encrypt the archive and archive_file.zip
with the file name you want to give to the resultant archive.
Now, when you want to access these files, unzip the archive and enter your password. Or, to do it via the terminal, run:
unzip archive_file.zip
Zip will now ask you for a password. Enter the password you set at the time of encryption and hit Enter to decrypt the file.
mcrypt
mcrypt --list
mcrypt -a algorithm_name filename
mcrypt -d filename.nc
And then, enter the decryption passphrase.
LibreOffice comes preinstalled on Ubuntu.
LibreOffice documents (such as Calc spreadsheets and Write documents) can be saved with a password. The contents will be encrypted using the AES-256-CBC algorithm. Once saved with a password, the document can only be opened by supplying the correct password; it is not possible to recover the password if forgotten.
LibreOffice is also able to use a GPG key if preferred.