Advertisement
Home arrow Linux Guide arrow How to mount and unmount a drive in linux
How to mount and unmount a drive in linux
Written by wiredgorilla   
Tuesday, 26 August 2008

How To Mount A Drive In Linux

Initially you wanna check the hard drives on your system

fdisk -l

so now you now whats being seen by the system
 

Command Line

mount /dev/partitionId /some/mounting/point
 
for example
mount /dev/sdb /backup

The mounting point path must already be created with proper permissions. So a more likely flow of commands would be below:

Command Line

mkdir /some/mounting/point
chmod 777 /some/mounting/point
mount /dev/partitionId /some/mounting/point
 
for example:
mkdir /backup
chmod 777 /backup
mount /dev/sdb /backup
 
Now you just need to add the addon hard drive into fstab to be booted on startup as well
 
nano /etc/fstab
 

How To Unmount A Drive In Linux

Command Line

umount /dev/partitionId

This command is very easy to type wrong. It is NOT unmount. Take another closer look if thats what you saw at first. It is umount -- no n here!





Reddit!Del.icio.us!Google!Live!Facebook!Slashdot!Netscape!Technorati!StumbleUpon!Newsvine!Furl!Yahoo!Ma.gnolia!Free social bookmarking plugins and extensions for Joomla! websites!
Last Updated ( Tuesday, 26 August 2008 )
 
Next >