温馨提示×

温馨提示×

您好,登录后才能下订单哦!

密码登录×
登录注册×
其他方式登录
点击 登录注册 即表示同意《亿速云用户服务条款》

linux中有哪些常用的挂载命令

发布时间:2021-06-18 18:05:20 来源:亿速云 阅读:103 作者:Leah 栏目:大数据

linux中有哪些常用的挂载命令,针对这个问题,这篇文章详细介绍了相对应的分析和解答,希望可以帮助更多想解决这个问题的小伙伴找到更简单易行的方法。

一.mount的命令格式是(注意mount只能在root权限下运行)

mount dervice dir

dervice是要挂载的设备,dir是挂载点

二.查看当前磁盘列表的设备

fdisk -l

显示如下信息

linux中有哪些常用的挂载命令

root@kali:~# fdisk -l
Disk /dev/sda: 465.8 GiB, 500107862016 bytes, 976773168 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: dos
Disk identifier: 0x1eb9aaf8

Device     Boot     Start       End   Sectors   Size Id Type
/dev/sda1  *         2048 209719295 209717248   100G  7 HPFS/NTFS/exFAT
/dev/sda2       209719296 976773119 767053824 365.8G  f W95 Ext'd (LBA)
/dev/sda5       209721344 465575935 255854592   122G  7 HPFS/NTFS/exFAT
/dev/sda6       465577984 721432575 255854592   122G  7 HPFS/NTFS/exFAT
/dev/sda7       721434624 976773119 255338496 121.8G  7 HPFS/NTFS/exFAT


Disk /dev/sdb: 117.9 GiB, 126567317504 bytes, 247201792 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x19ac4874

Device     Boot     Start       End   Sectors   Size Id Type
/dev/sdb1  *         2048 238815231 238813184 113.9G 83 Linux
/dev/sdb2       238817278 247199743   8382466     4G  5 Extended
/dev/sdb5       238817280 247199743   8382464     4G 82 Linux swap / Solaris


Disk /dev/sdc: 29.7 GiB, 31876710400 bytes, 62259200 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x00000000

Device     Boot Start      End  Sectors  Size Id Type
/dev/sdc1        2048 62257151 62255104 29.7G  c W95 FAT32 (LBA)

这里我们可以看到所有连接在电脑上的设备和分区情况,比如我们想挂载/dev/sda5

三.创建挂载点

mkdir /mnt/diskd
mount /dev/sda5 /mnt/diskd

挂载成功

四.弹出设备

umount /dev/sda5

 通过df可以查看设备挂载点

关于linux中有哪些常用的挂载命令问题的解答就分享到这里了,希望以上内容可以对大家有一定的帮助,如果你还有很多疑惑没有解开,可以关注亿速云行业资讯频道了解更多相关知识。

向AI问一下细节

免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。

AI