Basically, no information on your system will be deleted by itself, unless you delete it yourself. This deletion may be due to your ignorance. Because a very simple command in the command environment (rm) can easily delete your data and the only thing we can do in this situation is to stare at the black screen of the system command environment.

How to Recover Deleted Files on Kali Linux?

Before going a step further, make sure that you log in with the Root user. If you use the basic user, later you will face some issues. Also, for this article I am going to recover deleted files of a USB flash drive, however, you can use the same method to recover data from the drives inside the Kali Linux. Step #1. Open the terminal and go to the desktop and create a new directory using the mkdir on the desktop. In my case, the directory that I create is called “recovers”. Once you create the directory, go to the same directory using the cd command. Step #2. The tool by which I am going to recover the deleted files is known as Foremost, so make sure you install it using the following command on the Terminal. Step #3. Now I am going to find out the path or to put it simply the location of the USB flash drive. Just type the following command, and in the end, you will see it, just copy the path. Look at the below codes in the snippet, the last two lines in the following code are the path of the USB flash drive and it is /dev/sdb1, make sure you copy it. Step #4. Once you find out the USB flash drive’s path, we need to find the attributes of the foremost command. Type Foremost -help and press enter. To recover every type of file, we need to add the -t attribute following by “all“. If you want to recover only jpeg or png or any other type of file, just instead of “all” type it. I am also using the -v (stands for verbose), – o (Stands for output directory), and -i ( insert the USB drive’s path). To combine all the attributes together, it will be Foremost -t all -i /dev/sb1 -v -o /root/Desktop/recovers/ Once the files are recovered, you will bunch of directories in the output directory you mentioned.

Conclusion:

It is not really hard to Recover Deleted Files on Kali Linux, just make sure you have the root privileges. Then install the Foremost tool and finally combine the attributes and recover the deleted files. I hope this article helped you. If the article is confusing, you can watch the below video.  

How to Recover Deleted Files on Kali Linux  - 31How to Recover Deleted Files on Kali Linux  - 98How to Recover Deleted Files on Kali Linux  - 42How to Recover Deleted Files on Kali Linux  - 19How to Recover Deleted Files on Kali Linux  - 6