最近从事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下如何优雅的挂载一个外界设备(比如优盘)的更多相关文章

  1. Kali Linux下破解WIFI密码挂载usb无线网卡的方法

    Kali Linux下破解WIFI密码挂载usb无线网卡的方法 时间:2014-10-12    来源:服务器之家    投稿:root 首先我要说的是,wifi密码的破解不是想象中的那么容易,目前还 ...

  2. Mac、Linux下两个Emacs共享一个配置文件

    Mac.Linux下两个Emacs共享一个配置文件 有些嵌入式的实验需要在Linux进行,就安装了RHEL6.4的虚拟机,下载并编译了Emacs. 在Linux的.emacs文件中加入以下语句,即可引 ...

  3. Linux下磁盘分区、挂载、卸载操作记录

    Linux下磁盘分区.挂载.卸载操作记录. 操作环境:CentOS release 6.5 (Final) Last :: from 118.230.194.76 [root@CentOS ~]# [ ...

  4. LINUX下的U盘挂载

    linux下如果没有图形界面的情况下就要我们自己熟悉命令来挂载U盘,下面给大家详细描述下U盘的挂载过程. 1. 插入U盘 2. #sudo fdisk –l 查看所挂载盘符名称如下图,假设盘符名称为s ...

  5. 在linux下,怎么去查看一个运行中的程序, 到底是占用了多少内存

    1. 在linux下,查看一个运行中的程序, 占用了多少内存, 一般的命令有 (1). ps aux: 其中  VSZ(或VSS)列 表示,程序占用了多少虚拟内存. RSS列 表示, 程序占用了多少物 ...

  6. 记录Window系统下myeclipes连接linux下mysql所出现的一个bug

    记录myeclipes远程连接mysql所出现的一个bug 今天在玩框架hibernate时,出现一个非常费解的bug,话不多说,先看bug Access denied for user 'root' ...

  7. linux下堆溢出unlink的一个简单例子及利用

    最近认真学习了下linux下堆的管理及堆溢出利用,做下笔记:作者作为初学者,如果有什么写的不对的地方而您又碰巧看到,欢迎指正. 本文用到的例子下载链接https://github.com/ctfs/w ...

  8. 记录一下linux下两个工具和一个伪代码转换流程图工具

    1.Linux下文本浏览器lynx 文本浏览器,顾名思义就是只有文本的浏览器,这个浏览器可以在命令行下打开使用 2.CURL 在Linux中curl是一个利用URL规则在命令行下工作的文件传输工具,可 ...

  9. Linux下U盘的挂载和文件的拷贝

    把文件通过U盘拷贝到linux系统下插好U盘后,查看磁盘情况fdisk -l正常情况下有 Disk /dev/sda:2045 MB,2045247488 bytes47 heads,46 secto ...

随机推荐

  1. Eclipse / android studio 添加第三方jar包 步骤

    eclipse 将第三方包放到libs文件夹后并没有引用. 基本步骤分为3步,具体介绍如下: 打开自己的Eclipse,在自己的Android工程上名上右键->Build Path ->C ...

  2. jquery之event与originalEvent的关系、event事件对象用法浅析

    在jquery中,最终传入事件处理程序的 event 其实已经被 jQuery 做过标准化处理, 其原有的事件对象则被保存于 event 对象的 originalEvent 属性之中, 每个 even ...

  3. CPU的一些参数和排名

    排名的信息来源: http://itianti.sinaapp.com/index.php/cpu 一些参数的信息来源: http://ark.intel.com/ 个人关注一些的一些CPU排名: I ...

  4. asynchronous vs non-blocking

    http://stackoverflow.com/questions/2625493/asynchronous-vs-non-blocking In many circumstances they a ...

  5. Writing On-Error Trigger In Oracle Forms

    Suppose you want to handle an error in oracle forms and want to display custom error message for tha ...

  6. Changing Icon File Of Push Button At Runtime In Oracle Forms 6i

    Set Icon_File property in When-Mouse-Enter trigger Suppose you are creating icon based menu system i ...

  7. hdu 1116 Play on Words 欧拉路径+并查集

    Play on Words Time Limit: 10000/5000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others)To ...

  8. flex布局注意点:

    1.父元素display:flex之后成为伸缩容器,子元素(除了position:absolute或fixed)无论是display:block或者display:inline,都成为了伸缩项目.2. ...

  9. Windows Live Writer配置

    Windows Live Writer手工配置步骤: 1.在菜单中选择"Weblog";,然后选择"Another Weblog Service". 2.在We ...

  10. [转载]bigtable 中文版

    转载厦门大学林子雨老师的译文 原文: http://dblab.xmu.edu.cn/post/google-bigtable/ Google Bigtable (中文版) 林子雨2012-05-08 ...