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

来自Ubuntu中文
跳到导航跳到搜索
Liwey留言 | 贡献
无编辑摘要
Liwey留言 | 贡献
无编辑摘要
第8行: 第8行:
配置文件 <code><nowiki>/etc/fstab</nowiki></code> 包含了 ''挂载'' 磁盘的必需信息。该文件系统启动时开始读入,并且仅能被 [[UbuntuHelp:RootSudo|root]] 用户修改。
配置文件 <code><nowiki>/etc/fstab</nowiki></code> 包含了 ''挂载'' 磁盘的必需信息。该文件系统启动时开始读入,并且仅能被 [[UbuntuHelp:RootSudo|root]] 用户修改。


== Content of file ==
== 文件内容 ==


It is possible to visualize this file with the following command:
要想看该文件可以用下面的命令:
<pre>cat /etc/fstab</pre>  
<pre>cat /etc/fstab</pre>  
or alt-f2 and enter:
或者 按下alt-f2 并输入:
<pre>gksu gedit /etc/fstab</pre>  
<pre>gksu gedit /etc/fstab</pre>  
The result of the previous command will be similar to following:
上面命令的输出结果与下面的内容相似:
<pre># /etc/fstab: static file system information.
<pre># /etc/fstab: static file system information.
#
#
第35行: 第35行:
/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
</pre>  
</pre>  
Each no-commented line is composed by six fields:
每一非注释行都由六个字段组成:


{| cellspacing="0" border="1"
{| cellspacing="0" border="1"
|-
|-
| '''fields'''
| '''字段'''
| '''description'''
| '''说明'''
|-
|-
| file system
| file system
| it indicates the devices that contain a file system
| 指出设备的文件系统
|-
|-
| mount point
| 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)
| 指出文件夹(或挂载点),从其中来访问设备中的内容(对于swap并不需要挂载点)
|-
|-
| type
| type
| type of file system
| 文件系统类型
|-
|-
| options
| options
| options of access to device (the command "mount")
| 设备访问选项("mount"命令)
|-
|-
| dump
| dump
| turn ON/OFF the backup of file system (the command "dump"). This option is <u>obsolete</u>.
| 启用或关闭(ON/OFF)文件系统备份("dump"命令。该选项<u>已废弃</u>
|-
|-
| pass
| pass
| turn ON/OFF the control of coherence of the disc (the command "fsck")
| &nbsp;启用或关闭(ON/OFF)磁盘一致性的控制("fsck"命令)
|}
|}


To get a list of all the UUID's use this command:
要获取所用的UUID的使用列表,使用命令:
<pre>ls -l /dev/disk/by-uuid
<pre>ls -l /dev/disk/by-uuid
</pre>  
</pre>
 
== Other resources ==
== Other resources ==



2008年3月26日 (三) 10:37的版本

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

简介

配置文件 /etc/fstab 包含了 挂载 磁盘的必需信息。该文件系统启动时开始读入,并且仅能被 root 用户修改。

文件内容

要想看该文件可以用下面的命令:

cat /etc/fstab

或者 按下alt-f2 并输入:

gksu gedit /etc/fstab

上面命令的输出结果与下面的内容相似:

# /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

每一非注释行都由六个字段组成:

字段 说明
file system 指出设备的文件系统
mount point 指出文件夹(或挂载点),从其中来访问设备中的内容(对于swap并不需要挂载点)
type 文件系统类型
options 设备访问选项(见"mount"命令)
dump 启用或关闭(ON/OFF)文件系统备份(见"dump"命令。该选项已废弃
pass  启用或关闭(ON/OFF)磁盘一致性的控制(见"fsck"命令)

要获取所用的UUID的使用列表,使用命令:

ls -l /dev/disk/by-uuid

Other resources