How to Recover Deleted Data on Kali Linux? – PawanChauhan

how to recover deleted data in kali linux

Do you want to Recover Deleted Data on Kali Linux on Kali Linux?

If Yes, then this is the right place to find out the ways to Recover your Deleted data using Kali Linux, even you can recover your Pendrive or memory card data also.

So read the article completely to know How you can recover your Deleted Files and Folder on Kali Linux, Even If you delete your Data by mistake.

So let’s get started !!


How to Recover Deleted Data on Kali Linux?

how to recover deleted data in kali linux

One day what happened, one of my friends gave me a Pendrive for formatting so I put that Pendrive in my Kali Machine and I select that Pendrive from Kali Terminal and gave the command for Format.

After some time my friend came back and said “still my Pendrive is not clean (format)”. But I said that I have already formatted your Pendrive, then I realized that by mistake I delete my complete Hard Disk. 😀

Then I decided to recover my complete Data from Hask Disk on Kali Linux, So there is a pre-installed tool that can help us to recover our deleted data by file extension.

So now I will share with you the different ways and complete the process to recover your deleted data on Kali Linux from USB or Hard Disk.


Recover Deleted File in Kali Linux using Foremost

Foremost is a pre-installed forensic tool to recover deleted files or data in Kali Linux, it takes a lot of time but really it’s working because I have already used it to recover my documents. You can recover multiple files like doc, jpg, mp4, pdf, etc at one time.

Now I will tell you how you can use this Foremost tool to recover your data, First of all,

open your terminal and type these commands.

sudo apt-get update && Upgrade
sudo apt-get install foremost

After this command gives permission to download this and if you get any error then search that error on youtube or google you will get the solution, otherwise tell me your error, and I’ll give you a solution.

Then I made a new directory on Desktop named “recover” and now I’ll recover my all files in this directory so type this command.

foremost -t jpg,pdf,mp4,exe -v -q -i /dev/sdb2 -o /root/desktop/recover

Explanation: In this command, I wrote “foremost” because I want to use it. then I wrote some file formats which I want to recover, you can replace them if you want to recover other files.

/dev/sbd2” is one of the disk partitions, I wrote it because I want to recover my data from this disk you can replace your disk name by typing the command “fdisk -l“.

/root/desktop/recover” is a directory location where I’ll save my recovered data, you can type this according to your directory location.


If you have liked this article and it helps you to recover your data, then you can share it with friends and family so that they do not ever get such a problem.

If you have any problem with any part of this article, or you want any more information related to the computer, then tell me in the comment box, and I will surely reply to you.

Thank You !!

Pawan Chauhan

I'm a Web Developer and Software Trainer.

Leave a Reply