The /etc/fstab File

You might be asking whether there is a shortcut to all this mounting—a way to program “recipes” for all the mountable devices on a system. After all, Windows machines and Macintoshes don't need all this command-line mumbo jumbo in order to work seamlessly with disks, do they?

After you have figured out the commands needed to mount your second IDE hard drive, your NFS volume from across the network, your MS-DOS floppy, and your SCSI CD-ROM, do you really have to remember those commands every time you want to mount them? No, there is indeed a better way. That way is the /etc/fstab file.

Take a look at the file now, using cat /etc/fstab:

 # Device Mountpoint FStype Options Dump Pass# /dev/ad0s1b none swap sw 0 0 /dev/ad0s1a / ...

Get Sams Teach Yourself FreeBSD® in 24 Hours now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.