Linux Mounting / un-mounting directories related commands

To check for currently mounted partitions, use mount command without any arguments:
[root@badar /]# mount 
/dev/hda6 on / type ext3 (rw)
none on /proc type proc (rw)
usbdevfs on /proc/bus/usb type usbdevfs (rw)
/dev/hda1 on /boot type ext3 (rw)
/dev/hda2 on /data type ext3 (rw)
none on /dev/pts type devpts(rw,gid=5,mode=620)
none on /dev/shm type tmpfs (rw)
/dev/hda3 on /mnt/hda3 type vfat (rw)


You can also use the mounted files system table mtab to check for currently mounted partitions.
[root@badar /]# cat /etc/mtab
/dev/hda6 / ext3 rw 0 0
none /proc proc rw 0 0
usbdevfs /proc/bus/usb usbdevfs rw 0 0
/dev/hda1 /boot ext3 rw 0 0
/dev/hda2 /data ext3 rw 0 0
none /dev/pts devpts rw,gid=5,mode=620 0 0
none /dev/shm tmpfs rw 0 0
/dev/hda3 /mnt/hda3 vfat rw 0 0


Following command mounts the CD ROM drive in mount point  /mnt/cdrom
[root@badar /]# mount /dev/cdrom /mnt/cdrom


Following command mounts your VFAT partition, C: drive, in  /mnt/windir
[root@badar /]# mount -t vfat /dev/hda2 /mnt/windir


Following command mounts an NFS share /usr/data from the machine 192.168.1.2  to your local mount point  /mnt/cdrom:
[root@badar /]# mount –t nfs 192.168.1.2:/usr/data /mnt/cdrom


To unmount any mount point use the following command but the mount point must not be busy:
[root@badar /]# umount /mnt/cdrom



Comments

Popular posts from this blog

Create Tables in Oracle Database using TOAD

How to create Oracle stored Procedures using TOAD for Oracle

How to Create Packages in Oracle Database using TOAD for Oracle