特殊:Badtitle/NS100:MountingWindowsPartitions:修订间差异
小无编辑摘要 |
小无编辑摘要 |
||
第1行: | 第1行: | ||
{{From|https://help.ubuntu.com/community/MountingWindowsPartitions}} | {{From|https://help.ubuntu.com/community/MountingWindowsPartitions}} | ||
{{Languages|UbuntuHelp:MountingWindowsPartitions}} | {{Languages|UbuntuHelp:MountingWindowsPartitions}} | ||
https://help.ubuntu.com/community/IconsPage?action=AttachFile&do=get&target=IconSambaShares.png Ubuntu is capable of reading and writing files stored on Windows formatted partitions. These partitions are normally formatted with NTFS, but are sometimes formatted with FAT32. You will also see FAT16 on other devices. | |||
== File System Differences == | == File System Differences == | ||
https://help.ubuntu.com/community/IconsPage?action=AttachFile&do=get&target=info.png For a more in depth analysis, see [[UbuntuHelp:LinuxFilesystemsExplained|LinuxFilesystemsExplained]], but here are some basics: | |||
* Windows Vista, XP, 2000, older NT systems, and Windows Server 2003 and 2008 are formatted with NTFS. | * Windows Vista, XP, 2000, older NT systems, and Windows Server 2003 and 2008 are formatted with NTFS. | ||
* Older versions of Windows like Windows ME, 98, and 95 are formatted with FAT32. | * Older versions of Windows like Windows ME, 98, and 95 are formatted with FAT32. | ||
第12行: | 第12行: | ||
== Using Windows File Systems == | == Using Windows File Systems == | ||
=== For NTFS Partitions === | === For NTFS Partitions === | ||
https://help.ubuntu.com/community/IconsPage?action=AttachFile&do=get&target=IconDisks.png The '''ntfs-3g''' driver is used in linux to read and write NTFS partitions. Since using it varies between Ubuntu releases, there is a separate page explaining how to use '''ntfs-3g''' in your release version. Please see [[UbuntuHelp:MountingWindowsPartitions/ThirdPartyNTFS3G|MountingWindowsPartitions/ThirdPartyNTFS3G]]. | |||
=== For FAT32 and FAT16 Partitions === | === For FAT32 and FAT16 Partitions === | ||
The '''vfat''' driver is used in linux to read and write FAT32 and FAT16 partitions. | The '''vfat''' driver is used in linux to read and write FAT32 and FAT16 partitions. | ||
https://help.ubuntu.com/community/IconsPage?action=AttachFile&do=get&target=terminal.png To mount a FAT partition from terminal, first locate the device you want to mount using the <code><nowiki>fdisk</nowiki></code> command above, create the mount point, then use the <code><nowiki>mount</nowiki></code> command. | |||
==== Generic Template ==== | ==== Generic Template ==== | ||
https://help.ubuntu.com/community/IconsPage?action=AttachFile&do=get&target=example.png Here is the format for mounting a FAT formatted device: | |||
<pre><nowiki> | <pre><nowiki> | ||
sudo mkdir <mount_point> | sudo mkdir <mount_point> | ||
sudo mount -t vfat -o defaults,user,exec,uid=1000,gid=100,umask=000 <device> <mount_point></nowiki></pre> | sudo mount -t vfat -o defaults,user,exec,uid=1000,gid=100,umask=000 <device> <mount_point></nowiki></pre> | ||
==== Solid Example ==== | ==== Solid Example ==== | ||
https://help.ubuntu.com/community/IconsPage?action=AttachFile&do=get&target=IconExample48.png Let's say that using the <code><nowiki>fdisk</nowiki></code> command reveals that you want to mount '''/dev/sdb1''' - run: | |||
<pre><nowiki> | <pre><nowiki> | ||
sudo mkdir /media/fat_partition | sudo mkdir /media/fat_partition | ||
sudo mount -t vfat -o defaults,user,exec,uid=1000,gid=100,umask=000 /dev/sdb1 /media/fat_partition</nowiki></pre> | sudo mount -t vfat -o defaults,user,exec,uid=1000,gid=100,umask=000 /dev/sdb1 /media/fat_partition</nowiki></pre> | ||
=== Mounting at Boot === | === Mounting at Boot === | ||
https://help.ubuntu.com/community/IconsPage?action=AttachFile&do=get&target=IconComputer.png To mount a partition automatically at boot time, you will need to add an entry to <code><nowiki>/etc/fstab</nowiki></code> - for more information on that, see [[UbuntuHelp:Fstab|Fstab]]. For an example of adding a FAT partition, see '''Section 2.1: "More Examples of Entries"''' on that page. The first example there uses the same options as above, and tends to work best for most users. That page has information on '''Editing fstab''', so you just want to add a new line for your FAT partition if an entry does not already exist. | |||
Don't forget to mount all the entries in <code><nowiki>/etc/fstab</nowiki></code> after you edit the file, save and close it. This can be achieved simply by running: | Don't forget to mount all the entries in <code><nowiki>/etc/fstab</nowiki></code> after you edit the file, save and close it. This can be achieved simply by running: | ||
<pre><nowiki> | <pre><nowiki> | ||
sudo mount -a</nowiki></pre> | sudo mount -a</nowiki></pre> | ||
== Other Resources == | == Other Resources == | ||
https://help.ubuntu.com/community/IconsPage?action=AttachFile&do=get&target=IconBook-small.png | |||
* [[UbuntuHelp:MountingWindowsPartitions/ThirdPartyNTFS3G]] | * [[UbuntuHelp:MountingWindowsPartitions/ThirdPartyNTFS3G|MountingWindowsPartitions/ThirdPartyNTFS3G]] | ||
* [[UbuntuHelp:Fstab]] | * [[UbuntuHelp:Fstab|Fstab]] | ||
* [[UbuntuHelp:LinuxFilesystemsExplained]] | * [[UbuntuHelp:LinuxFilesystemsExplained|LinuxFilesystemsExplained]] | ||
* [http://ubuntuforums.org/showthread.php?t=283131 How to fstab] | * [http://ubuntuforums.org/showthread.php?t=283131 How to fstab] | ||
---- | ---- |
2008年10月19日 (日) 23:52的版本
文章出处: |
{{#if: | {{{2}}} | https://help.ubuntu.com/community/MountingWindowsPartitions }} |
点击翻译: |
English {{#ifexist: {{#if: UbuntuHelp:MountingWindowsPartitions | UbuntuHelp:MountingWindowsPartitions | {{#if: | :}}MountingWindowsPartitions}}/af | • {{#if: UbuntuHelp:MountingWindowsPartitions|Afrikaans| [[::MountingWindowsPartitions/af|Afrikaans]]}}|}} {{#ifexist: {{#if: UbuntuHelp:MountingWindowsPartitions | UbuntuHelp:MountingWindowsPartitions | {{#if: | :}}MountingWindowsPartitions}}/ar | • {{#if: UbuntuHelp:MountingWindowsPartitions|العربية| [[::MountingWindowsPartitions/ar|العربية]]}}|}} {{#ifexist: {{#if: UbuntuHelp:MountingWindowsPartitions | UbuntuHelp:MountingWindowsPartitions | {{#if: | :}}MountingWindowsPartitions}}/az | • {{#if: UbuntuHelp:MountingWindowsPartitions|azərbaycanca| [[::MountingWindowsPartitions/az|azərbaycanca]]}}|}} {{#ifexist: {{#if: UbuntuHelp:MountingWindowsPartitions | UbuntuHelp:MountingWindowsPartitions | {{#if: | :}}MountingWindowsPartitions}}/bcc | • {{#if: UbuntuHelp:MountingWindowsPartitions|جهلسری بلوچی| [[::MountingWindowsPartitions/bcc|جهلسری بلوچی]]}}|}} {{#ifexist: {{#if: UbuntuHelp:MountingWindowsPartitions | UbuntuHelp:MountingWindowsPartitions | {{#if: | :}}MountingWindowsPartitions}}/bg | • {{#if: UbuntuHelp:MountingWindowsPartitions|български| [[::MountingWindowsPartitions/bg|български]]}}|}} {{#ifexist: {{#if: UbuntuHelp:MountingWindowsPartitions | UbuntuHelp:MountingWindowsPartitions | {{#if: | :}}MountingWindowsPartitions}}/br | • {{#if: UbuntuHelp:MountingWindowsPartitions|brezhoneg| [[::MountingWindowsPartitions/br|brezhoneg]]}}|}} {{#ifexist: {{#if: UbuntuHelp:MountingWindowsPartitions | UbuntuHelp:MountingWindowsPartitions | {{#if: | :}}MountingWindowsPartitions}}/ca | • {{#if: UbuntuHelp:MountingWindowsPartitions|català| [[::MountingWindowsPartitions/ca|català]]}}|}} {{#ifexist: {{#if: UbuntuHelp:MountingWindowsPartitions | UbuntuHelp:MountingWindowsPartitions | {{#if: | :}}MountingWindowsPartitions}}/cs | • {{#if: UbuntuHelp:MountingWindowsPartitions|čeština| [[::MountingWindowsPartitions/cs|čeština]]}}|}} {{#ifexist: {{#if: UbuntuHelp:MountingWindowsPartitions | UbuntuHelp:MountingWindowsPartitions | {{#if: | :}}MountingWindowsPartitions}}/de | • {{#if: UbuntuHelp:MountingWindowsPartitions|Deutsch| [[::MountingWindowsPartitions/de|Deutsch]]}}|}} {{#ifexist: {{#if: UbuntuHelp:MountingWindowsPartitions | UbuntuHelp:MountingWindowsPartitions | {{#if: | :}}MountingWindowsPartitions}}/el | • {{#if: UbuntuHelp:MountingWindowsPartitions|Ελληνικά| [[::MountingWindowsPartitions/el|Ελληνικά]]}}|}} {{#ifexist: {{#if: UbuntuHelp:MountingWindowsPartitions | UbuntuHelp:MountingWindowsPartitions | {{#if: | :}}MountingWindowsPartitions}}/es | • {{#if: UbuntuHelp:MountingWindowsPartitions|español| [[::MountingWindowsPartitions/es|español]]}}|}} {{#ifexist: {{#if: UbuntuHelp:MountingWindowsPartitions | UbuntuHelp:MountingWindowsPartitions | {{#if: | :}}MountingWindowsPartitions}}/fa | • {{#if: UbuntuHelp:MountingWindowsPartitions|فارسی| [[::MountingWindowsPartitions/fa|فارسی]]}}|}} {{#ifexist: {{#if: UbuntuHelp:MountingWindowsPartitions | UbuntuHelp:MountingWindowsPartitions | {{#if: | :}}MountingWindowsPartitions}}/fi | • {{#if: UbuntuHelp:MountingWindowsPartitions|suomi| [[::MountingWindowsPartitions/fi|suomi]]}}|}} {{#ifexist: {{#if: UbuntuHelp:MountingWindowsPartitions | UbuntuHelp:MountingWindowsPartitions | {{#if: | :}}MountingWindowsPartitions}}/fr | • {{#if: UbuntuHelp:MountingWindowsPartitions|français| [[::MountingWindowsPartitions/fr|français]]}}|}} {{#ifexist: {{#if: UbuntuHelp:MountingWindowsPartitions | UbuntuHelp:MountingWindowsPartitions | {{#if: | :}}MountingWindowsPartitions}}/gu | • {{#if: UbuntuHelp:MountingWindowsPartitions|ગુજરાતી| [[::MountingWindowsPartitions/gu|ગુજરાતી]]}}|}} {{#ifexist: {{#if: UbuntuHelp:MountingWindowsPartitions | UbuntuHelp:MountingWindowsPartitions | {{#if: | :}}MountingWindowsPartitions}}/he | • {{#if: UbuntuHelp:MountingWindowsPartitions|עברית| [[::MountingWindowsPartitions/he|עברית]]}}|}} {{#ifexist: {{#if: UbuntuHelp:MountingWindowsPartitions | UbuntuHelp:MountingWindowsPartitions | {{#if: | :}}MountingWindowsPartitions}}/hu | • {{#if: UbuntuHelp:MountingWindowsPartitions|magyar| [[::MountingWindowsPartitions/hu|magyar]]}}|}} {{#ifexist: {{#if: UbuntuHelp:MountingWindowsPartitions | UbuntuHelp:MountingWindowsPartitions | {{#if: | :}}MountingWindowsPartitions}}/id | • {{#if: UbuntuHelp:MountingWindowsPartitions|Bahasa Indonesia| [[::MountingWindowsPartitions/id|Bahasa Indonesia]]}}|}} {{#ifexist: {{#if: UbuntuHelp:MountingWindowsPartitions | UbuntuHelp:MountingWindowsPartitions | {{#if: | :}}MountingWindowsPartitions}}/it | • {{#if: UbuntuHelp:MountingWindowsPartitions|italiano| [[::MountingWindowsPartitions/it|italiano]]}}|}} {{#ifexist: {{#if: UbuntuHelp:MountingWindowsPartitions | UbuntuHelp:MountingWindowsPartitions | {{#if: | :}}MountingWindowsPartitions}}/ja | • {{#if: UbuntuHelp:MountingWindowsPartitions|日本語| [[::MountingWindowsPartitions/ja|日本語]]}}|}} {{#ifexist: {{#if: UbuntuHelp:MountingWindowsPartitions | UbuntuHelp:MountingWindowsPartitions | {{#if: | :}}MountingWindowsPartitions}}/ko | • {{#if: UbuntuHelp:MountingWindowsPartitions|한국어| [[::MountingWindowsPartitions/ko|한국어]]}}|}} {{#ifexist: {{#if: UbuntuHelp:MountingWindowsPartitions | UbuntuHelp:MountingWindowsPartitions | {{#if: | :}}MountingWindowsPartitions}}/ksh | • {{#if: UbuntuHelp:MountingWindowsPartitions|Ripoarisch| [[::MountingWindowsPartitions/ksh|Ripoarisch]]}}|}} {{#ifexist: {{#if: UbuntuHelp:MountingWindowsPartitions | UbuntuHelp:MountingWindowsPartitions | {{#if: | :}}MountingWindowsPartitions}}/mr | • {{#if: UbuntuHelp:MountingWindowsPartitions|मराठी| [[::MountingWindowsPartitions/mr|मराठी]]}}|}} {{#ifexist: {{#if: UbuntuHelp:MountingWindowsPartitions | UbuntuHelp:MountingWindowsPartitions | {{#if: | :}}MountingWindowsPartitions}}/ms | • {{#if: UbuntuHelp:MountingWindowsPartitions|Bahasa Melayu| [[::MountingWindowsPartitions/ms|Bahasa Melayu]]}}|}} {{#ifexist: {{#if: UbuntuHelp:MountingWindowsPartitions | UbuntuHelp:MountingWindowsPartitions | {{#if: | :}}MountingWindowsPartitions}}/nl | • {{#if: UbuntuHelp:MountingWindowsPartitions|Nederlands| [[::MountingWindowsPartitions/nl|Nederlands]]}}|}} {{#ifexist: {{#if: UbuntuHelp:MountingWindowsPartitions | UbuntuHelp:MountingWindowsPartitions | {{#if: | :}}MountingWindowsPartitions}}/no | • {{#if: UbuntuHelp:MountingWindowsPartitions|norsk| [[::MountingWindowsPartitions/no|norsk]]}}|}} {{#ifexist: {{#if: UbuntuHelp:MountingWindowsPartitions | UbuntuHelp:MountingWindowsPartitions | {{#if: | :}}MountingWindowsPartitions}}/oc | • {{#if: UbuntuHelp:MountingWindowsPartitions|occitan| [[::MountingWindowsPartitions/oc|occitan]]}}|}} {{#ifexist: {{#if: UbuntuHelp:MountingWindowsPartitions | UbuntuHelp:MountingWindowsPartitions | {{#if: | :}}MountingWindowsPartitions}}/pl | • {{#if: UbuntuHelp:MountingWindowsPartitions|polski| [[::MountingWindowsPartitions/pl|polski]]}}|}} {{#ifexist: {{#if: UbuntuHelp:MountingWindowsPartitions | UbuntuHelp:MountingWindowsPartitions | {{#if: | :}}MountingWindowsPartitions}}/pt | • {{#if: UbuntuHelp:MountingWindowsPartitions|português| [[::MountingWindowsPartitions/pt|português]]}}|}} {{#ifexist: {{#if: UbuntuHelp:MountingWindowsPartitions | UbuntuHelp:MountingWindowsPartitions | {{#if: | :}}MountingWindowsPartitions}}/ro | • {{#if: UbuntuHelp:MountingWindowsPartitions|română| [[::MountingWindowsPartitions/ro|română]]}}|}} {{#ifexist: {{#if: UbuntuHelp:MountingWindowsPartitions | UbuntuHelp:MountingWindowsPartitions | {{#if: | :}}MountingWindowsPartitions}}/ru | • {{#if: UbuntuHelp:MountingWindowsPartitions|русский| [[::MountingWindowsPartitions/ru|русский]]}}|}} {{#ifexist: {{#if: UbuntuHelp:MountingWindowsPartitions | UbuntuHelp:MountingWindowsPartitions | {{#if: | :}}MountingWindowsPartitions}}/si | • {{#if: UbuntuHelp:MountingWindowsPartitions|සිංහල| [[::MountingWindowsPartitions/si|සිංහල]]}}|}} {{#ifexist: {{#if: UbuntuHelp:MountingWindowsPartitions | UbuntuHelp:MountingWindowsPartitions | {{#if: | :}}MountingWindowsPartitions}}/sq | • {{#if: UbuntuHelp:MountingWindowsPartitions|shqip| [[::MountingWindowsPartitions/sq|shqip]]}}|}} {{#ifexist: {{#if: UbuntuHelp:MountingWindowsPartitions | UbuntuHelp:MountingWindowsPartitions | {{#if: | :}}MountingWindowsPartitions}}/sr | • {{#if: UbuntuHelp:MountingWindowsPartitions|српски / srpski| [[::MountingWindowsPartitions/sr|српски / srpski]]}}|}} {{#ifexist: {{#if: UbuntuHelp:MountingWindowsPartitions | UbuntuHelp:MountingWindowsPartitions | {{#if: | :}}MountingWindowsPartitions}}/sv | • {{#if: UbuntuHelp:MountingWindowsPartitions|svenska| [[::MountingWindowsPartitions/sv|svenska]]}}|}} {{#ifexist: {{#if: UbuntuHelp:MountingWindowsPartitions | UbuntuHelp:MountingWindowsPartitions | {{#if: | :}}MountingWindowsPartitions}}/th | • {{#if: UbuntuHelp:MountingWindowsPartitions|ไทย| [[::MountingWindowsPartitions/th|ไทย]]}}|}} {{#ifexist: {{#if: UbuntuHelp:MountingWindowsPartitions | UbuntuHelp:MountingWindowsPartitions | {{#if: | :}}MountingWindowsPartitions}}/tr | • {{#if: UbuntuHelp:MountingWindowsPartitions|Türkçe| [[::MountingWindowsPartitions/tr|Türkçe]]}}|}} {{#ifexist: {{#if: UbuntuHelp:MountingWindowsPartitions | UbuntuHelp:MountingWindowsPartitions | {{#if: | :}}MountingWindowsPartitions}}/vi | • {{#if: UbuntuHelp:MountingWindowsPartitions|Tiếng Việt| [[::MountingWindowsPartitions/vi|Tiếng Việt]]}}|}} {{#ifexist: {{#if: UbuntuHelp:MountingWindowsPartitions | UbuntuHelp:MountingWindowsPartitions | {{#if: | :}}MountingWindowsPartitions}}/yue | • {{#if: UbuntuHelp:MountingWindowsPartitions|粵語| [[::MountingWindowsPartitions/yue|粵語]]}}|}} {{#ifexist: {{#if: UbuntuHelp:MountingWindowsPartitions | UbuntuHelp:MountingWindowsPartitions | {{#if: | :}}MountingWindowsPartitions}}/zh | • {{#if: UbuntuHelp:MountingWindowsPartitions|中文| [[::MountingWindowsPartitions/zh|中文]]}}|}} {{#ifexist: {{#if: UbuntuHelp:MountingWindowsPartitions | UbuntuHelp:MountingWindowsPartitions | {{#if: | :}}MountingWindowsPartitions}}/zh-hans | • {{#if: UbuntuHelp:MountingWindowsPartitions|中文(简体)| [[::MountingWindowsPartitions/zh-hans|中文(简体)]]}}|}} {{#ifexist: {{#if: UbuntuHelp:MountingWindowsPartitions | UbuntuHelp:MountingWindowsPartitions | {{#if: | :}}MountingWindowsPartitions}}/zh-hant | • {{#if: UbuntuHelp:MountingWindowsPartitions|中文(繁體)| [[::MountingWindowsPartitions/zh-hant|中文(繁體)]]}}|}} |
{{#ifeq:UbuntuHelp:MountingWindowsPartitions|:MountingWindowsPartitions|请不要直接编辑翻译本页,本页将定期与来源同步。}} |
{{#ifexist: :MountingWindowsPartitions/zh | | {{#ifexist: MountingWindowsPartitions/zh | | {{#ifeq: {{#titleparts:MountingWindowsPartitions|1|-1|}} | zh | | }} }} }} {{#ifeq: {{#titleparts:MountingWindowsPartitions|1|-1|}} | zh | | }}
Ubuntu is capable of reading and writing files stored on Windows formatted partitions. These partitions are normally formatted with NTFS, but are sometimes formatted with FAT32. You will also see FAT16 on other devices.
File System Differences
For a more in depth analysis, see LinuxFilesystemsExplained, but here are some basics:
- Windows Vista, XP, 2000, older NT systems, and Windows Server 2003 and 2008 are formatted with NTFS.
- Older versions of Windows like Windows ME, 98, and 95 are formatted with FAT32.
- Flash drives, like your USB thumb drive or your camera's flash card are typically formatted as FAT16.
In Windows, you can check what your partition is formatted as by right-clicking the partition in Windows Explorer and selecting Properties. In Ubuntu, run from terminal:
sudo fdisk -l
Using Windows File Systems
For NTFS Partitions
The ntfs-3g driver is used in linux to read and write NTFS partitions. Since using it varies between Ubuntu releases, there is a separate page explaining how to use ntfs-3g in your release version. Please see MountingWindowsPartitions/ThirdPartyNTFS3G.
For FAT32 and FAT16 Partitions
The vfat driver is used in linux to read and write FAT32 and FAT16 partitions.
To mount a FAT partition from terminal, first locate the device you want to mount using the fdisk
command above, create the mount point, then use the mount
command.
Generic Template
Here is the format for mounting a FAT formatted device:
sudo mkdir <mount_point> sudo mount -t vfat -o defaults,user,exec,uid=1000,gid=100,umask=000 <device> <mount_point>
Solid Example
Let's say that using the fdisk
command reveals that you want to mount /dev/sdb1 - run:
sudo mkdir /media/fat_partition sudo mount -t vfat -o defaults,user,exec,uid=1000,gid=100,umask=000 /dev/sdb1 /media/fat_partition
Mounting at Boot
To mount a partition automatically at boot time, you will need to add an entry to /etc/fstab
- for more information on that, see Fstab. For an example of adding a FAT partition, see Section 2.1: "More Examples of Entries" on that page. The first example there uses the same options as above, and tends to work best for most users. That page has information on Editing fstab, so you just want to add a new line for your FAT partition if an entry does not already exist.
Don't forget to mount all the entries in /etc/fstab
after you edit the file, save and close it. This can be achieved simply by running:
sudo mount -a
Other Resources