Linux Disk Recovery: Free 5 Ways to Recover Deleted Files on Linux

by Lorena Hill

Updated on 2023-08-24

11 views

5min read

Linux Disk recovery is possible and easier than you think it when you take proper action. This is to say, wrong solutions might erase your lost data forever while wasting your time and money. To help you recover deleted files from Linux with a higher possibility and less effort, we have summed up 5 free ways to help recover deleted files from Linux. If you are trapped with the Linux disk data recovery trouble or just want to learn more about it in case of sudden data loss, then don’t miss this handy guide.

Part 1: What is Linux Disk Recovery?

Generally, Linux disk recovery refers to retrieving lost data caused by human error, viruses, crashed OS, etc from internal/external disks on Linux. Sometimes, Linux disk recovery may contain the process of repairing the corrupted disk to restore the disk back to its normal state.

Part 2: What are Some Common Causes of Data Loss on a Linux Disk?

Here, several common reasons for data loss on Linux are listed. Meanwhile, their related prevention is provided for you to avoid data loss as much as possible.

1. Human Errors

Human errors like accidental deletion and formatting would delete data without leaving any trace, except for directly moving files to Trash.

Prevention: Carefully operate Linux, especially when you are cleaning up the disk space.

2. Virus Infection

Viruses can destroy the files and make the data inaccessible or even leak your information. Linux is likely to be infected with viruses if you download files from unreliable websites or open email attachments from unknown sources, etc.

Prevention: Get files including the software from official or trustworthy websites. In addition, protect your Linux OS with updated antivirus software. Furthermore, keep the security patches of your Linux always the latest.

3. Hardware Failures

When hardware is failing on your Linux PC, the data might be not readable and the OS crashes if worse.

Prevention: Check the disk health regularly by using a professional disk monitoring utility.

4. File System Corruption

File system corruption occurs when there is a power outage, system crash, or improper shutdown, making data unavailable.

Prevention: Use a device named Uninterruptible Power Supply to avoid data loss caused by sudden power outages. Also, shut down your Linux computer in the correct way.

Certainly, data backup is an effective way to prevent data loss led by various reasons, either and works most of the time.

Part 3: Can We Recover Deleted Files from Linux?

Yes! As the deleted files are kept in its original location until new data are written into their occupied space. Therefore, we are able to recover deleted files from Linux, if the data isn’t overwritten and we recover it as soon as possible.

5 Free Ways for Linux Disk Data Recovery

Way 1. Recover from Trash

This is the easiest method and you can do it by opening File Manager > selecting Trash in the left panel > restoring deleted files.

Way 2. Use TeskDisk

If you have to recover the whole partition, you can try this way.  TeskDisk is an open-source tool primarily designed to recover lost partitions for free. It completes the Linux disk recovery within the steps below.

Step 1: Download TestDisk first and install it on your Linux(here takes Ubuntu as an example) via the command: “sudo apt install testdisk”.

testdisk step 1 | Linux Disk Recovery

Step 2: Launch TestDisk by inputting “sudo testdisk” in the terminal window.

testdisk step 2 | Linux Disk Recovery

Step 3: Highlight Create to create a new log file.

testdisk step 3 | Linux Disk Recovery

Step 4: Choose the target disk to recover.

testdisk step 4 | Linux Disk Recovery

Step 5: Select the appropriate partition table type.

testdisk step 5 | Linux Disk Recovery

Step 6: Choose Analyse and TestDisk would start analyzing current partition structure.

testdisk step 6 | Linux Disk Recovery

Step 7: Select Quick Search to begin the data(partition) recovery task.

testdisk step 7 | Linux Disk Recovery

Step 8: Press Enter, meaning to accept Testdisk’s default values.

testdisk step 8 | Linux Disk Recovery

Step 9: Select “Write” and the new partition layout will be saved.

testdisk step 9 | Linux Disk Recovery

Way 3. Use Ddrescue

Built with an intelligent algorithm, Ddrescue is specialized in recovering lost data from failing(block) storage devices. Therefore, it is a useful solution for data recovery of failing drives. For how to recover lost data from Linux via Ddrescue, please refer to this guide.

Way 4. Use R-Linux

Want to easily recover deleted files from your Ext2/Ext3/Ext4 FS drive? Then, R-Linux must be what you want. R-Linux is a free file recovery utility for Linux and only supports the Ext2/Ext3/Ext4 FS file system. It has a user-friendly GUI and easy to use, compared with the other 4 Linux disk recovery software here. You can apply it via the following step-guide.

Step 1: Download and install R-Linux on your Linux PC. Then, run the tool and input the required password when prompted.

Step 2: Choose the drive where the deleted files are saved before and scan it.

rlinux step 2 | Linux Disk Recovery

Step 3: Select the needed files from the scan-out results and recover them to a secure place.

rlinux step 3 | Linux Disk Recovery

Way 5. Use PhotoRec

When you are going to retrieve the lost data from a partition with a corrupted file system, this method is available to you. As a free yet open-source file data recovery tool, PhotoRec could recover lost pictures, videos, documents, and archives from a variety of storage devices like HDDs, memory cards, etc. It is good at recovering files from drives whose file systems are severely damaged. To try this software, here are the details.

Step 1: Install PhotoRec on your Linux OS(e.g. Ubuntu) with the command:”$ sudo apt-get install testdisk”.

Step 2: Type “sudo photorec” to open PhotoRec.

Step 3: Select the target disk and choose Proceed to move on.

photorec step 3 | Linux Disk Recovery

Step 4: Highlight the partition where the files are deleted and choose Search to start file recovery.

photorec step 4 | Linux Disk Recovery

Step 5: Select the file system type of the chosen partition.

photorec step 5 | Linux Disk Recovery

Step 6: Decide to analyse the whole partition or not.

photorec step 6 | Linux Disk Recovery

Step 7: Set a destination for the recovered files and verify it. Now, just wait for the recovery process.

photorec step 7 | Linux Disk Recovery

Part 4: How to Recover Deleted Files from Windows and Mac

We find that some Windows or Mac users are meeting the same trouble- disk recovery in their own OSs, when searching for information about Linux disk recovery. So, we conclude the best way for data recovery on Windows/Mac as a bonus part. Now, let’s move on to more details.

Disk recovery on Windows/Mac could be an easy job with the help of specialized data recovery software and Eassiy Data Recovery is an excellent one. Eassiy Data Recovery enables Windows and Mac users to recover files in more than 2000 formats from over 1000 types of storage devices under various scenarios. It is easy to use and realize the data recovery within 3 steps.

Highlight:

  1. Support different file types, including documents, photos, videos, audio, archives, etc.
  2. Available in multiple situations, such as formatting, accidental deletion, RAW, virus attack, system crash, bad sectors, and so on.
  3. Compatible with varied storage devices like HDDs, SSDs, external disks, USB flash drives, memory drives, and more.
  4. Provide 2 scan modes, saving your time with Quick Mode and finding out files deleted a long time ago with Deep Mode.
  5. Allow users to preview target files before recovering.

3 Steps to Recover Deleted Files from Windows/Mac

Before following the steps, download and install the related version of Eassiy Data Recovery on your Windows PC or Mac. Once the installation is finished, run Eassiy Data Recovery.

Step 1: Select the file types you want to recover and choose the location where the files are lost. Next, click Scan to begin the scanning process.

eassiy data recovery step 1 | Linux Disk Recovery

Step 2: Once the scanning task ends, all deleted files would be shown. You can locate to the needed one and preview it before recovery.

eassiy data recovery step 2 | Linux Disk Recovery

Step 3: Select the file to recover after preview and hit Recover to save it to a wanted location.

eassiy data recovery step 3 | Linux Disk Recovery

Conclusion:

Linux disk recovery could be possible and easy in the right way, so does Windows/Mac disk recovery. You can use the recommended methods like using TestDisk for Linux disk data recovery or recovering lost data from Windows or Mac via robust Eassiy Data Recovery. Hope they help!

Was this information helpful?

TrustScore 5 | 5
Previous article Comprehensive Guide to Disk Recovery on Windows 11/10/8/7 Next article Best Alternative to DiskInternals RAID Recovery and DiskInternals CD & DVD Recovery