DEVFS(4)
π DEVFS(4) β device file system
ok so this is devfs(4), straight outta the Kernel Interfaces Manual (that's section 4, bestie, kernel land π§). It's the device file system, and honestly? iconic.
β¨ NAME β¨
devfs β the device file system π
πΈ SYNOPSIS πΈ
devfs /dev devfs rw 0 0
like, that's the whole vibe. look at it. so simple. so slay.
π¦ DESCRIPTION π¦
okay so picture this: the device file system, aka devfs, gives you access to the kernel's device namespace, right inside the global file system namespace. the conventional mount point is /dev β that's the main character location, periodt.
the file system includes several directories, links, symbolic links and devices, some of which can also be written. yes, written π β some of them are writable.
in a chroot'ed environment, devfs(8) can be used to create a new /dev mount point. cute, right?
and if you ever fumble and delete a device entry? no stress β the mknod(8) tool can be used to recover deleted device entries under devfs. we love a recovery arc π«Ά
now, plot twist: the fdescfs(4) filesystem is an alternate means for populating /dev/fd. the character devices that both devfs and fdescfs(4) present in /dev/fd correspond to the open file descriptors of the process accessing the directory. here's the difference though, and it matters:
devfsonly creates files for the standard file descriptors0,1and2.fdescfs(4)creates files for all open descriptors. overachiever π
the options are as follows:
-ooptions β use the specified mount options, as described inmount(8). and listen, there are somedevfsfile system-specific options available too:ruleset=ruleset β set ruleset number ruleset as the current ruleset for the mount-point and apply all its rules. if the ruleset number ruleset does not exist, an empty ruleset with the number ruleset is created. seedevfs(8)for more information on working withdevfsrulesets. very demure, very mindful β¨
π FILES π
/devβ the normaldevfsmount point. the it-girl directory π
π₯ EXAMPLES π₯
to mount a devfs volume located on /mychroot/dev:
mount -t devfs devfs /mychroot/dev
go off king π
π SEE ALSO π
fdescfs(4), devfs(8), mount(8), make_dev(9)
read them. they're all besties. iykyk π
β HISTORY β
the devfs file system first appeared in FreeBSD 2.0. it became the preferred method for accessing devices in FreeBSD 5.0 and the only method in FreeBSD 6.0 (glow up of the century, no cap π). the devfs manual page first appeared in FreeBSD 2.2.
πΈ AUTHORS πΈ
the devfs manual page was written by Mike Pritchard <mpp@FreeBSD.org>. legend behaviour, fr fr π
ngl bestie that's the whole page β every flag, every path, every version, all of it π
this icon of a page is from the Debian edition, dated June 30, 2022, and lives at DEVFS(4). mwah, go mount something πβ¨
π¦ where this page comes from
- freebsd 15.1: base 15.1
- nixpkgs unstable: source
- Copyright (c) 1996 Mike Pritchard <mpp@FreeBSD.org>. All rights reserved
- Copyright (c) 1992, 1993, 1994 The Regents of the University of California. All rights reserved
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms