如何格式化和登上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>