linux下如何优雅的挂载一个外界设备(比如优盘)
最近从事linux,实验室一个破服务器,能连上网,但是输入这样的命令: yum -y install gcc
yum -y install gcc-c++ ,居然说是没有这样的镜像,也罢,就用U盘搞了一个linux gcc,gcc-c++,然后问题来了?
外挂哪家强? 完全找不到移动设备有木有。 嗷嗷的哭呀!
果断的敲入: fdisk -l -->查看分区的状态
Disk /dev/sdb: 4051 MB, 4051697664 bytes
151 heads, 42 sectors/track, 1247 cylinders
Units = cylinders of 6342 * 512 = 3247104 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0xc3072e18
Device Boot Start End Blocks Id System
/dev/sdb1 1 1248 3956708 c W95 FAT32 (LBA)
找到了,U盘的位置,但是就是进不去呀!
于是先建立一个路径: mkdir mnt/usb
有木有,果然的去问了迅雷工作的学长韦回超学长,说是我mount命令用错了!!
我看了,我的命令一下:mount /dev/gdb1/mnt/usb
并mount -help了一下!
恩! 是的! 用错了! 少了一个空格!! mount file1 file2
mount /dev/gdb1 /mnt/usb
这样就挂载好了!
总结一下步骤吧!:
第一步: fdisk -l -->查看外界设备的位置 比如这个优盘 /dev/sdb1
[root@tomato2 ~]# 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 / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk identifier: 0x141cccb4
Device Boot Start End Blocks Id System
/dev/sda1 * 1 64 512000 83 Linux
Partition 1 does not end on cylinder boundary.
/dev/sda2 64 60802 487873536 8e Linux LVM
Disk /dev/mapper/vg_tomato2-lv_root: 53.7 GB, 53687091200 bytes
255 heads, 63 sectors/track, 6527 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk identifier: 0x00000000
Disk /dev/mapper/vg_tomato2-lv_swap: 3388 MB, 3388997632 bytes
255 heads, 63 sectors/track, 412 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk identifier: 0x00000000
Disk /dev/mapper/vg_tomato2-lv_home: 442.5 GB, 442503266304 bytes
255 heads, 63 sectors/track, 53797 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk identifier: 0x00000000
Disk /dev/sdb: 4051 MB, 4051697664 bytes
151 heads, 42 sectors/track, 1247 cylinders
Units = cylinders of 6342 * 512 = 3247104 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0xc3072e18
Device Boot Start End Blocks Id System
/dev/sdb1 1 1248 3956708 c W95 FAT32 (LBA)
第二步: 设置一个路径 mkdir mnt/usb -->这个usb什么的就随便的起名字了!
[root@tomato2 ~]# mkdir /mnt/usb
第三步: 将U盘挂载到这个路径中来! mount /dev/gdb1 /mnt/usb
这样就ok 了! 但是最后还是有一个结尾就是卸载这个挂载点 unmount /mnt/usb
[root@tomato2 ~]# umount /mnt/usb
然后删除路径: rmkdir mnt/usb
[root@tomato2 ~]# rmdir /mnt/usb
然后就可以去优雅的去使用U盘里的东西啦!!!!
linux下如何优雅的挂载一个外界设备(比如优盘)的更多相关文章
- Kali Linux下破解WIFI密码挂载usb无线网卡的方法
Kali Linux下破解WIFI密码挂载usb无线网卡的方法 时间:2014-10-12 来源:服务器之家 投稿:root 首先我要说的是,wifi密码的破解不是想象中的那么容易,目前还 ...
- Mac、Linux下两个Emacs共享一个配置文件
Mac.Linux下两个Emacs共享一个配置文件 有些嵌入式的实验需要在Linux进行,就安装了RHEL6.4的虚拟机,下载并编译了Emacs. 在Linux的.emacs文件中加入以下语句,即可引 ...
- Linux下磁盘分区、挂载、卸载操作记录
Linux下磁盘分区.挂载.卸载操作记录. 操作环境:CentOS release 6.5 (Final) Last :: from 118.230.194.76 [root@CentOS ~]# [ ...
- LINUX下的U盘挂载
linux下如果没有图形界面的情况下就要我们自己熟悉命令来挂载U盘,下面给大家详细描述下U盘的挂载过程. 1. 插入U盘 2. #sudo fdisk –l 查看所挂载盘符名称如下图,假设盘符名称为s ...
- 在linux下,怎么去查看一个运行中的程序, 到底是占用了多少内存
1. 在linux下,查看一个运行中的程序, 占用了多少内存, 一般的命令有 (1). ps aux: 其中 VSZ(或VSS)列 表示,程序占用了多少虚拟内存. RSS列 表示, 程序占用了多少物 ...
- 记录Window系统下myeclipes连接linux下mysql所出现的一个bug
记录myeclipes远程连接mysql所出现的一个bug 今天在玩框架hibernate时,出现一个非常费解的bug,话不多说,先看bug Access denied for user 'root' ...
- linux下堆溢出unlink的一个简单例子及利用
最近认真学习了下linux下堆的管理及堆溢出利用,做下笔记:作者作为初学者,如果有什么写的不对的地方而您又碰巧看到,欢迎指正. 本文用到的例子下载链接https://github.com/ctfs/w ...
- 记录一下linux下两个工具和一个伪代码转换流程图工具
1.Linux下文本浏览器lynx 文本浏览器,顾名思义就是只有文本的浏览器,这个浏览器可以在命令行下打开使用 2.CURL 在Linux中curl是一个利用URL规则在命令行下工作的文件传输工具,可 ...
- Linux下U盘的挂载和文件的拷贝
把文件通过U盘拷贝到linux系统下插好U盘后,查看磁盘情况fdisk -l正常情况下有 Disk /dev/sda:2045 MB,2045247488 bytes47 heads,46 secto ...
随机推荐
- C#借助谷歌翻译实现翻译小工具(二)添加托盘图标
接上一节完善小翻译工具 设置Form的ShowInTaskbar属性为False,取消任务栏显示 设置Form的MaximizeBox属性为False,取消最大化显示 窗口添加两个控件 分别是:Con ...
- TeeChart曲线平滑 Line.Smoothed
需要注意的是,在加载点之前,需要设置Smoothed属性为false 等点加载完成之后,再设置Smoothed属性为true, //如果直接设置Smoothed为true再去加载点的话,曲线就完全不显 ...
- Using Text_IO To Read Files in Oracle D2k
Suppose you want to read a file from D2k client and want to store its content in Oracle database. Bu ...
- Linux运行变量中的命名脚本
single="ls -l" $single ============= multi="ls -l | grep e" echo $multi > tmp ...
- SQL——存储过程实例 调用带参数的过程(成绩输出)
create or replace procedure test_score(input in number,output out char) is begin then begin output : ...
- 【CC评网】2013.第41周 不求排版,简单就好
书单 碰上国庆,加上这周,消化掉几本书: <软件随想录>:Joel的随想录,也就是他Blog上的文章的摘选:整本书看下来轻松:写了篇读书笔记[传送门]: <中国在梁庄>:这本书 ...
- 问题处理:找不到Pch预编译文件?
提醒:Xcode6之后就不再自动创建Pch预编译文件 在Xcode6之前,创建一个新工程xcode会在Supporting files文件夹下面自动创建一个“工程名-Prefix.pch”文件,也是一 ...
- XPah学习
资料1: 来源:http://www.cnblogs.com/ChengDong/archive/2012/06/28/2567744.html 示例Xml: <?xml version=&qu ...
- js 小数相加异常
var a = 0.1; var b = 0.2; a + b//0.30000000000000004 这个bug可能是因为二进制计算溢出导致的. 解决办法:将小数转换为整数进行计算 计算后结果除以 ...
- iOS - Swift NSKeyedArchiver 数据归档
前言 public class NSKeyedArchiver : NSCoder public class NSKeyedUnarchiver : NSCoder 在 OC 语言中,归档是一个过程, ...