Encrypt Files in Linux with Tomb

#Introduction

In this tutorial, In this tutorial, How to Encrypt Files in Linux with Tomb. It’s a simple shell script to allow you to encrypt folders and files in Linux.

Tomb uses both GNU Privacy Guard to handle its encryption and dd to wipe and format its virtual partitions.

Installing Tomb in Ubuntu

sudo apt install -y tomb

 How to encrypt Files in Linux with Tomb

First, you must use the dig subcommand to create a 150M Tomb file with first-encrypt.tomb

tomb dig -s 150 first-encrypt.tomb
How to encrypt Files in Linux with Tomb

Next, You create a new key for tomb file:

tomb forge -k first-encrypt.tomb.key
create a new key for tomb file

Second, You need to link the new key to your new tomb file as command below:

tomb lock -k first-encrypt.tomb.key first-encrypt.tomb
link the new key to your new tomb file as command below

The final, You can open a new locked tomb with the open subcommand below:

tomb open -k first-encrypt.tomb.key first-encrypt.tomb
open a new locked tomb with the open subcommand below

Create an image key to Encrypt files

Use bury subcommand the combine my “first-encrypt.tomb.key” with the image.jpg

image 4

Now, You can open the tomb file with using my new image key.

tomb open -k image.jpg first-encrypt.tomb

Close a tomb (fails if the tomb is being used by a process)

tomb close

Forcefully close all open tombs, killing any applications using them

tomb slam all

List all open tombs

tomb list
List all open tombs

How do expand the size of my first-encrypt.tomb file from 150MB to 1GB:

tomb resize -k first-encrypt.tomb.key -s 1000 first-encrypt.tomb
expand the size tomb command line

Search your tomb

tomb index # The first, In order to search through your tomb files.
tomb search test # after search your want to 

Conclusion

You know How to Encrypt Files in Linux with Tomb. I hope this will be helpful. Thank you for reading the DevopsRoles page!

,

About HuuPV

My name is Huu. I love technology and especially Devops Skill such as Docker, vagrant, git so forth. I likes open-sources. so I created DevopsRoles.com site to share the knowledge that I have learned. My Job: IT system administrator. Hobbies: summoners war game, gossip.
View all posts by HuuPV →

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.