特殊:Badtitle/NS100:HowToMD5SUM:修订间差异
小无编辑摘要 |
小无编辑摘要 |
||
第3行: | 第3行: | ||
The | The program '''''md5sum''''' is designed to verify data integrity using the MD5 (Message-Digest algorithm 5) 128-bit cryptographic hash. MD5 hashes used properly can confirm both file integrity and authenticity. | ||
In terms of integrity, an MD5 | In terms of integrity, an MD5 hash comparison detects changes in files that would cause errors. The possibility of changes (errors) is proportional to the size of the file; the possibility of errors increase as the file becomes larger. It is a very good idea to run an MD5 hash comparison check when you have a file like an operating system install CD that has to be 100% correct. | ||
In terms of security, cryptographic hashes such as MD5 allow for authentication of data obtained from insecure mirrors. | In terms of security, cryptographic hashes such as MD5 allow for authentication of data obtained from insecure mirrors. The MD5 hash must come from a secure source (an HTTPS page) of an organization you trust. While security flaws in the MD5 algorithm have been uncovered, MD5 hashes are generally sufficient for casual use. Please refer to the secure UbuntuHashes page for the official list of Ubuntu MD5 hashes. | ||
[[Anchor(linux)]] | |||
== MD5SUM on Linux == | |||
Most Linux distributions come with the <code><nowiki>md5sum</nowiki></code> utility so installation is usually unnecessary. We are going to use the Ubuntu 6.10 Desktop install CD for the following example: | |||
First go to the correct directory to check a downloaded ''iso'' file: | |||
<pre><nowiki> | <pre><nowiki> | ||
cd download_directory</nowiki></pre> | cd download_directory</nowiki></pre> | ||
Then from within the download directory | Then run the following command from within the download directory. | ||
<pre><nowiki> | <pre><nowiki> | ||
md5sum ubuntu-6.10-desktop-i386.iso</nowiki></pre> | md5sum ubuntu-6.10-desktop-i386.iso</nowiki></pre> | ||
The md5sum should print out a single line after calculating the hash: | |||
<pre><nowiki> | <pre><nowiki> | ||
b950a4d7cf3151e5f213843e2ad77fe3 | b950a4d7cf3151e5f213843e2ad77fe3 ubuntu-6.10-desktop-i386.iso</nowiki></pre> | ||
Compare the hash (the alphanumeric string on left) that your machine calculated with the corresponding hash on the UbuntuHashes page. When both hashes match exactly then the downloaded file is almost certainly intact. If the hashes do not match, then there was a problem with either the download or a problem with the server. You should download the file again from either the same mirror, or from a different mirror if you suspect a server error. If you continuously receive an erroneous file from a server, please be kind and notify the webmaster of that mirror so they can investigate the issue. | |||
== | == MD5SUM on Mac OS X == | ||
Follow the instructions for [[linux MD5SUM on Linux]], except use the command "md5" instead of "md5sum". | |||
Use the Solaris digest(1) command, specifying the md5 algorithm with the -a flag. | == digest(1) on Solaris == | ||
Use the Solaris digest(1) command, specifying the md5 algorithm with the -a flag. For instance: | |||
<pre><nowiki> | <pre><nowiki> | ||
$ digest -a md5 ubuntu-6.10-server-sparc.iso | $ digest -a md5 ubuntu-6.10-server-sparc.iso | ||
4971edddbfc667e0effbc0f6b4f7e7e0</nowiki></pre> | 4971edddbfc667e0effbc0f6b4f7e7e0</nowiki></pre> | ||
== MD5SUM on Windows == | |||
Windows does not come with '''''md5sum'''''. You must download one from another location, preferably one that you trust. There are command line utilities (<code><nowiki>md5sum.exe</nowiki></code>) that work similarly to the Unix utility; one public domain version with source is available from [http://www.fourmilab.ch/md5/ Fourmilab], but the version available from [http://cygwin.com/ Cygwin] is probably easier to install and update, and Cygwin is also recommended and trusted as the source for many more Unixy utilities. Once installed, Cygwin's '''''md5sum''''' behaves exactly as described in '''''MD5SUM on Linux''''' above. | |||
There are also graphical tools such as the one used in the walk-through provided below. | |||
* Download and install [http://www.nullriver.com/index/products/winmd5sum winMD5Sum], a free and open source hash verification program. | |||
* Right-click the ISO file. | |||
* Click Send To, then `winMD5Sum`. | |||
* Wait for `winMD5Sum` to load and finish the checksum (this may take a significant amount of time depending on your computer's performance). | |||
* Copy the corresponding hash from UbuntuHashes into the bottom text box. | |||
* Click "Compare" | |||
https://help.ubuntu.com/community/HowToMD5SUM?action=AttachFile&do=get&target=winMD5Sum.png | https://help.ubuntu.com/community/HowToMD5SUM?action=AttachFile&do=get&target=winMD5Sum.png | ||
* A message box will say "MD5 Check Sums are the same" if the hashes are equal. | |||
== MD5SUM on CD == | |||
To see if your Ubuntu CD was corrupted when burned to the disk, see the [[UbuntuHelp:CDIntegrityCheck]] page, or follow the instructions below. | |||
First mount the CD, if not already mounted: | |||
<pre><nowiki> | <pre><nowiki> | ||
sudo mount /dev/hda /cdrom</nowiki></pre> | sudo mount /dev/hda /cdrom</nowiki></pre> | ||
Then use the supplied md5sum file on the CD | Then use the supplied md5sum file on the CD: | ||
<pre><nowiki> | <pre><nowiki> | ||
cd /cdrom | cd /cdrom | ||
md5sum -c md5sum.txt | grep -v 'OK$'</nowiki></pre> | md5sum -c md5sum.txt | grep -v 'OK$'</nowiki></pre> | ||
If the command outputs any errors, you'll know either the burn was bad or the .iso is | If the command outputs any errors, you'll know that either the burn was bad or the .iso is corrupt. Please note that this method does not verify authenticity unless the hash of the iso file is compared to the hash at the secure UbuntuHashes page. | ||
== External Links == | |||
* [http://en.wikipedia.org/wiki/Cryptographic_hash_function Wikipedia's Cryptographic Hash Entry] | * [http://en.wikipedia.org/wiki/Cryptographic_hash_function Wikipedia's Cryptographic Hash Entry] | ||
---- | |||
Outstanding Issues | |||
* Something with respect to the MD5SUMS.gpg file should be added or linked to herein. | |||
---- | |||
[[category:CategoryDocumentation]] | [[category:CategoryDocumentation]] | ||
[[category:UbuntuHelp]] | [[category:UbuntuHelp]] |
2007年11月22日 (四) 13:04的版本
文章出处: |
{{#if: | {{{2}}} | https://help.ubuntu.com/community/HowToMD5SUM }} |
点击翻译: |
English {{#ifexist: {{#if: UbuntuHelp:HowToMD5SUM | UbuntuHelp:HowToMD5SUM | {{#if: | :}}HowToMD5SUM}}/af | • {{#if: UbuntuHelp:HowToMD5SUM|Afrikaans| [[::HowToMD5SUM/af|Afrikaans]]}}|}} {{#ifexist: {{#if: UbuntuHelp:HowToMD5SUM | UbuntuHelp:HowToMD5SUM | {{#if: | :}}HowToMD5SUM}}/ar | • {{#if: UbuntuHelp:HowToMD5SUM|العربية| [[::HowToMD5SUM/ar|العربية]]}}|}} {{#ifexist: {{#if: UbuntuHelp:HowToMD5SUM | UbuntuHelp:HowToMD5SUM | {{#if: | :}}HowToMD5SUM}}/az | • {{#if: UbuntuHelp:HowToMD5SUM|azərbaycanca| [[::HowToMD5SUM/az|azərbaycanca]]}}|}} {{#ifexist: {{#if: UbuntuHelp:HowToMD5SUM | UbuntuHelp:HowToMD5SUM | {{#if: | :}}HowToMD5SUM}}/bcc | • {{#if: UbuntuHelp:HowToMD5SUM|جهلسری بلوچی| [[::HowToMD5SUM/bcc|جهلسری بلوچی]]}}|}} {{#ifexist: {{#if: UbuntuHelp:HowToMD5SUM | UbuntuHelp:HowToMD5SUM | {{#if: | :}}HowToMD5SUM}}/bg | • {{#if: UbuntuHelp:HowToMD5SUM|български| [[::HowToMD5SUM/bg|български]]}}|}} {{#ifexist: {{#if: UbuntuHelp:HowToMD5SUM | UbuntuHelp:HowToMD5SUM | {{#if: | :}}HowToMD5SUM}}/br | • {{#if: UbuntuHelp:HowToMD5SUM|brezhoneg| [[::HowToMD5SUM/br|brezhoneg]]}}|}} {{#ifexist: {{#if: UbuntuHelp:HowToMD5SUM | UbuntuHelp:HowToMD5SUM | {{#if: | :}}HowToMD5SUM}}/ca | • {{#if: UbuntuHelp:HowToMD5SUM|català| [[::HowToMD5SUM/ca|català]]}}|}} {{#ifexist: {{#if: UbuntuHelp:HowToMD5SUM | UbuntuHelp:HowToMD5SUM | {{#if: | :}}HowToMD5SUM}}/cs | • {{#if: UbuntuHelp:HowToMD5SUM|čeština| [[::HowToMD5SUM/cs|čeština]]}}|}} {{#ifexist: {{#if: UbuntuHelp:HowToMD5SUM | UbuntuHelp:HowToMD5SUM | {{#if: | :}}HowToMD5SUM}}/de | • {{#if: UbuntuHelp:HowToMD5SUM|Deutsch| [[::HowToMD5SUM/de|Deutsch]]}}|}} {{#ifexist: {{#if: UbuntuHelp:HowToMD5SUM | UbuntuHelp:HowToMD5SUM | {{#if: | :}}HowToMD5SUM}}/el | • {{#if: UbuntuHelp:HowToMD5SUM|Ελληνικά| [[::HowToMD5SUM/el|Ελληνικά]]}}|}} {{#ifexist: {{#if: UbuntuHelp:HowToMD5SUM | UbuntuHelp:HowToMD5SUM | {{#if: | :}}HowToMD5SUM}}/es | • {{#if: UbuntuHelp:HowToMD5SUM|español| [[::HowToMD5SUM/es|español]]}}|}} {{#ifexist: {{#if: UbuntuHelp:HowToMD5SUM | UbuntuHelp:HowToMD5SUM | {{#if: | :}}HowToMD5SUM}}/fa | • {{#if: UbuntuHelp:HowToMD5SUM|فارسی| [[::HowToMD5SUM/fa|فارسی]]}}|}} {{#ifexist: {{#if: UbuntuHelp:HowToMD5SUM | UbuntuHelp:HowToMD5SUM | {{#if: | :}}HowToMD5SUM}}/fi | • {{#if: UbuntuHelp:HowToMD5SUM|suomi| [[::HowToMD5SUM/fi|suomi]]}}|}} {{#ifexist: {{#if: UbuntuHelp:HowToMD5SUM | UbuntuHelp:HowToMD5SUM | {{#if: | :}}HowToMD5SUM}}/fr | • {{#if: UbuntuHelp:HowToMD5SUM|français| [[::HowToMD5SUM/fr|français]]}}|}} {{#ifexist: {{#if: UbuntuHelp:HowToMD5SUM | UbuntuHelp:HowToMD5SUM | {{#if: | :}}HowToMD5SUM}}/gu | • {{#if: UbuntuHelp:HowToMD5SUM|ગુજરાતી| [[::HowToMD5SUM/gu|ગુજરાતી]]}}|}} {{#ifexist: {{#if: UbuntuHelp:HowToMD5SUM | UbuntuHelp:HowToMD5SUM | {{#if: | :}}HowToMD5SUM}}/he | • {{#if: UbuntuHelp:HowToMD5SUM|עברית| [[::HowToMD5SUM/he|עברית]]}}|}} {{#ifexist: {{#if: UbuntuHelp:HowToMD5SUM | UbuntuHelp:HowToMD5SUM | {{#if: | :}}HowToMD5SUM}}/hu | • {{#if: UbuntuHelp:HowToMD5SUM|magyar| [[::HowToMD5SUM/hu|magyar]]}}|}} {{#ifexist: {{#if: UbuntuHelp:HowToMD5SUM | UbuntuHelp:HowToMD5SUM | {{#if: | :}}HowToMD5SUM}}/id | • {{#if: UbuntuHelp:HowToMD5SUM|Bahasa Indonesia| [[::HowToMD5SUM/id|Bahasa Indonesia]]}}|}} {{#ifexist: {{#if: UbuntuHelp:HowToMD5SUM | UbuntuHelp:HowToMD5SUM | {{#if: | :}}HowToMD5SUM}}/it | • {{#if: UbuntuHelp:HowToMD5SUM|italiano| [[::HowToMD5SUM/it|italiano]]}}|}} {{#ifexist: {{#if: UbuntuHelp:HowToMD5SUM | UbuntuHelp:HowToMD5SUM | {{#if: | :}}HowToMD5SUM}}/ja | • {{#if: UbuntuHelp:HowToMD5SUM|日本語| [[::HowToMD5SUM/ja|日本語]]}}|}} {{#ifexist: {{#if: UbuntuHelp:HowToMD5SUM | UbuntuHelp:HowToMD5SUM | {{#if: | :}}HowToMD5SUM}}/ko | • {{#if: UbuntuHelp:HowToMD5SUM|한국어| [[::HowToMD5SUM/ko|한국어]]}}|}} {{#ifexist: {{#if: UbuntuHelp:HowToMD5SUM | UbuntuHelp:HowToMD5SUM | {{#if: | :}}HowToMD5SUM}}/ksh | • {{#if: UbuntuHelp:HowToMD5SUM|Ripoarisch| [[::HowToMD5SUM/ksh|Ripoarisch]]}}|}} {{#ifexist: {{#if: UbuntuHelp:HowToMD5SUM | UbuntuHelp:HowToMD5SUM | {{#if: | :}}HowToMD5SUM}}/mr | • {{#if: UbuntuHelp:HowToMD5SUM|मराठी| [[::HowToMD5SUM/mr|मराठी]]}}|}} {{#ifexist: {{#if: UbuntuHelp:HowToMD5SUM | UbuntuHelp:HowToMD5SUM | {{#if: | :}}HowToMD5SUM}}/ms | • {{#if: UbuntuHelp:HowToMD5SUM|Bahasa Melayu| [[::HowToMD5SUM/ms|Bahasa Melayu]]}}|}} {{#ifexist: {{#if: UbuntuHelp:HowToMD5SUM | UbuntuHelp:HowToMD5SUM | {{#if: | :}}HowToMD5SUM}}/nl | • {{#if: UbuntuHelp:HowToMD5SUM|Nederlands| [[::HowToMD5SUM/nl|Nederlands]]}}|}} {{#ifexist: {{#if: UbuntuHelp:HowToMD5SUM | UbuntuHelp:HowToMD5SUM | {{#if: | :}}HowToMD5SUM}}/no | • {{#if: UbuntuHelp:HowToMD5SUM|norsk| [[::HowToMD5SUM/no|norsk]]}}|}} {{#ifexist: {{#if: UbuntuHelp:HowToMD5SUM | UbuntuHelp:HowToMD5SUM | {{#if: | :}}HowToMD5SUM}}/oc | • {{#if: UbuntuHelp:HowToMD5SUM|occitan| [[::HowToMD5SUM/oc|occitan]]}}|}} {{#ifexist: {{#if: UbuntuHelp:HowToMD5SUM | UbuntuHelp:HowToMD5SUM | {{#if: | :}}HowToMD5SUM}}/pl | • {{#if: UbuntuHelp:HowToMD5SUM|polski| [[::HowToMD5SUM/pl|polski]]}}|}} {{#ifexist: {{#if: UbuntuHelp:HowToMD5SUM | UbuntuHelp:HowToMD5SUM | {{#if: | :}}HowToMD5SUM}}/pt | • {{#if: UbuntuHelp:HowToMD5SUM|português| [[::HowToMD5SUM/pt|português]]}}|}} {{#ifexist: {{#if: UbuntuHelp:HowToMD5SUM | UbuntuHelp:HowToMD5SUM | {{#if: | :}}HowToMD5SUM}}/ro | • {{#if: UbuntuHelp:HowToMD5SUM|română| [[::HowToMD5SUM/ro|română]]}}|}} {{#ifexist: {{#if: UbuntuHelp:HowToMD5SUM | UbuntuHelp:HowToMD5SUM | {{#if: | :}}HowToMD5SUM}}/ru | • {{#if: UbuntuHelp:HowToMD5SUM|русский| [[::HowToMD5SUM/ru|русский]]}}|}} {{#ifexist: {{#if: UbuntuHelp:HowToMD5SUM | UbuntuHelp:HowToMD5SUM | {{#if: | :}}HowToMD5SUM}}/si | • {{#if: UbuntuHelp:HowToMD5SUM|සිංහල| [[::HowToMD5SUM/si|සිංහල]]}}|}} {{#ifexist: {{#if: UbuntuHelp:HowToMD5SUM | UbuntuHelp:HowToMD5SUM | {{#if: | :}}HowToMD5SUM}}/sq | • {{#if: UbuntuHelp:HowToMD5SUM|shqip| [[::HowToMD5SUM/sq|shqip]]}}|}} {{#ifexist: {{#if: UbuntuHelp:HowToMD5SUM | UbuntuHelp:HowToMD5SUM | {{#if: | :}}HowToMD5SUM}}/sr | • {{#if: UbuntuHelp:HowToMD5SUM|српски / srpski| [[::HowToMD5SUM/sr|српски / srpski]]}}|}} {{#ifexist: {{#if: UbuntuHelp:HowToMD5SUM | UbuntuHelp:HowToMD5SUM | {{#if: | :}}HowToMD5SUM}}/sv | • {{#if: UbuntuHelp:HowToMD5SUM|svenska| [[::HowToMD5SUM/sv|svenska]]}}|}} {{#ifexist: {{#if: UbuntuHelp:HowToMD5SUM | UbuntuHelp:HowToMD5SUM | {{#if: | :}}HowToMD5SUM}}/th | • {{#if: UbuntuHelp:HowToMD5SUM|ไทย| [[::HowToMD5SUM/th|ไทย]]}}|}} {{#ifexist: {{#if: UbuntuHelp:HowToMD5SUM | UbuntuHelp:HowToMD5SUM | {{#if: | :}}HowToMD5SUM}}/tr | • {{#if: UbuntuHelp:HowToMD5SUM|Türkçe| [[::HowToMD5SUM/tr|Türkçe]]}}|}} {{#ifexist: {{#if: UbuntuHelp:HowToMD5SUM | UbuntuHelp:HowToMD5SUM | {{#if: | :}}HowToMD5SUM}}/vi | • {{#if: UbuntuHelp:HowToMD5SUM|Tiếng Việt| [[::HowToMD5SUM/vi|Tiếng Việt]]}}|}} {{#ifexist: {{#if: UbuntuHelp:HowToMD5SUM | UbuntuHelp:HowToMD5SUM | {{#if: | :}}HowToMD5SUM}}/yue | • {{#if: UbuntuHelp:HowToMD5SUM|粵語| [[::HowToMD5SUM/yue|粵語]]}}|}} {{#ifexist: {{#if: UbuntuHelp:HowToMD5SUM | UbuntuHelp:HowToMD5SUM | {{#if: | :}}HowToMD5SUM}}/zh | • {{#if: UbuntuHelp:HowToMD5SUM|中文| [[::HowToMD5SUM/zh|中文]]}}|}} {{#ifexist: {{#if: UbuntuHelp:HowToMD5SUM | UbuntuHelp:HowToMD5SUM | {{#if: | :}}HowToMD5SUM}}/zh-hans | • {{#if: UbuntuHelp:HowToMD5SUM|中文(简体)| [[::HowToMD5SUM/zh-hans|中文(简体)]]}}|}} {{#ifexist: {{#if: UbuntuHelp:HowToMD5SUM | UbuntuHelp:HowToMD5SUM | {{#if: | :}}HowToMD5SUM}}/zh-hant | • {{#if: UbuntuHelp:HowToMD5SUM|中文(繁體)| [[::HowToMD5SUM/zh-hant|中文(繁體)]]}}|}} |
{{#ifeq:UbuntuHelp:HowToMD5SUM|:HowToMD5SUM|请不要直接编辑翻译本页,本页将定期与来源同步。}} |
{{#ifexist: :HowToMD5SUM/zh | | {{#ifexist: HowToMD5SUM/zh | | {{#ifeq: {{#titleparts:HowToMD5SUM|1|-1|}} | zh | | }} }} }} {{#ifeq: {{#titleparts:HowToMD5SUM|1|-1|}} | zh | | }}
The program md5sum is designed to verify data integrity using the MD5 (Message-Digest algorithm 5) 128-bit cryptographic hash. MD5 hashes used properly can confirm both file integrity and authenticity.
In terms of integrity, an MD5 hash comparison detects changes in files that would cause errors. The possibility of changes (errors) is proportional to the size of the file; the possibility of errors increase as the file becomes larger. It is a very good idea to run an MD5 hash comparison check when you have a file like an operating system install CD that has to be 100% correct.
In terms of security, cryptographic hashes such as MD5 allow for authentication of data obtained from insecure mirrors. The MD5 hash must come from a secure source (an HTTPS page) of an organization you trust. While security flaws in the MD5 algorithm have been uncovered, MD5 hashes are generally sufficient for casual use. Please refer to the secure UbuntuHashes page for the official list of Ubuntu MD5 hashes.
MD5SUM on Linux
Most Linux distributions come with the md5sum
utility so installation is usually unnecessary. We are going to use the Ubuntu 6.10 Desktop install CD for the following example:
First go to the correct directory to check a downloaded iso file:
cd download_directory
Then run the following command from within the download directory.
md5sum ubuntu-6.10-desktop-i386.iso
The md5sum should print out a single line after calculating the hash:
b950a4d7cf3151e5f213843e2ad77fe3 ubuntu-6.10-desktop-i386.iso
Compare the hash (the alphanumeric string on left) that your machine calculated with the corresponding hash on the UbuntuHashes page. When both hashes match exactly then the downloaded file is almost certainly intact. If the hashes do not match, then there was a problem with either the download or a problem with the server. You should download the file again from either the same mirror, or from a different mirror if you suspect a server error. If you continuously receive an erroneous file from a server, please be kind and notify the webmaster of that mirror so they can investigate the issue.
MD5SUM on Mac OS X
Follow the instructions for linux MD5SUM on Linux, except use the command "md5" instead of "md5sum".
digest(1) on Solaris
Use the Solaris digest(1) command, specifying the md5 algorithm with the -a flag. For instance:
$ digest -a md5 ubuntu-6.10-server-sparc.iso 4971edddbfc667e0effbc0f6b4f7e7e0
MD5SUM on Windows
Windows does not come with md5sum. You must download one from another location, preferably one that you trust. There are command line utilities (md5sum.exe
) that work similarly to the Unix utility; one public domain version with source is available from Fourmilab, but the version available from Cygwin is probably easier to install and update, and Cygwin is also recommended and trusted as the source for many more Unixy utilities. Once installed, Cygwin's md5sum behaves exactly as described in MD5SUM on Linux above.
There are also graphical tools such as the one used in the walk-through provided below.
- Download and install winMD5Sum, a free and open source hash verification program.
- Right-click the ISO file.
- Click Send To, then `winMD5Sum`.
- Wait for `winMD5Sum` to load and finish the checksum (this may take a significant amount of time depending on your computer's performance).
- Copy the corresponding hash from UbuntuHashes into the bottom text box.
- Click "Compare"
- A message box will say "MD5 Check Sums are the same" if the hashes are equal.
MD5SUM on CD
To see if your Ubuntu CD was corrupted when burned to the disk, see the UbuntuHelp:CDIntegrityCheck page, or follow the instructions below.
First mount the CD, if not already mounted:
sudo mount /dev/hda /cdrom
Then use the supplied md5sum file on the CD:
cd /cdrom md5sum -c md5sum.txt | grep -v 'OK$'
If the command outputs any errors, you'll know that either the burn was bad or the .iso is corrupt. Please note that this method does not verify authenticity unless the hash of the iso file is compared to the hash at the secure UbuntuHashes page.
External Links
Outstanding Issues
- Something with respect to the MD5SUMS.gpg file should be added or linked to herein.