How fstab works - introduction to the /etc/fstab file on Linux -

The /etc/fstab file is one of the most important files in a Linux-based system, since it stores static information about filesystems, their mountpoints and mount options. In this tutorial we will learn to know its structure in details, and the syntax we can use to specify each entry in the file.

This is a companion discussion topic for the original entry at

Can anybody help me? I’m desperately trying to transfer this mount line, which is successful in command line, into an fstab instruction that works. I’ve been trying for weeks and no joy…

Hi Christopher_Stark,

Welcome to our forums.

How about something like this:

// /mnt/5TB cifs username=libreelec,password=libreelec,vers=3.0 0 0

This should do the trick, or at least provide some error message that may prove useful in debugging.

Excellent explanation of fstab! Thank you.

What would you suggest if the /etc/fstab file is an fstab.swp and displays the following error message in nano terminal when trying to edit?

[ Error reading lock file /etc/.fstab.swp: Not enough data read ]

Hi Sawkyrom,

Welcome to our forums.

The file in question is a hidden temporary replacement of the original text file during editing. If the file persists and no other session is editing the original, it could be a leftover from a broken session. This doesn’t mean you should not have the one with the original name in place. Maybe you deleted it by accident?