How to Recover Deleted Files on Kali Linux? I know you must be looking for it for some moment but if you have got the best article on it. Then we assure you that you are in the right place to know it. Let me you something like you. I also got my files deleted on Kali Linux by mistake. What happened is that one of my friends came to me and gave me a Pendrive and wants me to format that Pendrive.
So I inserted that Pendrive on my Kali Linux machine. And I thought that I have formatted that Pendrive and given that Pendrive to my friend. A few days later he came back and said my Pendrive is not formatted and I said that I had formatted that. Then I took a look at my computer and noticed that I had deleted my files on my Kali Linux.
Then I decided that now I have to recover those files back from the hard disk on Kali Linux. To do that there is a pre-installed tool that could help me to recover my files back from Kali Linux by file extension. So if you are thinking that my Kali Linux does not have a pre-installed tool, then we will also provide you with some tools that you could install to recover those files.
How to Recover Deleted Files on Kali Linux using Foremost
So foremost is a pre-installed tool that you could use to recover your deleted files on Kali Linux. But you might wait for some time because it takes a lot of time but it would definitely work. There must be another thing going on in your mind what I mean is a question about which type of files I could recover. You could recover any kind of file like Doc, jpg, pdf, mp4, png, etc., but only at once. So let’s get started to know How to Recover Files on Kali Linux using foremost. Here, are the steps on How to Recover Deleted Files on Kali Linux using foremost.
Steps on How to Recover Deleted Files on Kali Linux using Foremost
First, open your terminal and then connect your USB to the virtual machine.
After you have connected your USB to the virtual machine then type this command sudo fdisk-l. Then you will see your USB device name in the device section.
Then clear your screen to do that just type clear and press enter then your screen will be clear. Then type this command sudo fdisk-t jpeg, jpg, pdf, png -v -q -i/dev/sdb1 -o /home/Kali/recoverfiles/. Then click enter so if you see in the command we have typed -t it is because it refers to want kind of file you want to recover. If you want to recover all types of files then instead of typing file types like jpeg, png, or anything else. Just type all instead of them.
After that, all of your deleted files will be recovered on your Kali Linux machine. Then go back to your home screen and open the file named recoverfiles. If you opened the file you will see that nothing is in there don’t worry you have to go back and then click right on the file recoverfiles. And select open as root once you opened it as root then enter your device password. Then open the file and you will see all of your deleted files will be there.
So that’s it you could just recover your files on Kali Linux following these pretty simple steps we provided you. So you might be thinking wow! it was so easy than I thought. Yes, it was pretty easy but what about those people who don’t have the foremost tool pre-installed? Then we provided them with some recovery tools that they could use to recover their files on Kali Linux.
Install Foremost on Kali Linux
So if you don’t have foremost pre-installed on your Kali Linux. Then you could install foremost by just following the steps below. You could install it if you do want not to install any kind of other recovery tools on your Kali Linux for recovering your deleted files on Kali Linux.
- To install Kali Linux open the terminal on your Kali Linux machine.
- Then there you have to type this command sudo apt install foremost. Then click enter.
3. After that, your foremost will be installed on your Kali Linux machine.
Recovery tools to recover your Deleted files on Kali Linux
So as I said in the above section that if foremost is not pre-installed in your Kali Linux. Then you could download some recovery tools that you could use to recover them. So here are some of the recovery tools to recover your files on Kali Linux.
1. TestDisk – Partition and Disk Recovery Tool
TestDisk is a free and open-source utility service that you could use to recover your deleted files and could even repair corrupted filesystems on your Kali Linux. With TestDisk you could collect the information from corrupted drives. And you could send them to a technician later. This recovery tool is very simple to use and could recover your files using the commands. So TestDisk could be installed on every distro of Linux. But I would be giving only some of it.
Install TestDisk on Ubuntu/Debian
So if your distro is Ubuntu or Debian you could use this command on your Kali Linux to recover your files.
sudo apt update
sudo apt -y install testdisk
Install TestDisk on Fedora
To install TestDisk on fedora use this command;
sudo dnf install testdisk
Install TestDisk on Red Hat and CentOS 7
yum install epel-release
yum install testdisk
So there were some distros of Kali Linux that you could download. To recover your files.
2. Mondo Rescue – Network Drive Recovery Utility
This is another recovery tool that you could use to recover your files on Kali Linux. This software is free to use and it supports both Linux and Free BSD. This could be really helpful for you if you are working on multiple file systems. This software is used by many professional people around the world to recover data/backup/ restore. That’s why I added it for you guys. I personally suggest you use it.
So this article was all about How to Recover Deleted Files on Kali Linux. We hope that you liked our today’s blog and have learned How to Recover Files on Kali Linux and something informative and interesting. We hope that you have understood our blog and we also hope that you have no problem doing it by yourself. But if still, you were having any kind of problem or any kind of suggestion then do comment to us. We would love to reach out to you.