最近从事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. can not find UIAutomationClient

    'ClientApp.vshost.exe' (CLR v4.0.30319: ClientApp.vshost.exe): Loaded 'C:\Windows\Microsoft.Net\asse ...

  2. Logical Databases逻辑数据库

    声明:原创作品,转载时请注明文章来自SAP师太技术博客( 博/客/园www.cnblogs.com):www.cnblogs.com/jiangzhengjun,并以超链接形式标明文章原始出处,否则将 ...

  3. Jenkins插件及 测试源码

    Jenkins 插件: https://updates.jenkins-ci.org/download/plugins/ 小米的一份android源码,测试工具,用于抢红包: https://gith ...

  4. CSharp Similarities and Differences

    This document lists some basic differences between Nemerle and C# in a terse form. If you know Java ...

  5. HDU5716, HDU5745【dp+bitset】

    DP+bitset  HDU5716 dp[i][j] = dp[i-1][j-1] && (s[i] in set[j]); 第二维压bitset #include <bits ...

  6. HDU5886 Tower Defence 【两遍树形dp】【最长链预处理】

    题意:N个点的一棵带权树.切掉某条边的价值为切后两树直径中的最大值.求各个边切掉后的价值和(共N-1项). 解法一: 强行两遍dp,思路繁琐,维护东西较多: dis表示以i为根的子树的直径,dis2表 ...

  7. Mysql 允许null 与 default值

    分为下面4种情况: 1.允许null, 指定default值. 2.允许null, 不指定default,这个时候可认为default值就是null 3.不允许null,指定default值,不能指定 ...

  8. (十)Linux内核中的常用宏container_of

    Container_of在Linux内核中是一个常用的宏,用于从包含在某个结构中的指针获得结构本身的指针,通俗地讲就是通过结构体变量中某个成员的首地址进而获得整个结构体变量的首地址. Containe ...

  9. hibernate的注解属性mappedBy详解

    mappedBy: 1>只有OneToOne,OneToMany,ManyToMany上才有mappedBy属性,ManyToOne不存在该属性: 2>mappedBy标签一定是定义在被拥 ...

  10. Linux命令:traceroute(windows中为tracert)

    通过traceroute 我们可以知道信息从你的计算机到互联网另一端的主机是走的什么路径.当然每次数据包由某一同样的出发点(source)到达某一同样的目的地(destination)走的路径可能会不 ...