2013-07-31

Mounting Partition/Drive in linux

Pranaam to all bhai ji _/\_

in this tutorial we will discuss about mounting drive/device  in linux so that we can access and then use them .
so lets start
mounting is the process by which we can access those file system (device/drive) which are not accessisble at its default location . for example, when we plugin USB drive to system, we cant use it directly, we need to mount it somewhere in our operating system. now a days linux also offer auto mounting facility to users. linux mount devices either in /media or in  /mnt directory . once device mounted at this location, it will be displayed on user desktop.
we can also mount device in any directory manually and for manual mounting we use mount command .
i am creating directory /r and will mount my device at that directory so that i can access data on that device.



Devices are mainly represented with name /dev/sda1  /dev/sdb1  or something like that. To know  the devices name and total devices presently attached to our system, we use command  fdisk -l
fdisk -l   list all the partition(consider them device/drive).


i have 2 partition currently ,  /dev/sda1 and  /dev/sda2  , i want to mount  /dev/sda2 drive on /r director so that i can access data on /dev/sda2 partition.

mount command need 2 arguments
name of the partition(device/drive)  which is /dev/sda2  in my case
name of the directory where you want to mount partition (this directory known as mount point )
syntax of maount command :-
 mount   partiton_name    mount_point
example
mount   /dev/sda2    /r


now after mounting partition, i can access data of /dev/sda2 partition by jumping into the directory where we have mounted /dev/sda2 drive.
if you want to unmount partition , just run this command and partition will be unmount
syntax for un mounting partiton(drive/device) :-
umount  device_name
example
umount  /dev/sda2

Thank you
Greetz to :- Guru ji Zero and Whole Team IndiShell <3



Share this post

4 comments

  1. Good tut bro....

    ReplyDelete
  2. i want to mount 2 disk into a disk that it still retain disk's property .please instruct me ?thanks

    ReplyDelete
  3. sorry, can you post the error message or screenshot here ?

    ReplyDelete

:) :-) :)) =)) :( :-( :(( :d :-d @-) :p :o :>) (o) [-( :-? (p) :-s (m) 8-) :-t :-b b-( :-# =p~ :-$ (b) (f) x-) (k) (h) (c) cheer

© 2009 Start With Linux | Mannu Linux
Designed by cyb3r.gladiat0r
Posts RSSComments RSS
Back to top