DEVFS.CONF(5)

πŸ“¦
version 15.1 Β· 2 versions
, in freebsd 15.1, nixpkgs unstable

πŸ’… DEVFS.CONF(5) β€” the file formats manual page, bestie edition

okay so real talk, this is the manual page for devfs.conf β€” it lives in the File Formats Manual section (that's the (5) bestie, iykyk) and it's literally your boot-time devfs config glow-up guide ✨


🌸 NAME 🌸

devfs.conf β€” the boot-time devfs configuration info file. it's giving "set it and forget it" πŸŽ€


✨ DESCRIPTION ✨

so devfs.conf is the easy-peasy way to set ownership and permissions, or create links for devices that are available at boot. lowkey iconic behavior πŸ’…

heads up bestie: it does NOT work for devices that get plugged in and out after the system is up and running β€” like, say, USB devices πŸ™ˆ no cap.

if you need ownership and permissions set for all device nodes, go see devfs.rules(5) instead. and if you want actions taken when devices are attached or detached, that's a devd.conf(5) situation. slay, different files for different vibes πŸ¦‹

Lines starting with a hash sign (β€˜#’) and empty lines are ignored β€” they simply don't exist to this file, periodt.

The lines that specify devfs.conf rules consist of three parameters separated by whitespace:

  • action β€” the action to take for the device. and here's the cute part: the action names are only significant to the first unique character. so you can be lazy about it, it still ate πŸ’€
  • devname β€” the name of the device created by devfs(4).
  • arg β€” the argument of the action.

πŸŽ€ the actions currently supported πŸŽ€

  • link β€” this action creates a symbolic link named arg that points to devname, the name of the device created by devfs(4). cute little shortcut, we love her 🫢
  • own β€” this action changes the ownership of devname. the arg parameter must be in the form of an owner:group pair, in the same format used by chown(8). don't freestyle the format, bestie 😭
  • perm β€” this action changes the permissions of devname. the arg parameter must be a mode as explained in chmod(1). yeah, the numbers, you know the ones 🌈

πŸ’– FILES πŸ’–

  • /etc/devfs.conf
  • /usr/share/examples/etc/devfs.conf

(the second one is literally the example copy, go peek at it πŸ‘€)


πŸ¦‹ EXAMPLES πŸ¦‹

1. the cdrom link β€” to create a /dev/cdrom link that points to the first CD-ROM, the following may be added to devfs.conf:

link    cd0     cdrom

2. the owner β€” to set the owner of a device, the own action may be specified:

own     cd0     root:cdrom

3. the permissions β€” to set the permissions of a device, a perm action should be used:

perm    cd0     0660

see how tidy?? three params, whitespace-separated, no drama ✨


πŸ”₯ SEE ALSO πŸ”₯

chmod(1), devfs(4), devd.conf(5), devfs.rules(5), chown(8)

go read those if you want the full lore πŸ“š


πŸ‘‘ AUTHORS πŸ‘‘

This manual page was written by Roland Smith <rsmith@xs4all.nl>. we stan a documentation icon πŸ’œ


and that's the whole thing, bestie β€” no notes, 10/10, ate and left no crumbs πŸ“

sign-off vibes: this one came from Debian, dated May 25, 2019 πŸ’– and the page itself is DEVFS.CONF(5) β€” the 5 stands for file formats, obvi. k bye, go fix your device permissions 🌸

πŸ“¦ where this page comes from