Fact-checked by Grok 2 weeks ago

Device file

In Unix-like operating systems, a device file, also known as a special file or device node, is a type of file that acts as an for the to communicate with devices, device resources, or pseudo-devices, allowing programs to them through file operations such as reading and writing. These files are stored in the /dev directory and are distinguished from regular files by their special nature, where operations on the file are translated by the into device-specific actions via associated device drivers. Each device file is uniquely identified by a pair of integers—the major number, which corresponds to the device driver handling a class of devices, and the minor number, which specifies the particular instance of the device. Device files are primarily divided into two categories: character special files and block special files, with the distinction based on how is accessed and processed by the . devices (denoted by 'c' in file listings) support sequential, byte-stream access without built-in buffering, making them suitable for devices like keyboards, mice, terminals, and ports that handle one byte at a time. In contrast, devices (denoted by 'b') enable to in fixed-size blocks—typically 512 bytes or larger—facilitating efficient operations for media such as hard disks, SSDs, and optical drives, where the kernel manages buffering to optimize . A third category, pseudo-devices, represents virtual or software-emulated devices without physical hardware, such as /dev/null (a sink that discards input) or /dev/random (a source of non-deterministic random bytes for cryptographic purposes). In traditional Unix systems, device files were statically created and maintained, but modern Linux distributions use dynamic management tools like udev to populate and update the /dev directory in real-time based on kernel events. When hardware is added or removed, the kernel sends uevents via a netlink socket to udev, which applies rules from configuration files to create, name, or remove device nodes and symbolic links accordingly, ensuring the file system reflects the current hardware state without requiring reboots. This approach supports persistent naming conventions, such as linking devices by UUID or hardware path in subdirectories like /dev/disk/by-uuid, enhancing reliability in environments with hot-pluggable hardware. Device files embody the Unix philosophy of treating everything as a file, simplifying user and application interactions with diverse hardware through a uniform interface.

Overview

Definition and Purpose

In Unix-like operating systems, a device file, also known as a special file or device node, is a type of that provides an interface for user-space programs to interact with hardware devices, peripheral resources, or virtual (pseudo) devices through the . These files enable standard file input/output operations—such as opening, reading, writing, and closing—to be used for device control, abstracting complex hardware interactions behind a simple, consistent managed by device drivers. Unlike regular files, which store persistent data in filesystem blocks, device files do not allocate or hold data; they act solely as entry points or handles that route system calls to the appropriate modules without maintaining any file content or size. This design supports the of treating diverse system resources uniformly as files, allowing a single set of tools and system calls to manage both data storage and device operations seamlessly. The core mechanics of device files rely on two identifiers: a major number, which specifies the device driver or type responsible for handling requests (e.g., identifying disk controllers), and a minor number, which distinguishes individual instances or subunits of that device (e.g., specific partitions). These numbers are embedded in the file's inode and used by the kernel's (VFS) to dispatch operations correctly. Device files are categorized broadly into devices for byte-stream access and block devices for buffered block transfers, though their primary role remains enabling abstracted communication.

Historical Context

Device files were invented in the early 1970s by and at as a core component of the Unix operating system, designed to simplify input/output (I/O) operations by treating devices uniformly as files. This approach allowed devices to be accessed using the same read and write system calls as ordinary files, eliminating the need for specialized I/O instructions and enhancing system modularity and protection mechanisms. The concept drew influence from the operating system, particularly its I/O system calls, which Unix adapted to create a more streamlined file-based interface for devices. Device files first appeared in early Unix implementations on the and PDP-11 computers starting around , with their structure and usage well-established by the time of the influential 1974 paper describing the Unix system. By , released in 1979, device files were a standard feature, residing in the /dev directory and supporting both and device types through numbers for driver identification. The evolution of device files continued through (BSD) variants and culminated in formal standardization via the IEEE 1003.1 specification in 1988, which codified the uniform treatment of devices as special files, including character special files for stream-oriented devices and block special files for buffered access. This standard defined portable interfaces for device I/O, such as open(), read(), and write(), along with terminal-specific controls, ensuring consistency across systems while abstracting hardware details. Key milestones in the 1990s included the introduction of devfs in 2.0 in 1994, which automated device node creation within the kernel to address limitations of static /dev populations in growing hardware environments. In , the shift toward dynamic device management began in the late 1990s with the development of devfs, initiated in 1998 and integrated into the 2.4 kernel series in 2001, enabling runtime population of /dev based on detected hardware.

Device Files in Unix-like Systems

Character Devices

Character device files in Unix-like operating systems provide an interface for stream-oriented hardware devices that transfer data sequentially, one byte at a time, without support for random access or internal buffering. These devices include input sources like keyboards and mice, as well as output sinks such as serial ports and printers, allowing user-space applications to interact with hardware through standard file system operations. The sequential nature ensures that data flows in a continuous stream, making character devices suitable for real-time or line-buffered interactions where positioning within the data is not required. Each character device file is identified by a pair of numbers: the major number, which specifies the responsible for handling the device, and the minor number, which distinguishes between multiple instances or sub-devices managed by the same . For example, devices under /dev/tty use major number 4, with minor numbers differentiating controlling terminals (e.g., /dev/tty0) from consoles. This numbering scheme enables the to route I/O requests to the appropriate code efficiently during system calls. Common examples of character device files include /dev/null, which discards all data written to it and returns on reads (major 1, minor 3); /dev/zero, which generates an endless supply of bytes (0x00) upon reading while ignoring writes (major 1, minor 5); and /dev/random, a source of high-quality pseudorandom bytes derived from system entropy that may block if insufficient randomness is available (major 1, minor 8). These special files demonstrate the versatility of character devices for utility purposes beyond direct hardware mapping. Access to character devices occurs through POSIX-compliant system calls such as open(), read(), write(), and close(), declared in <unistd.h>, which translate to kernel-level invocations without seek functionality for data positioning. In the Linux , drivers for these devices are typically implemented as loadable modules that define a file_operations structure—an array of function pointers for handling operations like .open, .read, .write, and .—registered via mechanisms such as alloc_chrdev_region() and cdev_add(). This structure allows the kernel's (VFS) layer to dispatch requests to the driver's callbacks, ensuring seamless integration between user-space I/O and hardware-specific logic. Unlike block devices, which enable to fixed-size units, character devices prioritize unbuffered, byte-stream for latency-sensitive applications.

Block Devices

Block device files in systems represent hardware or virtual devices that support to data organized in fixed-size blocks, typically 512 bytes or 4 KB in size, such as hard disk drives and USB devices. These files enable the operating system to interact with storage media through buffered I/O operations, distinguishing them from character devices by allowing non-sequential data retrieval and modification. The implements buffering for block devices via the , a memory-based structure that temporarily holds data pages read from or to be written to the device, thereby enhancing efficiency by minimizing direct hardware interactions and enabling read-ahead and write-behind optimizations. This mechanism integrates with the subsystem, treating block I/O as part of to batch requests and reduce latency. Common examples include /dev/sda for the first disk (major number 8, minor number 0) and /dev/loop0 for the first device that maps a file to a block device (major number 7, minor number 0). Input/output operations on block device files are seekable, permitting the use of the lseek() to reposition the file offset anywhere within the device for , in contrast to the sequential streams typical of character devices. Device-specific controls, such as querying sizes or , are handled via ioctl() calls, with the kernel's block layer responsible for queuing, merging, and dispatching requests to the underlying driver for optimal throughput. Partitioning is encoded in the device file's minor number, where the base device (e.g., /dev/sda, minor 0) represents the entire disk, and partitions append sequential offsets (e.g., /dev/sda1, minor 1 for the first ), supporting up to 15 partitions per or disk in the kernel's naming scheme (with up to 4 primary partitions in traditional MBR layouts).

Special and Pseudo Devices

Special and pseudo devices in systems, particularly , are character device files that do not directly map to physical but instead simulate behaviors, provide interfaces, or expose services for management and application needs. These files operate under the same numbering scheme as standard character devices, allowing the to route I/O operations to appropriate handlers without involvement. Special devices include utilities like /dev/full, which simulates a full storage device by failing all write operations with an ENOSPC error, useful for testing application responses to disk-full conditions; it has major number 1 and minor number 7. Another example is /dev/urandom, a non-blocking source of pseudorandom numbers generated from kernel entropy pools, providing cryptographically secure output for applications requiring continuous random data without waiting for entropy depletion. Pseudo-devices encompass virtual interfaces such as pseudoterminals (PTYs), which emulate behavior for es like remote shells. The /dev/ptmx serves as the master pseudoterminal multiplexer, enabling dynamic allocation of PTY pairs upon opening; a obtains a master , and a corresponding slave appears in /dev/pts, facilitating applications like SSH for secure sessions over networks. Memory-based special devices allow controlled access to system resources: /dev/mem provides a interface to the physical , permitting examination or modification of contents, though its use is highly restricted to prevent corruption. Similarly, /dev/ports offers access to I/O , mimicking direct interactions for low-level system programming, typically created with major number 1 and minor number 4. Kernel interfaces like /dev/kmsg enable userspace interaction with the kernel's logging ring buffer, allowing reads of printk messages in a structured format and writes to inject log entries, which supports tools for monitoring system events without relying on legacy /proc/kmsg. Security considerations are paramount for these devices due to their potential for system compromise; for instance, /dev/mem access is limited to the superuser (requiring CAP_SYS_RAWIO privilege) since Linux 2.6.12 to mitigate risks from unauthorized memory manipulation. Permissions on files like /dev/ports and /dev/ptmx are similarly restricted, often to root or specific groups, ensuring only privileged processes can exploit their capabilities.

Device Node Creation and Management

In systems, device nodes in the /dev directory are traditionally created statically using the mknod command, which allows administrators to manually specify the type, number, and number for a device file. The command syntax is mknod <pathname> <mode> <major> <minor>, where <mode> indicates the device type—c for devices or b for devices—and the major and minor numbers identify the and device instance, respectively. For example, the is created with mknod /dev/null c 1 3, assigning it to the device with number 1 and number 3. Early Unix systems relied on manual management of the /dev directory through scripts like MAKEDEV, which automated the creation of multiple device nodes based on predefined configurations. Executed from within /dev, such as ./MAKEDEV std for standard devices or ./MAKEDEV ttyS0 for a specific , the script uses mknod internally to populate the directory with nodes for common hardware like consoles, disks, and storage devices. In these setups, administrators would run MAKEDEV during system installation or after kernel updates to ensure all necessary nodes were present, often editing the script to customize user, group, and permission settings. Device nodes created via mknod or MAKEDEV default to permissions of 0666 (read/write for owner, group, and others), but these are typically adjusted using chmod and chown to enforce security, with ownership set to root:root and permissions like crw-rw-rw- (666 in octal) for widely accessible devices such as /dev/null. For instance, after creation, chmod 666 /dev/null ensures broad readability and writability without execute privileges, while chown root:root /dev/null assigns system-level control. These settings prevent unauthorized access while allowing essential operations, and MAKEDEV scripts often apply them automatically for predefined devices. In static /dev configurations, hotplug events—such as device insertion—are handled by kernel-generated uevents that notify user-space scripts, which then invoke mknod or similar to create corresponding nodes on demand. The kernel emits these uevents via sockets when hardware changes occur, triggering hotplug handlers to probe for device details and populate /dev accordingly, maintaining compatibility with static setups. Cleanup in static setups involves manual removal of unused nodes using rm, as these files persist across reboots unless explicitly deleted, unlike temporary mounts where nodes may be removed upon unmounting. For example, after detaching a loop device, rm /dev/loop0 clears the entry, but in persistent static directories, administrators must monitor and prune obsolete nodes to avoid clutter or conflicts. Device nodes are identified by their major and minor numbers, which remain consistent for reuse upon recreation.

Naming Conventions and Filesystems

In systems, device file names follow conventions established by the and user-space tools, rather than strict mandates, which only require the presence of a /dev directory for device nodes without specifying naming patterns. For instance, and disk devices are typically named /dev/sd followed by a lowercase letter (e.g., /dev/sda for the first disk), with numeric suffixes for partitions (e.g., /dev/sda1), reflecting the order of detection by the kernel's block device layer. Similarly, terminal devices use prefixes like /dev/tty for virtual terminals (e.g., /dev/tty1) or /dev/ttyS for serial ports (e.g., /dev/ttyS0), while USB serial devices appear as /dev/ttyUSB followed by a number based on enumeration order. These patterns ensure predictable access for applications, though the exact assignment can vary by hardware configuration and boot sequence. For NVMe storage devices, the differs, using /dev/nvme followed by the controller number, , and (e.g., /dev/nvme0n1 for the first namespace on the first controller, and /dev/nvme0n1p1 for its first partition). The input subsystem introduces subdirectory structures for finer , with USB and other input devices (such as keyboards and mice) exposed under /dev/input/, where event interfaces are named /dev/input/event followed by a sequential number (e.g., /dev/input/event0). To enhance usability, creates symbolic links in subdirectories like /dev/input/by-id/ or /dev/input/by-path/, using attributes such as vendor IDs or physical paths for more stable references across reboots. provides no prescriptive guidelines for these names, leaving to implementation-specific mechanisms like udev rules, which define consistency without formal enforcement. Historically, the /dev directory was a static component of the root filesystem, populated with predefined device nodes via tools like mknod during system installation, limiting dynamism in early setups. In modern distributions, /dev is mounted as devtmpfs, a kernel-managed instance of the filesystem that resides in and automatically populates device nodes upon driver registration, enabling efficient, on-demand creation without persistent storage overhead. This shift supports hotplugging and reduces boot time, with further refining the population by applying rules for permissions and additional symlinks. Cross-distribution consistency in naming is achieved through (the current implementation of ), which uses standardized rulesets to generate predictable names based on device attributes like serial numbers or bus locations, mitigating issues from varying hardware detection orders. For example, rules in /lib//rules.d/ ensure that storage devices receive stable identifiers in /dev/disk/by-uuid/ or similar, promoting portability across variants while adhering to the kernel's core conventions.

Device Files in Other Operating Systems

DOS, Windows, and OS/2

In , device drivers are loaded during system initialization via DEVICE= statements in the file, which specify the drivers responsible for managing hardware such as disks, printers, and serial ports. Unlike systems, does not represent devices as files in the filesystem; instead, it uses reserved device names like for the console, for the printer, and for the auxiliary port, which are handled directly by the kernel without corresponding file entries. These names allow programs to redirect streams to devices transparently, but they cannot be used as filenames due to their special status. Windows, particularly the NT and 9x families, employs the Object Manager to organize devices within a hierarchical , where device objects are accessed via paths such as \Device\PhysicalDrive0 for the first physical disk. Users interact with storage through drive letters (e.g., C:) rather than direct file-like representations, as the Win32 subsystem abstracts these into the familiar view without exposing the underlying \Device\ paths to most applications. In , which retains compatibility, device handling blends legacy mechanisms with the 32-bit object model, but devices remain distinct from regular files. OS/2 handles devices similarly to through DEVICE= and BASEDEV= statements in , which load base device drivers essential for core hardware like keyboards and disks during boot. For advanced storage, introduces Installable File Systems (IFS) via IFS= statements in , which integrate device drivers with filesystem operations to support diverse media like HPFS volumes, though devices themselves are not uniformly treated as files. Programs in these systems access devices through specialized rather than a universal file interface: relies on Interrupt 21h calls for functions like reading from or writing to PRN, while Windows uses CreateFile with device paths (e.g., \.\PhysicalDrive0) to obtain handles for I/O operations. This approach imposes limitations, as devices lack the browsable, uniform file model of systems, requiring separate handling for device-specific operations and preventing seamless integration with standard file tools.

TOS and IOCS

In (The Operating System), the base system provides device access primarily through GEMDOS calls, such as Fopen, Fread, and Fwrite, which treat devices as files using reserved names like CON: for the console, AUX: for the port, and PRN: for the printer. These calls return handles for stream-like I/O operations, with standard handles ranging from to 5; for example, handle represents the console for both input and output, while negative handles like -1 (CON:), -2 (AUX:), and -3 (PRN:) are used specifically for character devices. Unlike systems, base TOS does not employ file nodes in a /dev directory but relies on these predefined handles and names for direct device manipulation without a hierarchical filesystem structure for devices. The Control System (IOCS) in TOS serves as a layer supporting the (Application Environment Services) and (Graphics Environment Manager), primarily through the (Basic Input/Output System) for core peripherals and the XBIOS (extended BIOS) for advanced hardware features like enhanced video and sound. functions enable low-level access to devices via integer device codes passed as parameters; for instance, Bconout outputs a character to a specified device, where code 2 denotes the console, 5 the screen, 4 the , 0 the printer, and 1 the auxiliary port. XBIOS extends this with functions like Mediach (code 8), which detects media changes on disk drives (e.g., returning 0 if unchanged, 1 if possibly changed, or 2 if definitely changed for drives A, B, etc., coded as 0, 1, etc.). These mechanisms abstract hardware details, allowing AES/GEM applications to perform I/O without direct register manipulation, though programmers often use supervisor mode via the Super call for privileged access. Later extensions like (MiNT is Now TOS), developed in the early and evolving into FreeMiNT, enhance TOS compatibility while introducing features, including /dev-like support for device special files to enable portable Unix applications on hardware. FreeMiNT maintains GEMDOS compatibility but adds a multitasking with device drivers mimicking Unix conventions, such as /dev/null for discarding output and /dev/tty for terminal access, facilitating ports of tools like and . This evolution, driven by community efforts post-Atari's market exit, bridges TOS's proprietary model with Unix standards without requiring file nodes in base TOS.

Implementations and Variations

Traditional Implementations

In traditional systems, the /dev directory was statically populated with device nodes at time using scripts such as MAKEDEV, which invoked the mknod command to create entries for all anticipated devices based on predefined numbers. This approach, prevalent in early kernels up to version 2.4, ensured a fixed set of device files was available immediately after system initialization, supporting essential operations like mounting filesystems and accessing peripherals without runtime generation. However, it required system administrators to manually update scripts for new , often leading to incomplete or outdated configurations on diverse systems. An early step toward dynamic management appeared in BSD variants with the introduction of devfs, an in-kernel virtual filesystem that generated device nodes on demand rather than pre-populating them. First implemented in 2.0 in 1994, devfs integrated device creation directly into the kernel's vnode interface, allowing nodes to appear only when drivers registered devices, thus reducing unnecessary filesystem clutter while maintaining compatibility with traditional /dev access. This mechanism provided a more efficient alternative to static scripts in environments with variable hardware, influencing subsequent Unix derivatives by shifting device enumeration from user-space tools to kernel-level automation. Linux followed a similar path with its own devfs, introduced in kernel version 2.3.46 in 1999 by developer Richard Gooch. This in-kernel filesystem dynamically created and managed device nodes as drivers registered devices, aiming to address the limitations of static population for hotpluggable hardware. However, due to issues with permissions, naming consistency, and integration challenges, devfs saw limited adoption and was deprecated in kernel 2.6.13 (2005), with full removal in kernel 3.5 (2012). The static /dev approach eventually revealed performance drawbacks, including filesystem bloat from thousands of unused nodes for potential devices, which consumed disk space and complicated maintenance as proliferated in the . This inefficiency, coupled with the need for unique major/minor numbers across all possible peripherals, motivated the adoption of around 2003 for 2.6, enabling dynamic node creation based on detected to mitigate resource waste.

Modern and Dynamic Approaches

In modern operating systems, dynamic device file management has evolved to handle hotplug events, automate naming, and enforce security without relying on static configurations. A key advancement in is , a userspace daemon introduced in 2003 as a successor to earlier hotplug mechanisms, which processes device events to create, remove, or modify device nodes in /dev. uses configurable rules files, typically in /etc/udev/rules.d/, to set device names, permissions, , and symlinks based on attributes like vendor ID or device class during hotplug operations, enabling consistent handling of or USB devices. This approach addresses the limitations of traditional static device node creation by responding in real-time to hardware changes, reducing administrative overhead. Integration with , starting from version 197 around 2013 and widely adopted by 2015, further enhances predictability in device naming, particularly for network interfaces. Systemd-udev assigns stable names like enp0s3—indicating an Ethernet device on bus 0, slot 3—based on topology such as paths or slot indices, preventing the kernel's eth0-style from shifting on reboots or reconfigurations. This scheme improves automation in cloud and virtualized environments by ensuring scripts and services reference consistent identifiers. Beyond , other Unix variants have implemented dynamic improvements to their device file systems. introduced an enhanced devfs in 2009, which automatically populates /dev with device nodes on demand, supports path-based access for easier identification, and integrates permission controls directly in the kernel for faster hotplug response compared to earlier implementations. In (now ), the devfs file system pairs with the devfsadm utility, which dynamically manages /dev entries for hotplugged devices, generates links in /dev/fd and /dev/rmt, and cleans up stale nodes without manual intervention. These tools replace legacy commands like drvconfig, providing a unified for physical and logical devices. Security enhancements in these systems leverage mandatory access controls to restrict sensitive device files. In , SELinux policies deny unauthorized read/write access to /dev/kmem, which exposes and poses risks for rootkits, by labeling it with contexts like system_u:object_r:kmem_device_t and enforcing domain separation—no user domain can map or access it without explicit allowances. Similarly, profiles confine applications by path, such as denying rw access to /dev/kmem or other block devices via rules like "deny /dev/kmem rw," preventing privilege escalations in confined processes. These mechanisms integrate with dynamic managers like , applying policies during device creation to mitigate exploits targeting /dev. Dynamic approaches also extend to containerized environments, where tools like use bind-mounts to selectively expose host /dev entries into isolated namespaces, ensuring containers access only necessary devices (e.g., mounting /dev/null or GPU nodes) without full . This addresses post-2010 gaps in traditional systems by supporting and , where static /dev population would fail under rapid hardware scaling in clouds.

References

  1. [1]
    6.1 About Device Files
    The /dev directory contains device files (also sometimes known as device special files and device nodes) that provide access to peripheral devices such as hard ...
  2. [2]
    18. UNIX Devices
    In UNIX, hardware devices are accessed as files, stored under /dev. They are either block devices (random access) or character devices (serial access).
  3. [3]
    22 Dynamic Kernel Device Management with udev
    With udev , the /dev directory reflects the current state of the kernel. Every kernel device has one corresponding device file. If a device is disconnected from ...
  4. [4]
    Chapter 9 The File system
    9.5 Device Special Files. Linux, like all versions of Unix TM presents its hardware devices as special files. So, for example, /dev/null is the null device ...Missing: definition | Show results with:definition
  5. [5]
    Device names, device nodes, and major/minor numbers - IBM
    The device driver uses the minor number <minor> to distinguish individual physical or logical devices. For example, the DASD device driver assigns four minor ...
  6. [6]
    Major and Minor Numbers - Linux Device Drivers, Second Edition ...
    The major number identifies the driver associated with the device. For example, /dev/null and /dev/zero are both managed by driver 1.
  7. [7]
    [PDF] The UNIX Time- Sharing System
    The UNIX Time-. Sharing System. Dennis M. Ritchie and Ken Thompson. Bell Laboratories. UNIX is a general-purpose, multi-user, interactive operating system for ...
  8. [8]
    [PDF] The Evolution of the Unix Time-sharing System* - Nokia
    Thompson, R. H. Canaday, and Ritchie developed, on blackboards and scribbled notes, the basic design of a file system that was later to become the heart of Unix ...
  9. [9]
    Unix Seventh Edition Manual - Amazon S3
    The files are those that were shipped on the distribution tapes. The printed version came in three volumes: 1, 2A, 2B. Volume one has the traditional "man pages ...
  10. [10]
    [PDF] IEEE standard portable operating system interface for computer ...
    The name POSIX is usually used for the IEEE Std 1003.1-1988 instead of the name 1003.1, because the latter is too easily confused with the name of the.
  11. [11]
    Rethinking /dev and devices in the UNIX kernel - USENIX
    When DEVFS in FreeBSD was initially presented at a BoF at the 1995 USENIX ... Even if DEVFS is not desired, other 4.4BSD derived UNIX variants would ...
  12. [12]
    [PDF] The Linux Device File-System - LWN.net
    The Linux implementation of devfs was initiated and developed by the author in January 1998, and was accepted for inclusion in the official kernel in. February ...
  13. [13]
    Character Device Files - The Linux Documentation Project
    Each device is represented in the kernel by a file structure, which is defined in linux/fs.h. Be aware that a file is a kernel level structure and never appears ...
  14. [14]
    Linux Device Drivers, 2nd Edition: Chapter 3: Char Drivers - XML.com
    Char devices are accessed through names in the filesystem. Those names are called special files or device files or simply nodes of the filesystem tree; they are ...
  15. [15]
    4.1. Character Device Drivers - The Linux Documentation Project
    char devices are accessed through device files, usually located in /dev[1]. The major number tells you which driver handles which device file.
  16. [16]
    devices.txt - The Linux Kernel Archives
    Older kernels had /dev/ramdisk (1, 1) here. /dev/initrd refers to a RAM disk which was preloaded by the boot loader; newer kernels use /dev/ram0 for the initrd.
  17. [17]
    16. Block Drivers - Linux Device Drivers, 3rd Edition [Book] - O'Reilly
    The Linux kernel sees block devices as being fundamentally different from char devices; as a result, block drivers have a distinct interface and their own ...
  18. [18]
    Devices - The Linux Documentation Project
    A device file is a file with type c ( for "character" devices, devices that do not use the buffer cache) or b (for "block" devices, which go through the buffer ...
  19. [19]
    Chapter 10 Page Frame Reclamation - The Linux Kernel Archives
    The page cache is a set of data structures which contain pages that are backed by regular files, block devices or swap. There are basically four types of pages ...10.2 page Cache · 10.2. 3 adding Pages To... · 10.3 lru Lists
  20. [20]
    Linux allocated devices (4.x+ version)
    Network Block Device is somehow similar to loopback devices: If you read from it, it sends packet across network asking server for data. If you write to it, it ...
  21. [21]
    lseek(2) - Linux manual page
    ### Summary: Does lseek work on block device files?
  22. [22]
    The ioctl Method - Linux Device Drivers, Second Edition - O'Reilly
    Block devices can be acted on by using the ioctl system call. The only relevant difference between block and char ioctl implementations is that block drivers ...
  23. [23]
    Linux Device Drivers, 2nd Edition: Chapter 12: Loading Block Drivers
    User-mode access to block devices usually is implicit in filesystem operations they perform, and those operations clearly benefit from I/O buffering. However, ...
  24. [24]
    mem(4) - Linux manual page - man7.org
    /dev/mem is a character device file that is an image of the main memory of the computer. It may be used, for example, to examine (and even patch) the system.
  25. [25]
    full(4) - Linux manual page - man7.org
    The file /dev/full has major device number 1 and minor device number 7. Writes to the /dev/full device fail with an ENOSPC error.
  26. [26]
    random(4) - Linux manual page - man7.org
    The character special files /dev/random and /dev/urandom (present since Linux 1.3.30) provide an interface to the kernel's random number generator. The file / ...Missing: full | Show results with:full
  27. [27]
    pty(7) - Linux manual page - man7.org
    A pseudoterminal (sometimes abbreviated "pty") is a pair of virtual character devices that provide a bidirectional communication channel.
  28. [28]
    pts(4) - Linux manual page - man7.org
    When a process opens /dev/ptmx, it gets a file descriptor for a pseudoterminal master and a pseudoterminal slave device is created in the /dev/pts directory.
  29. [29]
    port(4) - Linux man page - Die.net
    port is similar to mem, but the I/O ports are accessed. It is typically created by: mknod -m 660 /dev/port c 1 4 chown root:mem /dev/port ...
  30. [30]
    dev/kmsg
    Every write() to the opened device node places a log entry in the kernel's printk buffer. The logged line can be prefixed with a <N> syslog prefix, which ...
  31. [31]
    Creating device nodes - IBM
    You can use the mknod command to create device nodes. To create a device node, use a command of the form: # mknod <node> <mode> <major> <minor>
  32. [32]
    MAKEDEV - create devices - Ubuntu Manpage
    MAKEDEV is a script that will create the devices in /dev used to interface with drivers in the kernel.
  33. [33]
    Understanding /dev | Linux Journal
    Jun 1, 1998 · Instead of calling mknod directly, you can use a script called MAKEDEV that already knows the device types, numbers, permissions and ownership ...<|separator|>
  34. [34]
    Managing Dynamic Device Naming - USENIX
    "udev" is a separate application which is run in response to hotplug events; it uses the above two modules to gather the information it needs, then creates or ...
  35. [35]
    hotplug - Dynamic Hardware Configuration - lumensoutdoors.org
    Oct 8, 2004 · Instead of just handling device node creation and permissions, hotplug allows arbitrary scripts to be run. hotplug was introduced in the 2.4 ...<|separator|>
  36. [36]
    How to remove inactive block device from the /dev?
    Sep 26, 2017 · You can remove each path to the device from the SCSI subsystem echo 1 > /sys/block/sde/device/delete. Note that the entire command needs to ...How to get over "device or resource busy"?How to clean up a Linux system to free up disk space?More results from unix.stackexchange.comMissing: setups | Show results with:setups
  37. [37]
    Device Names - The Linux Documentation Project
    The disk device names without a trailing digit refer to the whole disk (e.g. /dev/sda) while those with a trailing digit refer to one of the 15 allowable ...
  38. [38]
    udev - Freedesktop.org
    The name of a device node cannot be changed by udev, only additional symlinks can be created. SYMLINK ¶. The name of a symlink targeting the node. Every ...
  39. [39]
    9.3. Overview of Device and Module Handling - Linux From Scratch!
    In February 2000, a new filesystem called devfs was merged into the 2.3.46 kernel and was made available during the 2.4 series of stable kernels. Although it ...
  40. [40]
    Tmpfs — The Linux Kernel documentation
    Tmpfs is a file system which keeps all of its files in virtual memory. Everything in tmpfs is temporary in the sense that no files will be created on your hard ...Missing: devtmpfs | Show results with:devtmpfs
  41. [41]
    Chapter 2. Persistent naming attributes | Managing storage devices | 9
    You can create custom udev rules to specify how devices should be named based on various attributes such as serial numbers, World Wide Name (WWN) identifiers, ...
  42. [42]
    Description of the CONFIG.SYS file
    This file in DOS is responsible for installing device drivers. "What's a device driver" you might say? A device driver is a small program that controls a device ...
  43. [43]
    [PDF] Device Driver for the MS-DOS Operating System Installation Guide ...
    Software configuration involves the addition of several DEVICE statements to your CONFIG.SYS file in the root directory. These device statements specify the ...
  44. [44]
    Naming Files, Paths, and Namespaces - Win32 apps | Microsoft Learn
    Aug 28, 2024 · Do not use the following reserved names for the name of a file: CON, PRN, AUX, NUL, COM1, COM2, COM3, COM4, COM5, COM6, COM7, COM8, COM9 ...
  45. [45]
    Cannot create a directory named "Aux" or starting ... - Stack Overflow
    Mar 25, 2016 · Do not use the following reserved names for the name of a file: CON, PRN, AUX, NUL, COM1, COM2, COM3, COM4, COM5, COM6, COM7, COM8, COM9, LPT1, ...Windows and renaming folders, the 'con' issue - Stack OverflowWhat characters are forbidden in Windows and Linux directory ...More results from stackoverflow.com
  46. [46]
    DEVICE_OBJECT (wdm.h) - Windows drivers | Microsoft Learn
    Feb 12, 2024 · Used by the I/O manager to track the number of open handles for the device that are associated with the device object. This allows the I/O ...
  47. [47]
    windows - Path prefixes \??\ and \\?\ - Stack Overflow
    Apr 13, 2014 · In NT, \??\ is a path prefix that stands for the object directory that's reserved for devices, or more specifically, device aliases (made ...WINAPI: Get a List of Devices by their NT name - Stack OverflowFinding Windows DOS Device File Paths - python - Stack OverflowMore results from stackoverflow.com
  48. [48]
    How do Windows NT-based operating systems address devices?
    Jul 8, 2011 · The "rooted file system" you mentioned is called the Object Manager namespace. I found this after clicking through the WinObj link and doing ...Which drive is \Device\Harddisk1\DR1? - Super UserWhat's the shortcut to Device Manager? - windows 7 - Super UserMore results from superuser.com
  49. [49]
    CONFIG.SYS - BASEDEV Statements - EDM2
    The Base Device Drivers are needed by OS/2 to install elementary services, like your hard disk, keyboard, etc. The Base Device Drivers are the first entries ...
  50. [50]
    OS/2 2.0 CONFIG.SYS DESCRIPTION - OS2World.Com Wiki
    May 5, 2024 · Your config.sys may contain various device drivers for various DOS related devices based upon your systems hardware configuration. This is a VGA ...
  51. [51]
    IFS - Installable File System Overview - EDM2
    Apr 5, 2023 · Installable File System (IFS) Mechanism defines the relationships among the operating system, the file systems, and the device drivers.
  52. [52]
    INT 21 - DOS Function Dispatcher
    INT 21,0 Program terminate, INT 21,1 Keyboard input with echo, INT 21,2 Display output, INT 21,3 Wait for auxiliary device input, INT 21,4 Auxiliary output.
  53. [53]
    CreateFileA function (fileapi.h) - Win32 apps | Microsoft Learn
    Feb 9, 2023 · CreateFile provides for creating a file or device handle that is either synchronous or asynchronous. A synchronous handle behaves such that I/O ...
  54. [54]
    A layman's explanation for "Everything is a file" — what differs from ...
    Jul 6, 2014 · "Everything is a file" means that even devices have their filename and path in Unix and Unix-like systems, and that this allows for common tools to be used on ...linux - History of the saying "Everything is a file"is linux : everything is a file reducing performance?More results from unix.stackexchange.com
  55. [55]
    Why is "Everything is a file" unique to the Unix operating systems?
    Dec 3, 2011 · Windows and OS X operate on files, but Windows does not treat devices as files, which is part of what "everything is a file" means. Share.
  56. [56]
    [PDF] ATARI GEMDOS REFERENCE MANUAL April 4, 1986 TABLE OF ...
    Apr 4, 1986 · Standard handles range from 0 to 5, and may refer to character devices or files. Non-standard handles start at 6, and refer only to files.
  57. [57]
    The documentation for TOS: About the BIOS - FreeMiNT
    The BIOS (BasicInput/Output System) functions represent the lowest level interface between the Atari's operating system and hardware, and are called via the ...
  58. [58]
    Unix-like kernel for Atari ST and compatible computers - GitHub
    Bootable builds: Download Per CPU builds: Download TOS USB drivers: Download. This is FreeMiNT. Please see the file COPYING for licensing conditions.Missing: device | Show results with:device
  59. [59]
    7.3. Overview of Device and Module Handling - Linux From Scratch!
    Linux uses Udev to create device nodes only for detected devices, using devtmpfs. Udevd modifies device nodes based on rules, and drivers register with sysfs.Missing: hotplug | Show results with:hotplug
  60. [60]
    Managing Kernel Objects - Windows drivers | Microsoft Learn
    Dec 14, 2021 · The Windows Object Manager controls objects that are part of the kernel-mode operating system. An object is a collection of data that the operating system ...Missing: NT 3.1 implementation
  61. [61]
    Guide to OpenVMS File Applications — VMS Software, Inc.
    This document is intended for applications programmers and designers who create or maintain application programs that use RMS files.Missing: 1970s | Show results with:1970s
  62. [62]
    [PDF] VMS File System Internals - Bitsavers.org
    1 Introduction to the VMS File System. 1.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3. 1.2 Tasks of a File System ...Missing: precursors | Show results with:precursors
  63. [63]
    Udev: Introduction to Device Management In Modern Linux System
    Dec 18, 2009 · Udev is the device manager for the Linux 2.6 kernel that creates/removes device nodes in the /dev directory dynamically.
  64. [64]
    linux - What problems does udev actually solve? - Super User
    Dec 11, 2013 · With a static /dev , you need to allocate a major/minor number for every potential device that could exist. These numbers need to be unique ...Missing: performance | Show results with:performance
  65. [65]
    udev(7) - Linux manual page - man7.org
    udev is for dynamic device management, supplying device events, managing permissions, and creating symlinks or renaming network interfaces.
  66. [66]
    [PDF] Hotplugging with udev - Bootlin
    Aug 15, 2017 · Udev automatically creates/removes device entries in /dev/ based on inserted/removed devices, using rules to define device files and execute ...
  67. [67]
    Predictable Network Interface Names - Systemd
    Starting with v197 systemd/udev will automatically assign predictable, stable network interface names for all local Ethernet, WLAN and WWAN interfaces.
  68. [68]
    11.3. Understanding the Predictable Network Interface Device Names
    The names have two-character prefixes based on the type of interface. The names have the following types: PCI geographical location.
  69. [69]
    devfs - DragonFlyBSD
    May 23, 2010 · This wikipage discusses some differences of the DragonFly implementation with FreeBSD's and a little about porting. The DragonFly devfs ...
  70. [70]
    devfsadm - man pages section 1M: System Administration Commands
    devfsadm maintains the /dev namespace. It replaces the previous suite of devfs administration tools including drvconfig(1M), disks(1M), tapes(1M), ports(1M), ...
  71. [71]
    devfsadm(1M)
    Jun 23, 2008 · devfsadm(1M) maintains the /dev namespace. It replaces the previous suite of devfs administration tools including drvconfig(1M), disks(1M), ...
  72. [72]
    [PDF] Protecting the Android TCB with SELinux
    Aug 19, 2014 · • No domain can read/write /dev/kmem or. /dev/mem. • Only init can modify proc security settings. (kptr_restrict, mmap_min_addr ...
  73. [73]
    AppArmor - The Linux Kernel documentation
    AppArmor is MAC style security extension for the Linux kernel. It implements a task centered policy, with task “profiles” being created and loaded from user ...Missing: files /dev/ kmem
  74. [74]
    Bind mounts - Docker Docs
    When you use a bind mount, a file or directory on the host machine is mounted from the host into a container. By contrast, when you use a volume, ...When to use bind mounts · Syntax · Start a container with a bind...
  75. [75]
    AppArmor security profiles for Docker
    AppArmor (Application Armor) is a Linux security module that protects an operating system and its applications from security threats.Missing: SELinux | Show results with:SELinux