特殊:Badtitle/NS100:Fstab:修订间差异

来自Ubuntu中文
跳到导航跳到搜索
Wikibot留言 | 贡献
新页面: {{From|https://help.ubuntu.com/community/Fstab}} {{Languages|UbuntuHelp:Fstab}} == Introduction == The configuration file <code><nowiki>/etc/fstab</nowiki></code> contains the necessary i...
 
Wikibot留言 | 贡献
无编辑摘要
第3行: 第3行:
== Introduction ==
== Introduction ==
The configuration file <code><nowiki>/etc/fstab</nowiki></code> contains the necessary information to ''mount'' the disk. This file comes read at the start of the system and can be modified only by [[UbuntuHelp:RootSudo|root]] user.
The configuration file <code><nowiki>/etc/fstab</nowiki></code> contains the necessary information to ''mount'' the disk. This file comes read at the start of the system and can be modified only by [[UbuntuHelp:RootSudo|root]] user.
== Content of file ==
== Content of file ==
It is possible to visualize this file with the following command:
It is possible to visualize this file with the following command:
<pre><nowiki>
<pre><nowiki>
cat /etc/fstab </nowiki></pre>
cat /etc/fstab </nowiki></pre>
or alt-f2 and enter:
or alt-f2 and enter:
<pre><nowiki>
<pre><nowiki>
gksu gedit /etc/fstab </nowiki></pre>
gksu gedit /etc/fstab </nowiki></pre>
The result of the previous command will be similar to following:
The result of the previous command will be similar to following:
<pre><nowiki>
<pre><nowiki>
第20行: 第15行:
#
#
# <file system> <mount point>  <type>  <options>      <dump>  <pass>
# <file system> <mount point>  <type>  <options>      <dump>  <pass>
proc /proc proc defaults 0 0
proc /proc proc defaults 0 0
# /dev/hda1
# /dev/hda1
UUID=12102C02102CEB83 /media/windows  ntfs      silent,umask=0,locale=it_IT.utf8        0      0
UUID=12102C02102CEB83 /media/windows  ntfs      silent,umask=0,locale=it_IT.utf8        0      0
# /dev/hda2
# /dev/hda2
UUID=cee15eca-5b2e-48ad-9735-eae5ac14bc90 none swap sw 0 0
UUID=cee15eca-5b2e-48ad-9735-eae5ac14bc90 none swap sw 0 0
# /dev/hda3
# /dev/hda3
UUID=98E0-6D24 /media/dati vfat defaults,utf8,umask=007,uid=0,gid=46,auto,rw,nouser 0 0
UUID=98E0-6D24 /media/dati vfat defaults,utf8,umask=007,uid=0,gid=46,auto,rw,nouser 0 0
# /dev/hda4
# /dev/hda4
UUID=0aa86c61-0df9-4f1a-8b0b-34abbee6b769 / ext3 nouser,defaults,errors=remount-ro,atime,auto,rw,dev,exec,suid 0 0
UUID=0aa86c61-0df9-4f1a-8b0b-34abbee6b769 / ext3 nouser,defaults,errors=remount-ro,atime,auto,rw,dev,exec,suid 0 0
/dev/hdc /media/cdrom0 udf,iso9660 user,atime,noauto,rw,dev,exec,suid 0 0
/dev/hdc /media/cdrom0 udf,iso9660 user,atime,noauto,rw,dev,exec,suid 0 0
</nowiki></pre>
</nowiki></pre>
Each no-commented line is composed by six fields:
Each no-commented line is composed by six fields:
{|border="1" cellspacing="0"
{|border="1" cellspacing="0"
|'''fields''' ||'''description'''  
|'''fields''' ||'''description'''  
第55行: 第42行:
| pass || turn ON/OFF the control of coherence of the disc (the command "fsck")  
| pass || turn ON/OFF the control of coherence of the disc (the command "fsck")  
|}
|}
To get a list of all the UUID's use this command:
To get a list of all the UUID's use this command:
<pre><nowiki>
<pre><nowiki>
ls -l /dev/disk/by-uuid
ls -l /dev/disk/by-uuid
</nowiki></pre>
</nowiki></pre>
== Other resources ==
== Other resources ==
* [[UbuntuHelp:UsingUUID|UUID]]
* [[UbuntuHelp:UsingUUID|UUID]]

2007年11月30日 (五) 17:22的版本

{{#ifexist: :Fstab/zh | | {{#ifexist: Fstab/zh | | {{#ifeq: {{#titleparts:Fstab|1|-1|}} | zh | | }} }} }} {{#ifeq: {{#titleparts:Fstab|1|-1|}} | zh | | }}

Introduction

The configuration file /etc/fstab contains the necessary information to mount the disk. This file comes read at the start of the system and can be modified only by root user.

Content of file

It is possible to visualize this file with the following command:

cat /etc/fstab 

or alt-f2 and enter:

gksu gedit /etc/fstab 

The result of the previous command will be similar to following:

# /etc/fstab: static file system information.
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
proc /proc proc defaults 0 0
# /dev/hda1
UUID=12102C02102CEB83 /media/windows  ntfs      silent,umask=0,locale=it_IT.utf8        0       0
# /dev/hda2
UUID=cee15eca-5b2e-48ad-9735-eae5ac14bc90 none swap sw 0 0
# /dev/hda3
UUID=98E0-6D24 /media/dati vfat defaults,utf8,umask=007,uid=0,gid=46,auto,rw,nouser 0 0
# /dev/hda4
UUID=0aa86c61-0df9-4f1a-8b0b-34abbee6b769 / ext3 nouser,defaults,errors=remount-ro,atime,auto,rw,dev,exec,suid 0 0
/dev/hdc /media/cdrom0 udf,iso9660 user,atime,noauto,rw,dev,exec,suid 0 0

Each no-commented line is composed by six fields:

fields description
file system it indicates the devices that contain a file system
mount point it indicates the directory (or mount point) from which it will be possible to approach the content of the device (for the swap is not demanded the mount point)
type type of file system
options options of access to device (the command "mount")
dump turn ON/OFF the backup of file system (the command "dump"). This option is obsolete.
pass turn ON/OFF the control of coherence of the disc (the command "fsck")

To get a list of all the UUID's use this command:

ls -l /dev/disk/by-uuid

Other resources