Modifing /etc/fstab in Linux

Here I will explain how to add entries to /etc/fstab for various filesystem.

Mounting the fat partition in linux

To mount the FAT partation in linux enter the following entry in /etc/fstab file

/dev/<node>      <path>     vfat    relatime,rw,exec,nodev,user,auto,uid=<username>,gid=<groupname>  0  2


/dev/sda6       /media/DATA     vfat    relatime,rw,exec,nodev,user,auto,uid=thalib,gid=thalib  0  2

Mounting the samba/cifs partition in linux

//<ipadres>/<share name>     /path/to/mount    cifs username=<username>,password=<password> ,rw,_netdev,uid=<userid>,gid=<groupid>      0 2


//     /mnt/samba    cifs username=thalib,password=thalib,rw,_netdev,uid=thalib,gid=thalib      0 2

From the above :

uid and gid are the users and groups to which we want to give acces to the mounted partition.

rw = read and write permisson

auto = when you do mount -a or on the boot the parations will be mounted


One thought on “Modifing /etc/fstab in Linux

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s