FreeBSD Unix Show Mounted File Systems

I recently switched from MS-Windows server to a FreeBSD Unix server. How can I see list of mounted file systems on a FreeBSD based Unix server using command line options?

[donotprint]
Tutorial details
DifficultyEasy (rss)
Root privilegesNo
RequirementsFreeBSD
Time1m
[/donotprint]The command to view mounted files systems, to mount or add any local devices such USB,DVD/CD or remote file systems such asNFS, SAMBA shares or files is the mount command on a FreeBSD operating systems.

ADVERTISEMENTS

How can I list mounted local and remote file systems?

This will list mounted remote and local file systems, run:
$ mount
Sample outputs:

/dev/ada0p2 on / (ufs, local, journaled soft-updates)
devfs on /dev (devfs, local, multilabel)
192.168.1.10:/exports/nas01/data on /mnt/nfs (nfs)

The first field displays the special device such as /dev/ada0p2 or remote file system such as 192.168.1.10:/exports/nas01/data mounted on second field. The second field is the mount point for the file system displayed in the first field. Adding the -v flag will add IDs too:
$ mount -v
Sample outputs:

/dev/ada0p2 on / (ufs, local, journaled soft-updates, writes: sync 3 async 50, reads: sync 1193 async 10, fsid f64cdd52f9f387e7)
devfs on /dev (devfs, local, multilabel, fsid 00ff007171000000)
192.168.1.10:/exports/nas01/data on /mnt/nfs (nfs, fsid 01ff003a3a000000)

If you want to see only a specific file system you would use the -t flag. For example, only show a ufs based mounted file system, enter:
$ mount -t ufs
OR just show a nfs based mounted file system, type:
$ mount -t nfs
Sample outputs:

192.168.1.10:/exports/nas01/data on /mnt/nfs (nfs)

/etc/fstab file

The /etc/fstab contains descriptive information about the various file systems. fstab is only read by programs, and not written; it is the duty of the system administrator to properly create and maintain this file. To see this file, type:

more /etc/fstab
less /etc/fstab
column -t /etc/fstab

Sample outputs:

# Device	Mountpoint	FStype	Options	Dump	Pass#
/dev/ada0p2	/		ufs	rw	1	1
/dev/ada0p3	none		swap	sw	0	0
md42    	none    	swap   	sw,file=/root/swap1	0	0  

More on column -t command

The column command formats its input into multiple columns. It is useful to display mounted file systems in a table format:

mount | column -t

Or try:

( printf "Device Mounted On (FileSystem_info)\n" ; mount ) | column -t

Sample outputs:

Fig.01: Freebsd Unix mount command and column -t to display output in a table format.

Fig.01: Freebsd Unix mount command and column -t to display output in a table format.

df command examples

The df command shows statistics about the amount of free disk space on a FreeBSD system:

df
 
## Use 1024 byte (1 Kibibyte) blocks rather than the default. ##
df -k
 
## Human-readable outputs ##
df -H

Sample outputs:

Filesystem                          Size    Used   Avail Capacity  Mounted on
/dev/ada0p2                          20G     11G    7.5G    59%    /
devfs                               1.0k    1.0k      0B   100%    /dev
192.168.1.10:/exports/nas01/data    1.6T    297G    1.2T    20%    /mnt/nfs

This quick tutorial was contributed by Wendy Michele. Editing by admin. You can too contribute to nixCraft.

🐧 Get the latest tutorials on SysAdmin, Linux/Unix, Open Source/DevOps topics:
CategoryList of Unix and Linux commands
File Managementcat
FirewallCentOS 8 OpenSUSE RHEL 8 Ubuntu 16.04 Ubuntu 18.04 Ubuntu 20.04
Network Utilitiesdig host ip nmap
OpenVPNCentOS 7 CentOS 8 Debian 10 Debian 8/9 Ubuntu 18.04 Ubuntu 20.04
Package Managerapk apt
Processes Managementbg chroot cron disown fg jobs killall kill pidof pstree pwdx time
Searchinggrep whereis which
User Informationgroups id lastcomm last lid/libuser-lid logname members users whoami who w
WireGuard VPNCentOS 8 Debian 10 Firewall Ubuntu 20.04

ADVERTISEMENTS
2 comments… add one
  • Chester T Field Feb 4, 2015 @ 4:41

    Hi,

    The command “mount” will show you what is currently mounted. The man page (“man mount”) has more details.

    -Chester

  • Vattini Giacomo Feb 9, 2015 @ 10:23

    Hi there how can i mount from ubuntu 14.04 an ufs2 or ufs freebsd 10.1 or 11 filesystem system?

Leave a Reply

Your email address will not be published.

Use HTML <pre>...</pre>, <code>...</code> and <kbd>...</kbd> for code samples.