DEVFS.RULES(5)
πΈ NAME πΈ
devfs.rules β devfs configuration information π
okay bestie, welcome to devfs.rules(5) from the File Formats Manual β this is the page that makes devfs rules feel like main character energy π
β¨
π DESCRIPTION π
the devfs.rules file is your easy-peasy way to create and apply devfs(8) rules, even for devices that are not available at boot. for devices that are available at boot, see devfs.conf(5) π
the format of this file is simple, no cap. empty lines and lines beginning with a hash sign (#) are ignored. a line between brackets denotes the start of a ruleset. in the brackets should be the name of the ruleset and its number, separated by an equal sign π
other lines are rule specifications as documented in devfs(8), in the section βRule Specificationβ. these lines are prepended with rule and are passed to devfs(8) by the startup scripts of the system.
important: it is important to put path elements that contain glob(3) special characters between quotes π§
rulesets should have a unique name and number. all rules that follow a ruleset declaration belong to that ruleset, until a new ruleset is started. periodt. π
one custom ruleset has to be enabled in /etc/rc.conf, otherwise it will not be applied to the /dev file system by the default system startup process. for example, to enable a βlocalrulesβ ruleset for the /dev file system, you would have to use something like this in your rc.conf file:
devfs_system_ruleset="localrules"
the rules are loaded at boot via the devfs service. to load modified rules after the system has booted, run the command:
service devfs restart
π FILES π
/etc/defaults/devfs.rulesβ Defaultdevfs.rulesconfiguration file π/etc/devfs.rulesβ Localdevfs.rulesconfiguration file. Rulesets in here override those in/etc/defaults/devfs.ruleswith the same ruleset number, otherwise the two files are effectively merged π
π¦ EXAMPLES π¦
to make all the partitions of da(4) devices readable and writable by their owner and the βusbβ group, the following rule may be used:
[localrules=10]
add path 'da*s*' mode 0660 group usb
The first line declares and starts a new ruleset, with the name localrules and the number 10 β¨
to give usbconfig(8) and libusb(3) enabled applications permission to all usb devices for their owner and the βusbβ group, a similar rule may be used:
add path 'usb/*' mode 0660 group usb
π₯ SEE ALSO π₯
π AUTHORS π
this manual page was written by Roland Smith (rsmith@xs4all.nl) π«Ά
π and thatβs the whole DEVFS.RULES(5) vibe β source/version: Debian, dated December 1, 2020. now go make /dev iconic, bestie πβ¨
π¦ where this page comes from
- freebsd 15.1: base 15.1
- nixpkgs unstable: source
- Copyright (c) 2004 Roland Smith <rsmith@xs4all.nl>
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms