如何格式化和登上USB硬盘在Linux

Sukrit Dhandhania 2009年4月24日

Linux

我最近买了新的USB硬盘。 我想使用它创造我的Linux服务器备份。 这怎么我去格式化和安装驱动器在我的Linux服务器。

我的第一件事是发现何处盘登上了。 为那我跑了以下命令:

#尾巴- F /var/log/messages

当我塞住了驱动入我的服务器有消息认为驱动是可利用的在/dev/sdc1。 如此下一个步骤将格式化驱动。 有由读和写能给由Linux的一定数量的文件格式,但窗口是挑剔对此。 如此我决定使用很好与两个操作系统一起使用的一个试验过和被测试的文件系统。 我去与油脂。 如此格式化驱动,油脂我跑了以下命令:

# mkfs.vfat /dev/sdc1

在几分钟最近格式化的驱动准备去。 现在我想登上它。 如此我创造一个目录登上它:

# mkdir /media/usbdisk

现在,安装驱动器对这登上点我跑了以下命令:

#登上- t vfat /dev/sdc1 /media/usbdisk

并且好了。 我新的硬盘被格式化了,登上,并且准备去。 我复制了我在它然后我想复制未安装它的数据:

# umount /media/usbdisk

笔记: 最后步是非常重要的。 如果您拔去您的驱动,无需unmounting它举行的它您可能冒数据的风险。

如果这是您也许经常使用和留给它被接通的计划您的Linux服务器您的USB存贮设备可能设定自动地登上的设备,当您解雇入Linux时。 做做一个词条象如下所示的那个在文件尾 /etc/fstab:

/dev/sdc1 /mnt/usbdrive vfat 缺省0 0

现在您的驱动器将自动地被安装到您的Linux服务器,并且您能采取您的备份,无需担心登上设备。

相关岗位:
  • 如何提取(或通入) .iso的内容归档在窗口
  • 如何格式化USB拇指驱动在窗口
  • How to mount a remote file system as a local drive in OS X
  • How to create and extract zip, tar, tar.gz and tar.bz2 files in Linux
  • How to automatically mount a Windows drive when OS X starts
  • Get Simple Help tutorials just like this one in your email inbox every day - for free! Just enter your email address below:

    You can always opt out of this email subscription at any time.

    { 0 comments… add one now }

    Leave a Comment

    You can use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>