Data management remains a big issue for many people and businesses today. However, there are many ways you can secure your data today than before. While there are simpler ways to recover data on Linux such as the use of Linux Trash, there are more complex ones too. 

Although data recovery is possible on virtually all the available storage devices, performing the same on Linux appears more complicated. But this should not worry you since that is exactly where we come in.    

zzZryZ3y9KMbJXszf1WM1T0ufnILla8xyHM2vBRDPw7uVhNb43w3NcN5

Can You Recover Deleted Files on Linux?

You might be wondering if Linux recovery is even possible. While the process might be more complex compared to data recovery on Windows and Mac, it is possible to recover deleted files on Linux anyway.

In this article, we will show you how to easily and quickly recover Linux data. Before you make any assumptions, read this guide to retrieving lost files in Linux in totality. You will be able to get help no matter the Linux version you are using e.g. Ubuntu, CentOS 7, or Mint. 

Things to Remember before Beginning Linux File Recovery

Any moment you have a write to the storage device where files have been lost will only reduce your chances of recovering the files. This is the main reason why you are advised to unmount the partition from which you intend to recover deleted files and only mount it back as a read-only device until data recovery is done. 

How to Recover Deleted Files on Linux

Most Linux distributions come from several other “parent” distributions. Although they are largely similar and compatible, they do have a few differences and may use their own directory structures and tools. 

Therefore, even if you are looking for Ubuntu data recovery software, the third-party software you are likely to find are more likely going to be compatible with each other and can be sourced from all the available Linux distributions. 

In this article, we will still offer you solutions on how to recover deleted files on Ubuntu and other Linux distributions based on Debian such as Linux Mint. You should therefore expect very little variation. 

Method 1: Recover Deleted Files from Trash

Similar to the Windows Recycle Bin, Linux Trash is an in-built folder that stores all the deleted files. This is usually done temporarily for a short period of time. If you move with speed, then you will easily get the deleted files in Linux Trash and recover them. 

If you are using the modern distribution, you can easily access the trash folder through your desktop. 

The following method will guide you to recover deleted files from Trash on Ubuntu. 

Step 1: Go to the Ubuntu toolbar and tap on the Trash icon to access its contents using the default file manager. 

Step 2: Choose and select the files or even folders that you intend to recover. Once you have them, right-click on the selection and choose “Restore from Trash.”

Method 2: Recover Deleted Files with PhotoRec

There are several data recovery software in the market today. However, not all of them tell the truth about what they can and what they cannot do. That is why some file recovery software options work on Linux while others cannot. Do not however be deceived that all available data recovery software is built for Linux. Some are specifically built for Windows,  some for Mac, and some for Linux. Still there are some tools that have been built to support data recovery on any device available.

If the files were deleted permanently by the rm-rf, you should be able to recover them with the steps below. 

Step 1: Install TestDisk. It comes with PhotoRec in the same package and you should be able to get PhotoRec the moment you install TestDisk.

Step 2: Launch PhotoRec

Step 3: Choose the device you want to recover from the list of devices available. Highlight “proceed” then click on “Enter” to continue.

Step 4: Highlight the partition to be scanned then hit the “Search” button and finally Enter.

Step 5: Choose the right file system for the device you are using

Step 6: Select “Free” if you intend to scan the unallocated space for deleted files or “Whole” for whole device recovery. 

Step 7: Choose the right destination to store the recovered files. 

Method 3: Recover Deleted Files on Linux with Foremost

Foremost is one the most customizable and versatile recovery solutions. It’s open source and free to use. Recover the files by following the steps below.

Step 1: Fire up your terminal and use the command sudo apt install foremost to install the software

Step 2: Create a folder to store the recovered files. You can use the command mkdir or cd then enter.

Step 3: Launch Foremost by tapping the sudo foremost -i/device/you/want/to/scan

Foremost will now try saving every file you lost by deletion. 

Conclusion 

To recover deleted files is simple and easy. Although the process may be a little complex in Linux, there are several recovery options to try. We however recommend that you backup your files periodically so that you can make life easier recovering lost files from Linux or other devices.

LEAVE A REPLY

Please enter your comment!
Please enter your name here