Redhat linux 挂载命令mount
命令格式:
mount [-t vfstype] [-o options] device dir
其中:
1.-t vfstype 指定文件系统的类型,通常不必指定。mount 会自动选择正确的类型。常用类型有:
光盘或光盘镜像:iso9660
DOS fat16文件系统:msdos
Windows 9x fat32文件系统:vfat
Windows NT ntfs文件系统:ntfs
Mount Windows文件网络共享:smbfs
UNIX(LINUX) 文件网络共享:nfs
2.-o options 主要用来描述设备或档案的挂接方式。常用的参数有:
loop:用来把一个文件当成硬盘分区挂接上系统
ro:采用只读方式挂接设备
rw:采用读写方式挂接设备
iocharset:指定访问文件系统所用字符集
3.device 要挂接(mount)的设备。
4.dir设备在系统上的挂接点(mount point)。
1、光盘挂载
标注:光盘自动挂载到默认路径 /media 目录下
假如想制作光盘挂载点进行下面操作:
将当前光驱里的光盘制作成光盘镜像文件/home/mydisk.iso
#cp /media /home/mydisk.iso
建立一个目录用来作挂载点,一般默认挂载点在/mnt 目录下建立
#mkdir /mnt/dvd
制作的mydisk.iso进行挂载
#mount -o loop -t iso9660 /home/mydisk.iso /mnt/dvd
取消挂载
#umount /mnt/dvd
2、挂载U盘(U盘有两种文件格式NTFS和FAT32)
使用 fdisk -l 查看系统硬盘和U盘分区情况 (会对U盘FAT32挂载)
[root at pldyrouter root]# fdisk -l
Disk /dev/sda: 73 dot 4 GB, 73407820800 bytes
255 heads, 63 sectors/track, 8924 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sda1 1 4 32098+ de Dell Utility
/dev/sda2 * 5 2554 20482875 7 HPFS/NTFS
/dev/sda3 2555 7904 42973875 83 Linux
/dev/sda4 7905 8924 8193150 f Win95 Ext'd (LBA)
/dev/sda5 7905 8924 8193118+ 82 Linux swap
Disk /dev/sdd: 131 MB, 131072000 bytes
9 heads, 32 sectors/track, 888 cylinders
Units = cylinders of 288 * 512 = 147456 bytes
Device Boot Start End Blocks Id System
/dev/sdd1 * 1 889 127983+ b Win95 FAT32
Partition 1 has different physical/logical endings:
phys=(1000, 8, 32) logical=(888, 7, 31)
建立一个目录用来作挂载点,一般默认挂载点在/mnt 目录下建立
#mkdir /mnt/usb
使用mount进行U盘挂载
#mount -t vfat /dev/sdd1 /mnt/usb
若汉字文件名显示为乱码或不显示,可以使用下面的命令
#mount -t vfat -o iocharset=cp936 /dev/sdd1 /mnt/usb
取消挂载
#umount /mnt/usb
使用 fdisk -l 查看系统硬盘和U盘分区情况 (会对U盘NTFS挂载)
[root@sstisystem ~]# fdisk -l
Disk /dev/sda: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x09cb47e4
Device Boot Start End Blocks Id System
/dev/sda1 * 1 128 1024000 83 Linux
Partition 1 does not end on cylinder boundary.
/dev/sda2 128 25625 204800000 83 Linux
/dev/sda3 25625 38373 102400000 83 Linux
/dev/sda4 38373 60802 180161536 5 Extended
/dev/sda5 38373 44747 51200000 83 Linux
/dev/sda6 44747 45321 4608000 82 Linux swap / Solaris
Disk /dev/sdb: 8053 MB, 8053063680 bytes
255 heads, 63 sectors/track, 979 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0xcad4ebea
Device Boot Start End Blocks Id System
/dev/sdb4 * 1 980 7864192 7 HPFS/NTFS
Partition 4 has different physical/logical endings:
phys=(978, 254, 63) logical=(979, 15, 60)
执行挂载命令提示如下错误:
[root@sstisystem ~]# mount -t ntfs /dev/sdb4 /mnt/usb
mount: unknown filesystem type 'ntfs'
需要通过第三方软件ntfs-3g软件来实现,能过yum在线安装:
[root@sstisystem ~]# yum -y install ntfs-3g*
执行命令进行挂载:
[root@sstisystem ~]# mount -t ntfs-3g /dev/sdb4 /mnt/usb
3、挂载windows文件共享
标注:首先在windows下设置一个共享文件夹backup,建立一个用户abc,密码设置成123,把backup文件夹访问权限分配给abc用户
建立一个目录用来作挂载点,一般默认挂载点在/mnt 目录下建立
#mkdir /mnt/file
使用mount把windows共享文件夹挂载到linux目录下/mnt/file
mount -t cifs -o username=abc,password="123" //192.168.1.10/backup /mnt/file
取消挂载
#umount /mnt/dvd
标注:
linux 运行挂载目录共享提示如下错误:
[root@ssticentos ~]# mount -t cifs -o username=abc,password="123" //192.168.1.10/backup /mnt/file
mount error(12): Cannot allocate memory
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)
解决办法:
重启windows 系统挂载共享的系统Server服务即可。
Redhat linux 挂载命令mount的更多相关文章
- Linux挂载命令mount用法及参数详解
导读 mount是Linux下的一个命令,它可以将分区挂接到Linux的一个文件夹下,从而将分区和该目录联系起来,因此我们只要访问这个文件夹,就相当于访问该分区了. 挂接命令(mount) 首先,介绍 ...
- Linux 挂载命令 --mount
1.挂载光盘命令 mount : mount [-t vfstype] [-o options] device dir mount [-t 文件系统] [-o 特殊选项] 设备文件名 挂载点 -t ...
- linux 挂载命令mount、umount
mount /bin/mount语法:mount [-t文件系统] 设备文件名 挂载点mount -t iso9660 /dev/sr0 /mnt/cdromiso9660是固定的,光盘:所以 -t ...
- linux挂载命令mount及U盘、移动硬盘的挂载
一.mount的命令格式是(注意mount只能在root权限下运行) mount dervice dir dervice是要挂载的设备,dir是挂载点 二.查看当前磁盘列表的设备 fdisk -l 显 ...
- Linux文件挂载命令mount
在linux系统中硬盘.u盘.光驱等其他设备都需要挂载后才能正常使用.下面是对挂载命令mount使用方法的一些总结. 文件挂载命令mountmount [-t 文件系统类型][-L卷标名][-o特殊选 ...
- Redhat Linux挂载NTFS格式的移动硬盘
Redhat Linux挂载NTFS格式的移动硬盘 1. 选择下载ntfs-3g的源码包或rpm包 http://www.tuxera.com/community/open-source-ntfs-3 ...
- Linux常用命令学习4---(挂载命令mount umount、用户登陆查看和用户交互命令 w who last lastlog)
紧接着上一篇Linux的命令行的学习:Linux学习3---(文件的压缩和解压缩命令zip unzip tar.关机和重启命令shutdown reboot……) 1.挂载命令 简介 ...
- Linux文件系统管理 挂载命令mount
概述 mount命令用来挂载Linux系统外的文件. Linux 中所有的存储设备都必须挂载之后才能使用,包括硬盘.U 盘和光盘(swap 分区是系统直接调用的,所以不需要挂载).不过,硬盘分区在安装 ...
- Linux命令-挂载命令:mount
设置虚拟机放入光盘,并且选中“已连接” mkdir /mnt/cdrom 设置光盘目录 ll /dev/cdrom 查看cdrom的软连接长格式信息 mount -t iso9660 /dev/sr0 ...
随机推荐
- 移动端 :meta标签1万个作用
meta标签 <meta charset="utf-8"> <meta http-equiv="Content-Type" content=& ...
- linphone3.4.0代码分析
主要类型定义: 1.LinphoneCoreVTable /** * This structure holds all callbacks that the application should im ...
- OpenGL extension specification (from openGL.org)
Shader read/write/atomic into UAV global memory (need manual sync) http://www.opengl.org/registry/sp ...
- eclipse中的项目Java build path (Java创建路径)详解
1.Source标签页,指定本工程的源码目录和输出目录.Projects标签页,指定本工程所依赖的其他工程.Libraries标签页,指定本工程所需的jar包和class目录等.Order And E ...
- Artificial Intelligence Research Methodologies 人工智能研究方法
Computer Science An Overview _J. Glenn Brookshear _11th Edition To appreciate the field of artificia ...
- Kafka可靠性的思考
首先kafka的throughput 很牛逼,参考:http://engineering.linkedin.com/kafka/benchmarking-apache-kafka-2-million- ...
- android studio 出错
http://blog.csdn.net/dhx20022889/article/details/44919905
- 【转】说说如何使用unity Vs来进行断点调试
大家可以从这下载最新版的unity vs. UnityVs1.81下载 1. 安装unity vs.首先我们打开我们下载的unity vs.然后就会看见里面有3个文件,我们双击UnityVS 2 ...
- correctly handle PNG transparency in Win IE 5.5 & 6.
function correctPNG() // correctly handle PNG transparency in Win IE 5.5 & 6. { var arVersion = ...
- [Virtualization][SDN] 讲的很好的SDN软件定义网络视频课程
51CTO的免费课程,开始以为是扯蛋的,后来看了一下,讲的很好.注册一下,免费的. 只看了导论,挺好的. http://edu.51cto.com/course/course_id-4466.html