读书人

mount 下令小记

发布时间: 2012-07-24 17:47:57 作者: rapoo

mount 命令小记

Linux通过分区来管理文件,在安装系统的时候建议把/home/目录单独mount到一个分区,这样下次重装系统的时候会方便很多。

?

例如:

mount /etc/sda5? /home

mount /etc/sda6? /work

?

mount不会在开机自动运行,可以通过配置实现文件系统的自动挂载。

在/etc目录下有个fstab文件,它里面列出了linux开机时自动挂载的文件系统的列表

?

# /etc/fstab: static file system information.## Use 'blkid' to print the universally unique identifier for a# device; this may be used with UUID= as a more robust way to name devices# that works even if disks are added and removed. See fstab(5).## <file system> <mount point>   <type>  <options>       <dump>  <pass>proc            /proc           proc    nodev,noexec,nosuid 0       0# / was on /dev/sda1 during installationUUID=195f527d-dcc0-4773-b461-18f1bdff0a58 /               ext4    errors=remount-ro 0       1# swap was on /dev/sda3 during installationUUID=f36148f5-9239-402e-9696-36affd85fe17 none            swap    sw              0       0
?

添加一行:

/dev/sda5?????? /duitang??????? ext4??? defaults??? 0?? 0

?

修改之后立即生效:

mount -a

?

卸载mount

umount /mnt/usb

读书人网 >操作系统

热点推荐