mount

From NetBSD Wiki

Jump to: navigation, search
This article is a stub. You can help by editing it.

mount - mount a filesystem.

The mount(8) command calls the mount(2) system call to include a file system in to a specific place (mount point) in the file system tree.

Contents

Listing mounts

If mount is invoked without any arguments, it will list the currently mounted file systems on stdout.

% mount
/dev/wd0a on / type ffs (local)
/dev/wd0f on /usr type lfs (NFS exported, local)
tmpfs on /tmp type tmpfs (local)
ptyfs on /dev/pts type ptyfs (local)
kernfs on /kern type kernfs (local)

Mounting

If it is invoked with two arguments, the first is a special file, and the second is the mount point.

mount /dev/fd0a /mnt

If it is invoked with only one argument, mount will look up the other in fstab(5).

Mounting special filesystems

To mount a filesystem other than ffs or ffsv2, you have to specify the target system with the option flag -t

Examples:

Mounting a CD-ROM

# mount -t cd9660 /dev/cd0a /mnt/cdrom

Mounting a Windows Filesystem (NTFS)

# mount -t ntfs /dev/wd0e /mnt/windows

Mounting a Linux Filesystem (ext2fs)

# mount -t ext2fs /dev/wd0g /mnt/linux

Mounting an LFS (Log-Structured-Filesystem) Partition

# mount -t lfs /dev/wd0f /usr

Mounting an MFS

# mount -t mfs -o nosuid,-N,-s=32m swap /tmp

Mounting a TMPFS

# mount -t tmpfs tmpfs /tmp

Mounting a PTYFS

# mount -t ptyfs ptyfs /dev/pts

Mounting an exported NFS share

# mount -t nfs hostname:/shared/directory

Mounting a USB Flash disk

# mount -t msdos /dev/sd0e /mnt

These are only common examples. Please be aware that there are much more Filesystems you can mount with the mount(8) command.

Re-Mounting

There may be times when you need to boot into a single user mode or have had other filesystem troubles. Those of you from other OS backgrounds may think that you need to: "mount -o remount,rw /" to remount your root partition as read-write. In NetBSD, you simply call -u:

# mount -u /

See also

View source code (Please report any bugs or suggestions here).

Retrieved from "http://wiki.netbsd.se/mount"
Personal tools