Have you ever given or sold a PC to somebody else, but really wanted to completely wipe the hard drive first? Today we’ll show you how to use an Ubuntu Live CD to get your personal information off your PC.
您是否曾经将PC出售或出售给其他人,但真的想先彻底擦除硬盘驱动器吗? 今天,我们将向您展示如何使用Ubuntu Live CD从PC上获取您的个人信息。
When you delete a file in Windows, Ubuntu, or any other operating system, it doesn’t actually destroy the data stored on your hard drive, it just marks that data as “deleted.” If you overwrite it later, then that data is generally unrecoverable, but if the operating system don’t happen to overwrite it, then your data is still stored on your hard drive, recoverable by anyone who has the right software.
在Windows,Ubuntu或任何其他操作系统中删除文件时,它实际上并没有破坏存储在硬盘驱动器上的数据,只是将数据标记为“已删除”。 如果以后再覆盖它,那么该数据通常是不可恢复的,但是如果操作系统没有碰巧将其覆盖,则您的数据仍将存储在硬盘上,任何拥有合适软件的人都可以恢复。
By securely deleting files or entire hard drives, your data will be gone for good.
通过安全删除文件或整个硬盘驱动器,您的数据将永远消失。
Note: Modern hard drives are extremely sophisticated, as are the experts who recover data for a living. There is no guarantee that the methods covered in this article will make your data completely unrecoverable; however, they will make your data unrecoverable to the majority of recovery methods, and all methods that are readily available to the general public.
注意:现代硬盘驱动器和恢复数据为生的专家都非常复杂。 不能保证本文中介绍的方法将使您的数据完全不可恢复。 但是,它们将使您的数据无法通过大多数恢复方法以及所有公众容易使用的方法进行恢复。
Shred individual files
切碎单个文件
Most of the data stored on your hard drive is harmless, and doesn’t reveal anything about you. If there are just a few files that you know you don’t want someone else to see, then the easiest way to get rid of them is a built-in Linux utility called shred.
硬盘驱动器上存储的大多数数据都是无害的,并且不会泄露任何有关您的信息。 如果您知道只有几个文件不希望其他人看到,那么摆脱它们的最简单方法是使用内置Linux实用程序shred 。
Open a terminal window by clicking on Applications at the top-left of the screen, then expanding the Accessories menu and clicking on Terminal.
通过单击屏幕左上方的“应用程序”,然后展开“附件”菜单并单击“终端”,打开一个终端窗口。
Navigate to the file that you want to delete using cd to change directories and ls to list the files and folders in the current directory.
使用cd导航到要删除的文件,以更改目录,并使用ls列出当前目录中的文件和文件夹。
As an example, we’ve got a file called BankInfo.txt on a Windows NTFS-formatted hard drive.
作为示例,我们在Windows NTFS格式的硬盘驱动器上有一个名为BankInfo.txt的文件。
We want to delete it securely, so we’ll call shred by entering the following in the terminal window:
我们想安全地删除它,因此我们将在终端窗口中输入以下内容来调用shred:
shred <file>
切碎<file>
which is, in our example:
在我们的示例中:
shred BankInfo.txt
切细BankInfo.txt
Notice that our BankInfo.txt file still exists, even though we’ve shredded it. A quick look at the contents of BankInfo.txt make it obvious that the file has indeed been securely overwritten.
请注意,即使我们已将其粉碎,我们的BankInfo.txt文件仍然存在。 快速浏览BankInfo.txt的内容,很明显该文件确实已被安全地覆盖。
We can use some command-line arguments to make shred delete the file from the hard drive as well. We can also be extra-careful about the shredding process by upping the number of times shred overwrites the original file.
我们还可以使用一些命令行参数来使shred从硬盘驱动器中删除文件。 我们还可以通过增加切碎覆盖原始文件的次数来对切碎过程格外小心。
To do this, in the terminal, type in:
为此,在终端中输入:
shred –remove –iterations=<num> <file>
切丝–删除–迭代次数= <num> <file>
By default, shred overwrites the file 25 times. We’ll double this, giving us the following command:
默认情况下, shred会覆盖文件25次。 我们将其加倍,给我们以下命令:
shred –remove –iterations=50 BankInfo.txt
切细–删除–iterations = 50 BankInfo.txt
BankInfo.txt has now been securely wiped on the physical disk, and also no longer shows up in the directory listing.
现在,BankInfo.txt已被安全擦除在物理磁盘上,并且也不再显示在目录列表中。
Repeat this process for any sensitive files on your hard drive!
对硬盘驱动器上的所有敏感文件重复此过程!
Wipe entire hard drives
擦拭整个硬盘
If you’re disposing of an old hard drive, or giving it to someone else, then you might instead want to wipe your entire hard drive. shred can be invoked on hard drives, but on modern file systems, the shred process may be reversible. We’ll use the program wipe to securely delete all of the data on a hard drive.
如果您要处置旧硬盘驱动器或将其交给他人,则可能要擦除整个硬盘驱动器。 可以在硬盘驱动器上调用shred ,但是在现代文件系统上, shred过程可能是可逆的。 我们将使用程序擦除来安全删除硬盘驱动器上的所有数据。
Unlike shred, wipe is not included in Ubuntu by default, so we have to install it. Open up the Synaptic Package Manager by clicking on System in the top-left corner of the screen, then expanding the Administration folder and clicking on Synaptic Package Manager.
与shred不同,默认情况下, 擦拭不包含在Ubuntu中,因此我们必须安装它。 通过单击屏幕左上角的“系统”,然后展开“管理”文件夹并单击“ Synaptic软件包管理器”,以打开Synaptic软件包管理器。
wipe is part of the Universe repository, which is not enabled by default. We’ll enable it by clicking on Settings > Repositories in the Synaptic Package Manager window.
擦除是Universe资源库的一部分,默认情况下未启用。 通过在Synaptic软件包管理器窗口中单击设置>存储库,可以启用它。
Check the checkbox next to “Community-maintained Open Source software (universe)”. Click Close.
选中“社区维护的开源软件(Universe)”旁边的复选框。 单击关闭。
You’ll need to reload Synaptic’s package list. Click on the Reload button in the main Synaptic Package Manager window.
您需要重新加载Synaptic的软件包列表。 在Synaptic Package Manager主窗口中,单击Reload按钮。
Once the package list has been reloaded, the text over the search field will change to “Rebuilding search index”.
重新加载软件包列表后,搜索字段上的文本将更改为“ Rebuild search index”。
Wait until it reads “Quick search,” and then type “wipe” into the search field. The wipe package should come up, along with some other packages that perform similar functions.
等待直到其显示为“快速搜索”,然后在搜索字段中键入“ wipe”。 应该出现擦除程序包,以及其他执行类似功能的程序包。
Click on the checkbox to the left of the label “wipe” and select “Mark for Installation”.
单击标签“擦拭”左侧的复选框,然后选择“标记为安装”。
Click on the Apply button to start the installation process. Click the Apply button on the Summary window that pops up.
单击“应用”按钮开始安装过程。 在弹出的“摘要”窗口中单击“应用”按钮。
Once the installation is done, click the Close button and close the Synaptic Package Manager window.
安装完成后,单击“关闭”按钮,然后关闭“ Synaptic软件包管理器”窗口。
Open a terminal window by clicking on Applications in the top-left of the screen, then Accessories > Terminal.
通过单击屏幕左上角的应用程序,然后单击附件>终端,打开终端窗口。
You need to figure our the correct hard drive to wipe. If you wipe the wrong hard drive, that data will not be recoverable, so exercise caution!
您需要确定我们要擦除的正确硬盘。 如果擦除错误的硬盘驱动器,该数据将无法恢复,请格外小心!
In the terminal window, type in:
在终端窗口中,输入:
sudo fdisk -l
须藤fdisk -l
A list of your hard drives will show up. A few factors will help you identify the right hard drive. One is the file system, found in the System column of the list – Windows hard drives are usually formatted as NTFS (which shows up as HPFS/NTFS). Another good identifier is the size of the hard drive, which appears after its identifier (highlighted in the following screenshot).
将显示您的硬盘驱动器列表。 一些因素将帮助您确定正确的硬盘驱动器。 一种是文件系统,位于列表的“系统”列中-Windows硬盘驱动器通常格式化为NTFS(显示为HPFS / NTFS)。 另一个好的标识符是硬盘驱动器的大小,该大小在其标识符之后显示(在以下屏幕截图中突出显示)。
In our case, the hard drive we want to wipe is only around 1 GB large, and is formatted as NTFS. We make a note of the label found under the the Device column heading. If you have multiple partitions on this hard drive, then there will be more than one device in this list.
在我们的情况下,我们要擦除的硬盘只有大约1 GB,并且格式化为NTFS。 我们记下在“设备”列标题下找到的标签。 如果此硬盘驱动器上有多个分区,则此列表中将有多个设备。
The wipe developers recommend wiping each partition separately.
擦除开发人员建议分别擦除每个分区。
To start the wiping process, type the following into the terminal:
要开始擦除过程,请在终端中输入以下内容:
sudo wipe <device label>
sudo擦除<设备标签>
In our case, this is:
在我们的情况下,这是:
sudo wipe /dev/sda1
须藤擦/ dev / sda1
Again, exercise caution – this is the point of no return!
同样,请谨慎行事–这是无回头的意义!
Your hard drive will be completely wiped. It may take some time to complete, depending on the size of the drive you’re wiping.
您的硬盘驱动器将被完全擦除。 完成操作可能需要一些时间,具体取决于要擦拭的驱动器的大小。
Conclusion
结论
If you have sensitive information on your hard drive – and chances are you probably do – then it’s a good idea to securely delete sensitive files before you give away or dispose of your hard drive. The most secure way to delete your data is with a few swings of a hammer, but shred and wipe from a Ubuntu Live CD is a good alternative!
如果您的硬盘驱动器上有敏感信息,并且您很有可能会这么做,那么在您放弃或处置硬盘驱动器之前,安全地删除敏感文件是个好主意。 删除数据的最安全方法是挥动锤子,但是从Ubuntu Live CD 切碎和擦除是一个很好的选择!
This technique isn’t the only way to dispose of data from an old PC, but it just goes to show how truly versatile a Linux Live CD can be when repairing a Windows PC—you can reset your password, clean off a virus infection, recover deleted files, or even recover files from your dead Windows computer. If you don’t want to carry optical media around with you, you can always create a bootable Ubuntu flash drive instead.
这项技术不是处理旧PC上数据的唯一方法,但它只是说明了在修复Windows PC时Linux Live CD的真正用途-您可以重置密码 , 清除病毒感染 , 恢复删除的文件 ,甚至从死的Windows计算机中恢复文件 。 如果您不想随身携带光学介质,则可以始终创建可引导的Ubuntu闪存驱动器 。
翻译自: https://www.howtogeek.com/howto/15037/use-an-ubuntu-live-cd-to-securely-wipe-your-pcs-hard-drive/