# CommandSection

title: DESCRIPTION
content:
The <b>rolldice</b> command is a classic Unix utility designed to simulate the rolling of one or more dice. It is often part of the <i>bsdgames</i> package, providing a simple yet engaging way to get random dice outcomes directly from the terminal. By default, <b>rolldice</b> rolls a single six-sided die and displays the result visually using ASCII art, making it easy to discern the outcome at a glance. Users can specify different combinations of dice, such as rolling multiple dice with a custom number of sides (e.g., <i>2d6</i> for two six-sided dice or <i>1d20</i> for a single twenty-sided die). The command supports various options to control output, like suppressing the graphical display in favor of a numeric total or redrawing dice on capable terminals, making it versatile for both casual use and scripting.


title: CAVEATS
content:
The ASCII art display may not render correctly on all terminals, especially those that do not support certain characters or cursor positioning. The '<b>-r</b>' option's functionality depends on <i>curses</i> or similar terminal capabilities being present and correctly configured. The output of the command is based on pseudo-random number generation, which is sufficient for typical casual use but not for cryptographic purposes.


title: DEFAULT BEHAVIOR
content:
If no arguments are provided, <b>rolldice</b> defaults to rolling a single 6-sided die (equivalent to '1d6').


title: MULTIPLE ROLLS
content:
You can specify multiple dice rolls in a single command, e.g., '<b>rolldice 2d6 d20</b>' will roll two 6-sided dice and one 20-sided die, showing results for each combination.


title: HISTORY
content:
<b>rolldice</b> is a venerable part of the <i>bsdgames</i> collection, a suite of classic games and fun utilities that originated on BSD Unix systems. Its development dates back decades, making it one of the earliest command-line entertainment tools. Over time, as Unix-like operating systems evolved, <i>bsdgames</i>, including <b>rolldice</b>, were ported to various platforms, notably Linux. It remains a popular, light-hearted utility, showcasing the simplicity and utility of command-line tools for recreational purposes.


title: PARAMETERS
content:
<b><b>--binary</b> <file>, <b>-f</b> <file></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Specify target binary file(s) for analysis. Multiple files can be provided.<br><br><b><b>--depth</b> <n></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Set the maximum number of instructions allowed for a gadget (default: 6).<br><br><b><b>--badbytes</b> <bytes></b><br>&nbsp;&nbsp;&nbsp;&nbsp;A comma-separated list of hexadecimal bytes to avoid in gadgets (e.g., <i>00,0a,0d</i>). Gadgets containing these bytes will be filtered out.<br><br><b><b>--raw</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Search for gadgets in a raw binary file without parsing its header or structure.<br><br><b><b>--opcode</b> <bytes></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Search for a specific sequence of hexadecimal opcode bytes within the binary.<br><br><b><b>--string</b> <string></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Search for a specific string literal within the binary's data or code sections.<br><br><b><b>--memdump</b> <file></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Search gadgets in a memory dump file, useful for analyzing live processes or crash dumps.<br><br><b><b>--check-ret</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Verify that identified <b>ret</b> instructions are valid returns (e.g., not part of another instruction).<br><br><b><b>--all</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Show all discovered gadgets, including those not ending with a <b>ret</b> instruction.<br><br><b><b>--offset</b> <address></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Add a specified hexadecimal offset to all reported gadget addresses, useful for ASLR bypass or custom base addresses.<br><br><b><b>--rop-filter</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Filter out non-ROP-friendly gadgets (e.g., those that significantly modify the stack pointer in an undesirable way).<br><br><b><b>--limit</b> <n></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Limit the maximum number of gadgets to find and display.<br><br><b><b>--thumb</b>, <b>--arm</b>, <b>--mips</b>, <b>--x86</b>, <b>--x64</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Force a specific architecture for disassembly, overriding the tool's auto-detection.<br><br><b><b>--console</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Enter an interactive console mode for searching gadgets.<br><br><b><b>--nocolor</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Disable colored output for plain text terminals or scripting.<br><br><b><b>--silent</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Suppress all non-gadget related output, showing only the gadget list.<br><br><b><b>-h</b>, <b>--help</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Display a comprehensive help message and exit.<br><br><b><b>-v</b>, <b>--version</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Show the program's version number and exit.<br><br>


title: DESCRIPTION
content:
<b>ropgadget</b> is a powerful command-line tool designed for finding <I>Return-Oriented Programming</I> (ROP) gadgets in executable binaries. ROP is a bypass technique used to circumvent security mitigations like <I>Non-Executable</I> (NX) stacks and <I>Address Space Layout Randomization</I> (ASLR), allowing an attacker to execute arbitrary code.<br><br>Instead of injecting shellcode, an attacker chains together small sequences of instructions (gadgets) already present in the program's memory, each ending with a <b>ret</b> instruction. <b>ropgadget</b> disassembles the binary, scans for specific instruction sequences (often ending in <b>ret</b>), and outputs their addresses along with the instructions.<br><br>It supports various architectures (<i>x86, x64, ARM, MIPS, PowerPC</i>) and file formats (<i>ELF, PE, Mach-O</i>). This tool is essential for security researchers, exploit developers, and reverse engineers during vulnerability analysis and exploit creation, providing the building blocks for crafting complex ROP chains.


title: CAVEATS
content:
<b>ropgadget</b> might produce a large number of gadgets, requiring manual filtering and analysis to identify truly useful ones. False positives can occur, especially when using options like <b>--all</b>. Its effectiveness is limited by the quality of its internal disassembler and the presence of suitable <b>ret</b> instructions in the binary. It provides building blocks, but does not guarantee exploitability; crafting an exploit still requires deep understanding of the vulnerability and target architecture.


title: USAGE CONTEXT
content:
<b>ropgadget</b> is primarily used in the exploit development lifecycle. After identifying a memory corruption vulnerability (e.g., a <i>buffer overflow</i>), security researchers use it to find suitable ROP gadgets within a target binary's address space. These gadgets are then chained together to achieve specific goals, such as calling <b>system("/bin/sh")</b> or bypassing ASLR, without injecting new code.


title: OUTPUT FORMAT
content:
The default output typically lists the hexadecimal address of the gadget followed by its disassembled instructions. For example: <br><i>0x00401234: pop rdi ; ret</i><br>This format is designed for easy parsing and integration into exploit scripts, commonly used with libraries like <i>pwntools</i>.


title: HISTORY
content:
<b>ropgadget</b> was developed by <i>Jonathan Salwan</i> (<I>@JonathanSalwan</I>) as a standalone tool. It quickly gained popularity within the security community, particularly for exploit development, due to the increasing prevalence of <I>Address Space Layout Randomization</I> (ASLR) and <I>Non-Executable</I> (NX) stack mitigations. Its development reflects the ongoing evolution in exploit techniques, providing a crucial tool for <I>Return-Oriented Programming</I> (ROP) attacks and defense research.


title: SYNOPSIS
content:
<b>ropper</b> [<i>options</i>] <b>-f</b> <i>&lt;file&gt;</i><br><b>ropper</b> [<i>options</i>] <b>--file</b> <i>&lt;file&gt;</i> [<b>--search</b> <i>&lt;gadget_string&gt;</i>]


title: PARAMETERS
content:
<b><b>-f</b>, <b>--file</b> <i>&lt;file&gt;</i></b><br>&nbsp;&nbsp;&nbsp;&nbsp;<i>Specifies the target binary file to analyze. This option is mandatory.</i><br><br><b><b>-s</b>, <b>--search</b> <i>&lt;string&gt;</i></b><br>&nbsp;&nbsp;&nbsp;&nbsp;<i>Searches for gadgets containing a specific instruction sequence. For example, <b>"pop rdi; ret"</b>.</i><br><br><b><b>-S</b>, <b>--string</b> <i>&lt;string&gt;</i></b><br>&nbsp;&nbsp;&nbsp;&nbsp;<i>Searches for ASCII or wide string references within the binary.</i><br><br><b><b>-I</b>, <b>--info</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;<i>Displays detailed information about the target binary, such as architecture, OS, file type, and entry point.</i><br><br><b><b>-g</b>, <b>--gadgets</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;<i>Finds and displays all ROP gadgets within the binary. This is often the default behavior if no search string is provided.</i><br><br><b><b>-c</b>, <b>--console</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;<i>Enters an interactive console mode for dynamic analysis and gadget searching.</i><br><br><b><b>--badbytes</b> <i>&lt;bytes&gt;</i></b><br>&nbsp;&nbsp;&nbsp;&nbsp;<i>Specifies bytes to avoid in gadget addresses or instructions, typically in hexadecimal format (e.g., <b>"000a0d"</b>).</i><br><br><b><b>--nocolor</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;<i>Disables colored output for environments that do not support ANSI escape codes or for clearer parsing.</i><br><br><b><b>-h</b>, <b>--help</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;<i>Displays the help message and exits.</i><br><br>


title: DESCRIPTION
content:
<b>ropper</b> is a powerful tool designed to assist in <i>Return-Oriented Programming (ROP)</i> exploit development.<br>It meticulously analyzes executable files (supporting <b>ELF</b>, <b>PE</b>, and <b>Mach-O</b> formats) to identify and extract "gadgets".<br>A gadget is a short sequence of instructions typically ending with a <b>ret</b> instruction, which can be chained together to execute arbitrary code, bypassing exploit mitigations like <i>Data Execution Prevention (DEP)</i> or <i>No-Execute (NX)</i>.<br>Beyond merely finding gadgets, <b>ropper</b> offers extensive features such as searching for specific instruction sequences or string references, displaying callable functions, and providing system call information.<br>It supports a wide range of architectures including <b>x86</b>, <b>x86_64</b>, <b>ARM</b>, <b>ARM64</b>, <b>MIPS</b>, and <b>MIPS64</b>, making it an indispensable asset for penetration testers and exploit developers in security research and CTF challenges.


title: CAVEATS
content:
<b>ropper</b>'s effectiveness is contingent on the availability and quality of gadgets within the target binary.<br>While powerful, it is primarily a gadget-finding tool; successful <i>ROP chain construction</i> often requires additional understanding of program flow, memory layout, and system calls.<br>For position-independent executables (PIE), <i>Address Space Layout Randomization (ASLR)</i> must often be bypassed separately before gadgets can be reliably used.


title: INTERACTIVE CONSOLE MODE
content:
The <b>--console</b> (<b>-c</b>) option allows users to enter an interactive session after loading a binary. This mode provides a command-line interface to perform various searches and analyses on the loaded file without having to restart <b>ropper</b> for each query, significantly speeding up the analysis process.


title: ROP CHAIN CONSTRUCTION SUPPORT
content:
While <b>ropper</b> doesn't build full ROP chains automatically, its output is highly structured and easily parsable. It provides the exact addresses and instruction sequences of found gadgets, which are essential building blocks for scripting and constructing complex ROP chains using external tools or custom scripts.


title: HISTORY
content:
<b>ropper</b> emerged as a dedicated solution to streamline the previously manual and often tedious process of finding <i>ROP gadgets</i>.<br>It quickly gained traction within the cybersecurity community, especially in <i>Capture The Flag (CTF)</i> competitions and exploit development, due to its efficiency and multi-architecture support.<br>Its development has focused on providing a comprehensive, user-friendly tool for a critical aspect of modern binary exploitation.


title: SEE ALSO
content:
<b>objdump</b>(1), <b>readelf</b>(1), <b>gdb</b>(1), <b>pwntools</b> (Python exploitation framework)


title: DESCRIPTION
content:
ROT13 is a simple letter substitution cipher that replaces a letter with the 13th letter after it in the English alphabet. It is a special case of the <I>Caesar cipher</I>.<br><br>Applying ROT13 to an already ROT13-encoded text restores the original text, as 26 (the number of letters in the English alphabet) is a multiple of 13 (13+13=26), making ROT13 its own inverse. The <B>rot13</B> command, when available, reads text from standard input or specified files, applies this substitution, and writes the resulting text to standard output. It's often used for obfuscating jokes, spoilers, or puzzle answers in online forums to prevent accidental viewing, rather than for secure encryption, as it's trivial to decode.<br><br>Many modern Linux distributions do not include a standalone <B>rot13</B> command by default; its functionality is commonly achieved using other tools like <B>tr</B> or <B>recode</B>.


title: CAVEATS
content:
The <B>rot13</B> command is not a standard utility in many modern Linux distributions. Its functionality is commonly achieved using the <B>tr</B> command (e.g., <I>echo "text" | tr 'A-Za-z' 'N-ZA-Mn-za-m'</I>) or through specialized text processing tools like <B>recode</B>.


title: <I>SELF-RECIPROCAL NATURE</I>
content:
Applying the ROT13 transformation twice to any text restores the original text. This is because 13 + 13 = 26, the total number of letters in the English alphabet, meaning each letter cycles back to its original position after two transformations.


title: <I>NOT FOR SECURITY</I>
content:
ROT13 is a trivial cipher and provides no cryptographic security. It is solely intended for casual obfuscation to prevent accidental viewing, not to protect sensitive information.


title: HISTORY
content:
ROT13 originated in the mid-1980s on <I>Usenet</I> as a way to obscure potentially offensive or spoiler content, such as jokes, puzzle answers, or plot twists. Its simplicity made it easy to implement and decode without specialized software, and its self-reciprocal nature meant a single command could both encode and decode. While not a strong encryption method, it became a standard convention for light obfuscation in online communities. Implementations of the <B>rot13</B> command on Linux are often simple scripts or part of larger utility packages, rather than a fundamental core utility, reflecting its historical usage context.


title: SYNOPSIS
content:
<b>route</b> [<i>options</i>] [<i>command</i>] [<i>destination</i>] [<i>parameters</i>]<br><br>Common usage patterns:<br><b>route</b> [-nNvee] [-FC] [&lt;<i>AFI</i>&gt;] [&lt;<i>destination</i>&gt;]<br><b>route</b> [-V] [--version] [-h] [--help]<br><b>route</b> add [-net|-host] &lt;<i>destination</i>&gt; [netmask &lt;<i>mask</i>&gt;] [gw &lt;<i>gateway</i>&gt;] [dev &lt;<i>interface</i>&gt;]<br><b>route</b> del [-net|-host] &lt;<i>destination</i>&gt; [netmask &lt;<i>mask</i>&gt;] [gw &lt;<i>gateway</i>&gt;] [dev &lt;<i>interface</i>&gt;]


title: PARAMETERS
content:
<b>add</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Adds a new route entry to the routing table.<br><br><b>del</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Deletes an existing route entry from the routing table.<br><br><b>-n</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Displays numerical addresses instead of trying to determine symbolic host names. This speeds up output.<br><br><b>-e</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Displays more information in the output, such as the <i>metric</i> and <i>window</i> values.<br><br><b>-v</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Enables verbose mode, providing more details about the command's execution.<br><br><b>-A <AFI></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Specifies the Address Family Identifier (e.g., <i>inet</i> for IPv4, <i>inet6</i> for IPv6) for the route operation. Defaults to <i>inet</i> if not specified.<br><br><b>-net</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Indicates that the <i>destination</i> is a network address.<br><br><b>-host</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Indicates that the <i>destination</i> is a host address.<br><br><b><destination></b><br>&nbsp;&nbsp;&nbsp;&nbsp;The target IP address or network. This can be an IP address (e.g., <i>192.168.1.0</i>), a network address in CIDR notation (e.g., <i>192.168.1.0/24</i>), or a symbolic hostname.<br><br><b>netmask <mask></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Specifies the network mask for network routes. For example, <i>255.255.255.0</i>.<br><br><b>gw <gateway></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Specifies the IP address of the gateway through which packets for the destination should be routed.<br><br><b>dev <interface></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Specifies the outgoing network interface (e.g., <i>eth0</i>, <i>enp0s3</i>) to be used for the route.<br><br><b>metric <metric></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Sets the route cost metric, an integer value that influences route selection (lower metric is preferred). Used for administrative distance or cost.<br><br><b>reject</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Adds a 'blackhole' route that drops packets destined for the specified target without sending an ICMP error.<br><br>


title: DESCRIPTION
content:
The <b>route</b> command is a utility used to view and manipulate the kernel's IP routing table. This table dictates how network packets are forwarded from your system to their destinations. When your system sends a packet, it consults the routing table to find the most efficient path to the destination IP address.<br><br>While <b>route</b> can be used for basic tasks like adding or deleting static routes and displaying the current routing configuration, it is considered a legacy tool. Modern Linux distributions increasingly favor the more powerful and flexible <b>ip</b> command (specifically, <b>ip route</b>) from the <b>iproute2</b> suite for network configuration tasks, including routing. Despite its age, <b>route</b> remains available on many systems for backward compatibility and simpler routing operations.


title: CAVEATS
content:
The <b>route</b> command is considered legacy in modern Linux distributions. It is part of the older <b>net-tools</b> package, which has largely been superseded by the <b>iproute2</b> suite (containing the <b>ip</b> command). While still widely available, for new scripts and advanced network configurations, the <b>ip</b> command is generally preferred. Routes added with <b>route</b> are typically not persistent across reboots; they must be configured through system-specific network configuration files or scripts to remain active after a system restart.


title: DEPRECATION AND MODERN ALTERNATIVES
content:
While <b>route</b> is still functional, the <b>iproute2</b> tools, specifically the <b>ip</b> command, are the recommended modern alternative for managing network configurations on Linux. <b>ip route</b> provides more granular control, better support for IPv6, policy routing, and other advanced features that <b>route</b> lacks.


title: ROUTE PERSISTENCE
content:
It's important to note that any routes added or deleted using the <b>route</b> command are temporary and will be lost upon system reboot. To make routing changes permanent, they must be configured within the system's network configuration files (e.g., <i>/etc/network/interfaces</i> on Debian/Ubuntu, <i>/etc/sysconfig/network-scripts/route-*</i> on RHEL/CentOS, or using NetworkManager) or through equivalent declarative network configuration tools.


title: HISTORY
content:
The <b>route</b> command has been a staple utility in Unix-like operating systems for decades, originating from BSD Unix. It was part of the traditional <b>net-tools</b> collection, providing essential network configuration capabilities. Over time, as Linux networking became more complex, particularly with the advent of IPv6, policy routing, and multiple routing tables, the limitations of <b>net-tools</b> became apparent. This led to the development of the <b>iproute2</b> suite, which offers a more robust and flexible framework for network management. Consequently, while <b>route</b> is still maintained for backward compatibility, its usage has declined in favor of the more modern <b>ip route</b> command.


title: PARAMETERS
content:
<b><B>table</B> <I>TABLE_ID</I></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Specifies the routing table to display. Examples: <I>main</I>, <I>local</I>, <I>default</I>, or a numeric ID. Defaults to <I>main</I> if not specified. This is a <I>SELECTOR</I> for <code>ip route show</code>.<br><br><b><B>dev</B> <I>DEVICE</I></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Displays routes associated with a specific network interface, e.g., <I>eth0</I> or <I>enp0s3</I>. This is a <I>SELECTOR</I> for <code>ip route show</code>.<br><br><b><B>to</B> <I>PREFIX</I></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Filters routes to a specific destination network or host, e.g., <I>192.168.1.0/24</I> or <I>10.0.0.1</I>. This is a <I>SELECTOR</I> for <code>ip route show</code>.<br><br><b><B>from</B> <I>PREFIX</I></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Filters routes originating from a specific source address (relevant for policy routing). This is a <I>SELECTOR</I> for <code>ip route show</code>.<br><br><b><B>proto</B> <I>PROTOCOL</I></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Filters routes by their originating protocol, such as <I>kernel</I>, <I>boot</I>, <I>static</I>, <I>dhcp</I>, or <I>redirect</I>. This is a <I>SELECTOR</I> for <code>ip route show</code>.<br><br><b><B>scope</B> <I>SCOPE</I></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Filters routes by their scope, e.g., <I>host</I> (for routes to local addresses), <I>link</I> (for directly connected networks), or <I>global</I> (for internet-routable addresses). This is a <I>SELECTOR</I> for <code>ip route show</code>.<br><br><b><B>type</B> <I>TYPE</I></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Filters routes by their type, such as <I>unicast</I>, <I>local</I>, <I>broadcast</I>, <I>nat</I>, <I>unreachable</I>, <I>prohibit</I>, or <I>blackhole</I>. This is a <I>SELECTOR</I> for <code>ip route show</code>.<br><br><b><B>metric</B> <I>VALUE</I></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Filters routes by their metric value, which influences route preference when multiple routes exist to the same destination. This is a <I>SELECTOR</I> for <code>ip route show</code>.<br><br><b><B>exact</B></b><br>&nbsp;&nbsp;&nbsp;&nbsp;When used with selectors, forces an exact match rather than a longest-prefix match. This is an <I>OPTION</I> for <code>ip route show</code>.<br><br><b><B>cached</B></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Displays routes from the routing cache, rather than the main routing table. This is an <I>OPTION</I> for <code>ip route show</code>.<br><br>


title: DESCRIPTION
content:
<code>routel</code> is typically a shell script wrapper or an alias for the <code><b>ip route show</b></code> command, part of the modern <code><b>iproute2</b></code> utilities. It provides a convenient way to display the kernel's IP routing tables. While the older <code>route</code> command is still available on many systems, <code>ip route</code> (and thus <code>routel</code> as its wrapper) offers more advanced and flexible capabilities for managing and inspecting network routes, including support for multiple routing tables, policy routing, and various address families. <code>routel</code> simplifies the common task of viewing active routes, often defaulting to showing the main routing table. Its output typically includes destination networks, gateways, device interfaces, and route metrics.


title: CAVEATS
content:
<code>routel</code> is not a standard, standalone utility across all Linux distributions. It is typically implemented as a wrapper script or an alias for <code>ip route show</code>. Its existence and exact behavior (e.g., which <code>ip route</code> options it supports or defaults to) can vary significantly depending on the system configuration or distribution. For comprehensive routing table management (adding, deleting, changing routes), the underlying <code>ip route</code> command should be used directly, as <code>routel</code> is primarily for display purposes.


title: DEFAULT ROUTE LISTING
content:
To display the main routing table, similar to <I>ip route show</I> without any filters:<br><br><code><b>routel</b></code><br><br>This typically shows all active unicast routes in the main routing table, including default gateways.


title: LISTING ROUTES FOR A SPECIFIC INTERFACE
content:
To view routes associated with a particular network interface, e.g., <I>eth0</I>:<br><br><code><b>routel dev eth0</b></code><br><br>This can be helpful in debugging connectivity issues related to a specific network adapter or VLAN.


title: FILTERING BY DESTINATION NETWORK
content:
To list routes pointing to a specific destination network or host, e.g., <I>192.168.1.0/24</I>:<br><br><code><b>routel to 192.168.1.0/24</b></code><br><br>Or for a single host:<br><br><code><b>routel to 8.8.8.8</b></code>


title: DISPLAYING A SPECIFIC ROUTING TABLE
content:
Linux supports multiple routing tables. To display routes from a table other than the default <I>main</I> table, for instance, table <I>200</I> or the <I>local</I> table:<br><br><code><b>routel table 200</b></code><br><code><b>routel table local</b></code>


title: HISTORY
content:
The <code>routel</code> command itself does not have a distinct history as a separate project or standard utility. Instead, its 'history' is intrinsically tied to the evolution of Linux networking tools. It emerged as a user-friendly wrapper or alias for the <code>ip route</code> command, which gained prominence with the <code>iproute2</code> utilities. The <code>iproute2</code> suite was developed to replace the older <code>net-tools</code> utilities (like <code>route</code>, <code>ifconfig</code>, <code>netstat</code>) due to their limitations in handling modern Linux network features, such as multiple routing tables, policy routing, and advanced traffic control. <code>routel</code> likely appeared as a convenience, particularly in some distributions or custom environments, to provide a concise way to list routes, similar to how <code>route -n</code> was historically used, but leveraging the more powerful and flexible <code>ip route show</code> functionality.


title: PARAMETERS
content:
<b><b>-S</b> <i>server</i></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Specifies the target server's name or IP address. This is a mandatory argument specifying the RPC server to connect to.<br><br><b><b>-U</b> <i>username</i>[<b>%</b><i>password</i>]</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Sets the username and optionally the password for authentication. If the password is not provided here, <i>rpcclient</i> will prompt for it securely.<br><br><b><b>-W</b> <i>domain</i></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Specifies the Windows domain or workgroup to authenticate against. This is often necessary when connecting to a server that is part of a domain.<br><br><b><b>-c</b> <i>command</i></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Executes a single RPC command specified by <i>command</i> and then exits. This option is particularly useful for scripting automated tasks.<br><br><b><b>-I</b> <i>filename</i></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Reads RPC commands from the specified <i>filename</i>, executing them sequentially. Each non-empty line in the file is treated as a separate command.<br><br><b><b>-d</b> <i>debuglevel</i></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Sets the debug level for output. Higher levels (e.g., 10) provide more verbose debugging information, useful for troubleshooting connection or command issues.<br><br><b><b>-k</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Uses Kerberos authentication instead of NTLM. This requires a valid Kerberos ticket to be available in the credential cache (e.g., obtained via <i>kinit</i>).<br><br><b><b>-N</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Causes <i>rpcclient</i> to never ask for a password. This is typically used in conjunction with other authentication methods like Kerberos or when the password is provided directly in the <b>-U</b> option.<br><br><b><b>-P</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Specifies that an empty password should be used for authentication. This is generally not recommended for security reasons unless strictly necessary in a controlled environment.<br><br><b><b>-p</b> <i>port</i></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Connects to the specified <i>port</i> on the server instead of the default RPC ports (typically 135 for endpoint mapper or 445 for direct SMB).<br><br><b><b>-V</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Prints the <i>rpcclient</i> version number and exits, providing information about the Samba suite it belongs to.<br><br>


title: DESCRIPTION
content:
<i>rpcclient</i> is a command-line utility within the Samba suite that allows Linux administrators to perform administrative tasks on Windows NT/2000 servers (or Samba domain controllers) using Microsoft Remote Procedure Call (MSRPC). It provides an interactive prompt where users can execute various MSRPC functions, enabling actions such as querying user and group information, managing services, enumerating shares, or debugging RPC-related issues.<br><br>It is a powerful tool for low-level interaction with Windows services, often used for auditing, scripting administrative tasks, or investigating network issues that require direct MSRPC communication to a remote host.


title: CAVEATS
content:
Using <i>rpcclient</i> requires a solid understanding of MSRPC protocols and the specific Windows services you intend to interact with. Improper use can lead to unintended configuration changes, service disruptions, or security vulnerabilities on the target server.<br><br>Authentication can be complex, involving NTLM or Kerberos, and proper setup of the Samba client, along with correct network configuration (e.g., DNS resolution, firewall rules), is crucial for successful connections.<br><br>Many administrative operations performed through <i>rpcclient</i> require elevated privileges on the target Windows server. Always ensure you have the necessary permissions before attempting actions that modify system state.


title: INTERACTIVE MODE COMMANDS
content:
When <i>rpcclient</i> is run without the <b>-c</b> option, it enters an interactive shell. Within this shell, a wide array of RPC-specific commands are available. These include commands to query user and group information (e.g., <i>queryuser</i>, <i>enumdomgroups</i>), manage services (e.g., <i>startservice</i>, <i>stopservice</i>), enumerate shares (<i>netshareenum</i>), retrieve server information (<i>srvinfo</i>), and many others depending on the MSRPC interface being targeted.<br>Users can type 'help' at the <i>rpcclient</i> prompt to see a list of available commands and their basic usage.


title: SECURITY BEST PRACTICES FOR PASSWORDS
content:
When specifying credentials, it's generally advised against including passwords directly on the command line (e.g., <b>-U</b><i>username%password</i>). Such passwords can be visible in system process listings (e.g., output of <i>ps aux</i>) or command history, posing a security risk. For better security, omit the password from the command line and allow <i>rpcclient</i> to prompt for it securely, or utilize Kerberos authentication (<b>-k</b>) if your environment supports it.


title: HISTORY
content:
<i>rpcclient</i> is an integral component of the Samba project, an open-source software suite that provides seamless file and print services interoperability between Unix/Linux and Windows machines. It was developed to extend Samba's capabilities, allowing administrators to interact with Windows MSRPC services directly from Unix-like systems, mimicking functionality typically found in native Windows administration tools.<br><br>Its development has evolved alongside Windows RPC protocols and Samba's increasing role as a robust domain member and controller, providing a crucial command-line interface for complex network administration and debugging tasks.


title: PARAMETERS
content:
<b><b>target</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;The IP address or hostname of the remote system to query.<br><br><b><b>-port</b> &lt;destination port&gt;</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Specifies the destination TCP port to connect to. The default for RPC endpoint mapper is 135.<br><br><b><b>-rpc-user</b> &lt;username&gt;</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Specifies the username for authentication.<br><br><b><b>-rpc-pass</b> &lt;password&gt;</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Specifies the password for authentication. If not provided, it will be prompted interactively.<br><br><b><b>-rpc-domain</b> &lt;domain&gt;</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Specifies the domain for authentication (e.g., workgroup or FQDN).<br><br><b><b>-rpc-hash</b> &lt;LM:NT&gt;</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Specifies the NTLM hashes (LM and NT) for pass-the-hash authentication. Format: LM_HASH:NT_HASH.<br><br><b><b>-k</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Uses Kerberos authentication. This requires a Kerberos ticket to be already present in the Kerberos ticket cache.<br><br><b><b>-no-pass</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Don't ask for a password. Useful when combined with <b>-k</b> or when no password is required.<br><br><b><b>-rpc-auth-level</b> &lt;level&gt;</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Sets the RPC authentication level. Common levels include RPC_C_AUTHN_LEVEL_NONE, RPC_C_AUTHN_LEVEL_CONNECT, etc. Higher levels provide more security.<br><br><b><b>-debug</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Enables verbose debugging output for troubleshooting connection or protocol issues.<br><br>


title: DESCRIPTION
content:
<i>rpcdump.py</i> is a Python script, part of the widely used <i>Impacket</i> framework, designed to enumerate Remote Procedure Call (RPC) endpoints on a target host, typically a Microsoft Windows system. It connects to the target's RPC endpoint mapper (port 135 by default) and requests a list of registered RPC interfaces and services. This provides valuable information for network reconnaissance and security assessments, revealing what services are exposed via RPC on the machine. The script supports various authentication methods, including anonymous access, username/password, NTLM hashes, and Kerberos, allowing it to adapt to different network environments and security configurations. It's a key tool for understanding the RPC attack surface of a system.


title: CAVEATS
content:
<i>rpcdump.py</i> is primarily designed to target Microsoft Windows systems, as it relies on specific Microsoft RPC protocols. Its effectiveness depends on network connectivity to the target's RPC endpoint mapper (typically TCP port 135) and the absence of blocking firewalls. For comprehensive results, especially on modern systems, authenticated access might be required, as many valuable RPC services are not anonymously accessible. The script requires the <i>Impacket</i> Python library to be installed on the system where it is run.


title: RPC ENDPOINT MAPPER
content:
The RPC Endpoint Mapper (often listening on TCP port 135) is a service that helps RPC clients find RPC servers. When an RPC server starts, it registers its interfaces and endpoints with the endpoint mapper. <i>rpcdump.py</i> queries this service to discover what RPC services are available and on which ports they are listening.<br>


title: USE IN PENETRATION TESTING
content:
<i>rpcdump.py</i> is frequently used in the reconnaissance phase of penetration tests to identify potential attack vectors. By revealing the RPC services available on a target, it helps attackers or security auditors understand the system's attack surface and identify services that might be vulnerable to exploits or misconfigurations.


title: HISTORY
content:
<i>rpcdump.py</i> is an integral part of the <i>Impacket</i> library, a collection of Python classes and scripts for working with network protocols. Developed initially by SecureAuth Corp (now part of Fortra), <i>Impacket</i> gained prominence in the cybersecurity community for its robust implementation of various network protocols, making it an essential tool for penetration testing, red teaming, and security research. The <i>rpcdump.py</i> script specifically addresses the need for detailed RPC service enumeration, evolving with the <i>Impacket</i> framework to support new authentication methods and protocol specifics over time.


title: SYNOPSIS
content:
<b>rpcinfo</b> [<i>options</i>] [<i>host</i>]<br><b>rpcinfo</b> [<i>-p</i>] [<i>host</i>]<br><b>rpcinfo</b> [<i>-T transport</i>] <i>host program version</i><br><b>rpcinfo</b> [<i>-T transport</i>] [<i>-u</i>] [<i>-t</i>] [<i>-n portnum</i>] <i>host program version</i><br><b>rpcinfo</b> [<i>-T transport</i>] [<i>-b</i>] [<i>-s</i>] [<i>-l</i>] <i>program version</i>


title: PARAMETERS
content:
<b><i>-p</i></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Probes the <b>rpcbind</b> service on the specified <i>host</i> and prints a list of all registered RPC programs, their versions, protocols, and port numbers. This is often the first command used to inspect RPC services.<br><br><b><i>-T transport</i></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Specifies the transport protocol to use for the RPC call. Common values include <i>udp</i>, <i>tcp</i>, <i>rdma</i>, <i>unix</i>. If omitted, <b>rpcinfo</b> typically tries <i>tcp</i> then <i>udp</i>.<br><br><b><i>-u</i></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Forces the RPC call to use UDP (User Datagram Protocol) as the transport. Useful for explicitly testing UDP-based RPC services.<br><br><b><i>-t</i></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Forces the RPC call to use TCP (Transmission Control Protocol) as the transport. Useful for explicitly testing TCP-based RPC services.<br><br><b><i>-n portnum</i></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Uses <i>portnum</i> as the RPC port number for the specified <i>program</i> and <i>version</i> instead of querying <b>rpcbind</b> for it. Useful when <b>rpcbind</b> is unavailable or for testing specific port configurations.<br><br><b><i>-b</i></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Makes an RPC broadcast to all hosts on the local network. This option requires a <i>program</i> and <i>version</i> argument and is used to find all servers offering a specific RPC service.<br><br><b><i>-s</i></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Displays a concise, human-readable summary of the RPC services registered with <b>rpcbind</b> on the target <i>host</i>.<br><br><b><i>host</i></b><br>&nbsp;&nbsp;&nbsp;&nbsp;The hostname or IP address of the machine to query. If omitted for some operations (like <i>-p</i>), it defaults to localhost.<br><br><b><i>program</i></b><br>&nbsp;&nbsp;&nbsp;&nbsp;The RPC program number or name (e.g., <i>nfs</i>, <i>mountd</i>) to query. Required for specific RPC calls or broadcasts.<br><br><b><i>version</i></b><br>&nbsp;&nbsp;&nbsp;&nbsp;The version number of the RPC program to query. Required when specifying a <i>program</i>.<br><br>


title: DESCRIPTION
content:
The <b>rpcinfo</b> command is a command-line utility used to query the <b>rpcbind</b> (or <b>portmap</b> on older systems) service on a specified host. It displays a list of registered RPC (Remote Procedure Call) programs and their versions, protocols (TCP/UDP), and port numbers.<br><br>This tool is invaluable for system administrators to diagnose and troubleshoot issues related to RPC-based services like NFS (Network File System) and NIS (Network Information Service). By using <b>rpcinfo</b>, one can verify which RPC services are running and accessible on a remote server, determine their associated port numbers, and even make specific RPC calls to test connectivity or query program details, ensuring proper functioning of distributed services.


title: CAVEATS
content:
<b>rpcinfo</b> relies on the <b>rpcbind</b> (or older <b>portmap</b>) service running on the target host; if <b>rpcbind</b> is not running or accessible, <b>rpcinfo</b> will fail. Firewall rules frequently block RPC communication, leading to connection timeouts or failures. The <i>-b</i> (broadcast) option can generate significant network traffic. The <i>-d</i> option for deleting RPC registrations requires root privileges and should be used with extreme caution as it can disrupt services.


title: COMMON USAGE EXAMPLES
content:
Here are some common ways to use <b>rpcinfo</b>:<br><i>List all services on local machine:</i><br><b>rpcinfo -p localhost</b><br>This command probes the local <b>rpcbind</b> and displays all registered RPC programs.<br><br><i>Test if NFS version 3 is available via TCP on a remote host:</i><br><b>rpcinfo -t <i>remote_host</i> nfs 3</b><br>This attempts an RPC call to the NFS program, version 3, using TCP.<br><br><i>Check if mountd is running via UDP on a remote host:</i><br><b>rpcinfo -u <i>remote_host</i> mountd</b><br>This checks the availability of the <b>mountd</b> service using UDP.<br><br><i>Get a summary of RPC services on a remote host:</i><br><b>rpcinfo -s <i>remote_host</i></b><br>Provides a more concise summary than <i>-p</i>.


title: HISTORY
content:
<b>rpcinfo</b> has been a fundamental utility in Unix-like operating systems since the early days of SunRPC (later ONC RPC), serving as a primary tool for diagnosing and verifying RPC-based services. Its core functionality has remained remarkably consistent, adapting from interactions with <b>portmap</b> to the more modern <b>rpcbind</b>, but always focused on providing insights into the availability and configuration of distributed RPC programs.


title: SYNOPSIS
content:
<b>rpcmap.py</b> [<I>options</I>] <I>&lt;target&gt;</I><br><br>Example: <b>rpcmap.py</b> -u <I>DOMAIN</I>\\<I>username</I> -p <I>password</I> <I>192.168.1.100</I>


title: PARAMETERS
content:
<b>-h, --help</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Shows the program's help message and exits.<br><br><b>-debug</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Turns on debug output, providing more detailed information during execution.<br><br><b>-v</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Enables verbose output, displaying more details about discovered RPC interfaces.<br><br><b>-nrpc</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Instructs the tool to not use RPC over SMB; attempts RPC over TCP instead.<br><br><b>-k</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Uses Kerberos authentication instead of NTLM. Requires KDC and ticket setup.<br><br><b>-dc-ip <ip address></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Specifies the IP address of the Domain Controller for Kerberos authentication.<br><br><b>-domain <domain></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Specifies the domain name to authenticate against.<br><br><b>-username <username></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Provides the username for authentication.<br><br><b>-password <password></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Provides the password for authentication.<br><br><b>-hashes <LM:NT></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Provides LM:NT hash for authentication (e.g., 'aad3b435b51404eeaad3b435b51404ee:31d6cfe0d16ae931b73c59d7e0c089c0').<br><br><b>-port <port></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Specifies the TCP port to connect to on the target (default is 135 for MSRPC).<br><br>


title: DESCRIPTION
content:
<b>rpcmap.py</b> is a Python script included in the popular <I>Impacket</I> library, designed for security professionals and system administrators to enumerate Remote Procedure Call (RPC) endpoints on remote Windows systems. It specifically targets Microsoft RPC (MSRPC) services, which are fundamental to how Windows components and applications communicate across a network. The tool connects to the RPC Endpoint Mapper (typically on TCP port 135) of a target host and queries for registered RPC interfaces.<br><br>By leveraging <b>rpcmap.py</b>, users can discover what RPC interfaces are available, their Universal Unique Identifiers (UUIDs), version numbers, and the network protocols (e.g., TCP, Named Pipes, SMB) they use to communicate. This information is crucial for network reconnaissance, identifying potential attack surfaces, and understanding the services running on a target system. It helps in assessing the security posture of a network by revealing active services that might be vulnerable or misconfigured, providing a valuable starting point for further penetration testing or security auditing.


title: CAVEATS
content:
Requires the Python <I>Impacket</I> library to be installed on the system.<br>Primarily designed for enumerating Microsoft RPC (MSRPC) services on Windows operating systems. It is not suitable for Sun RPC (ONC RPC) services commonly found on Unix/Linux.<br>Network connectivity to TCP port 135 (and potentially other dynamic RPC ports) on the target is necessary, and firewall rules might block access.<br>Executing <b>rpcmap.py</b> may generate network traffic patterns that could be detected by network intrusion detection systems (NIDS).<br>Full enumeration of all RPC services might require valid domain or local administrative credentials on the target host.


title: TYPICAL OUTPUT
content:
The output of <b>rpcmap.py</b> typically lists discovered RPC interfaces with their UUIDs (Universal Unique Identifiers), version numbers, and the endpoint protocols (e.g., <I>ncacn_np</I> for named pipes, <I>ncacn_ip_tcp</I> for TCP). For example:<br><br>&nbsp;&nbsp;&nbsp;&nbsp;UUID: 12345678-1234-ABCD-EF00-0123456789AB, Version: 1.0<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Protocol: ncacn_np, Endpoint: \\PIPE\\epmapper<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Protocol: ncacn_ip_tcp, Endpoint: [135]<br><br>This information helps identify the specific services and their reachable endpoints on the target.


title: USE CASES
content:
<b>rpcmap.py</b> is frequently used in penetration testing and vulnerability assessment to:<br>1.  Identify available MSRPC services that might expose vulnerabilities.<br>2.  Discover undocumented or custom RPC interfaces running on a target.<br>3.  Map the attack surface by understanding how services are exposed (e.g., over named pipes, TCP).<br>4.  Aid in crafting targeted exploits or further enumeration efforts by revealing service details.


title: HISTORY
content:
<b>rpcmap.py</b> is a component of the open-source <I>Impacket</I> library, which was originally developed by <I>SecureAuth Corp.</I> (now part of <I>Core Security</I>) and is actively maintained by the community. Impacket is a collection of Python classes for programmatic access to network protocols, particularly those used in Windows environments (e.g., SMB, MSRPC, DCE/RPC, Kerberos). <b>rpcmap.py</b> emerged as a dedicated tool within this framework to address the specific need for robust and programmatic RPC endpoint enumeration, a common task in network security assessments and penetration testing. Its development has mirrored the evolving landscape of Windows network protocols and security practices.


title: SEE ALSO
content:
<b>rpcclient</b>(1): A command-line tool from the Samba suite used to administer Samba servers and interact with Windows RPC services., <b>nmap</b>(1): A powerful network scanner; it can perform RPC enumeration using various NSE (Nmap Scripting Engine) scripts, such as <I>rpcinfo</I> or <I>msrpc-enum</I>., <b>rpcinfo</b>(8): A command for making RPC calls to an RPC server, primarily used for Sun RPC (ONC RPC) services on Unix-like systems, distinct from the MSRPC services <b>rpcmap.py</b> targets.


title: PARAMETERS
content:
<b><b>--check</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Checks for available EEPROM firmware updates without applying them. It displays the current and latest available versions.<br><br><b><b>--update</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Initiates the update process, downloading and staging the latest stable EEPROM firmware for installation upon the next reboot. This is often implied if no other action is specified, or used with a specific release.<br><br><b><b>--force</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Forces the update even if the current firmware is already the latest or if a downgrade is requested. Use with caution.<br><br><b><b>--verbose</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Provides more detailed output during the command's execution, useful for debugging or understanding the process.<br><br><b><b>--factory</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Resets the EEPROM to the original factory default bootloader version. This can be useful for troubleshooting.<br><br><b><b>--default</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Updates the EEPROM to the recommended default (stable) release version.<br><br><b><b>--legacy</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Updates the EEPROM to a legacy bootloader version, typically used for specific compatibility requirements.<br><br><b><b>--firmware</b> <i>&lt;path&gt;</i></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Specifies a custom EEPROM firmware image file located at <i>&lt;path&gt;</i> to be used for the update instead of downloading from repositories.<br><br><b><b>--release</b> <i>&lt;release_id&gt;</i></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Specifies a particular release to update to, such as 'stable', 'beta', 'critical', 'latest', or a specific date string (e.g., '2023-10-26').<br><br><b><b>--skip-bootloader-version-check</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Skips the check that prevents installing an older bootloader version than currently present.<br><br><b><b>--skip-pic-version-check</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Skips the check that prevents installing an older USB controller (PIC) firmware version than currently present.<br><br><b><b>--reboot</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Automatically reboots the Raspberry Pi system after a successful EEPROM update. This is often combined with <b>--update</b>.<br><br><b><b>--debug</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Enables debug output, providing even more detailed information than <b>--verbose</b>, primarily for developers.<br><br><b><b>--help</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Displays a summary of the command's usage and available options.<br><br>


title: DESCRIPTION
content:
The <b>rpi-eeprom-update</b> command is a crucial utility for managing and updating the Electrically Erasable Programmable Read-Only Memory (EEPROM) firmware on Raspberry Pi 4 and newer models. This EEPROM contains the bootloader and other low-level firmware components essential for the Raspberry Pi's startup process. Keeping the EEPROM updated ensures access to the latest bug fixes, performance improvements, and new features, such as USB mass storage boot or network boot capabilities. <br><br>The utility allows users to check for available updates, apply the latest stable or specific firmware versions, or even revert to factory defaults. Updates are typically downloaded from Raspberry Pi's official repositories. Applying an update usually stages the new firmware, which is then written to the EEPROM upon the next reboot.


title: CAVEATS
content:
Requires root privileges (use <b>sudo</b>) to execute.<br>Incorrect use, though rare, could potentially lead to system instability or render the device unbootable. Always ensure a stable power supply during the update process.<br>Updates typically require a system reboot to take full effect and write the new firmware to the EEPROM.<br>This command is primarily designed for Raspberry Pi 4 and newer models, which feature an updatable EEPROM. Older models (e.g., Pi 3B+) do not have this feature.


title: UPDATE PROCESS
content:
The EEPROM update process typically involves two stages: first, the new firmware image is downloaded and staged in the boot partition of the SD card (or other boot device). Second, upon the next system reboot, the bootloader reads this staged image and writes it to the EEPROM. This two-stage process helps ensure system stability even if a power loss occurs during the staging phase.


title: CHECKING CURRENT VERSION
content:
To check your current EEPROM version, you can simply run: <b>sudo rpi-eeprom-update</b> without any options, or explicitly: <b>sudo rpi-eeprom-update --check</b>. The output will show the current bootloader and VPU (VideoCore Processor) versions, along with any available updates.


title: HISTORY
content:
The <b>rpi-eeprom-update</b> utility was introduced concurrently with the release of the Raspberry Pi 4 in 2019. This model was the first Raspberry Pi to incorporate an updatable EEPROM for its bootloader, moving away from the fixed boot ROMs of previous generations. This design change allowed for significant post-release improvements, including enabling USB mass storage boot, network boot (PXE), and various power management and stability enhancements. The command has since evolved to support different firmware versions (stable, beta, critical) and provide more fine-grained control over the update process, reflecting the ongoing development and improvement of the Raspberry Pi ecosystem.


title: PARAMETERS
content:
<b>-v, --version</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Print version information and exit.<br><br><b>-h, --help</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Show this help message and exit.<br><br><b>--debug</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Enable debug mode.<br><br><b>--disable-telemetry</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Disable sending anonymous usage data.<br><br><b>--repo <URI></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Use a custom image repository URI.<br><br><b>--json</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Output JSON listing of available images and OSes.<br><br><b>--country <country_code></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Pre-select country for Wi-Fi and keyboard layout settings (e.g., 'US', 'GB').<br><br><b>--language <language_code></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Pre-select language for the UI (e.g., 'en', 'fr').<br><br><b>--disable-sd-card-detect</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Disable detection of SD cards (primarily for debugging).<br><br><b>--disable-usb-boot-detect</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Disable detection of USB mass storage devices for boot (primarily for debugging).<br><br><b>--disable-pishrink</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Disable pishrink optimization for writing images (prevents shrinking the image to fit the target device).<br><br><b>--portable</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Run in portable mode, storing configuration files in the application directory.<br><br><b>--cli</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Start in CLI mode (no GUI).<br><br><b>--image <file></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Specify the local image file to write (e.g., '/path/to/raspberrypi.img').<br><br><b>--device <device></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Specify the target device to write to (e.g., '/dev/sda').<br><br><b>--verify</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Verify the image after writing to ensure data integrity.<br><br><b>--mass-storage-mode</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Put a Raspberry Pi 4/400 into USB mass storage mode for direct imaging.<br><br><b>--no-erase</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Do not erase the target device before writing (use with caution).<br><br><b>--config <file></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Load configuration from a specified JSON file.<br><br><b>--run-os <disk_image></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Write a specified OS image and then boot into it (requires `--device` and `--image` or `--list-images` selection).<br><br><b>--customize-os <image_file></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Customize the OS before writing (requires `--device` and `--image` or `--list-images` selection).<br><br><b>--reconfigure</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Reconfigure an existing OS on a specified device.<br><br><b>--headless</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Run in headless mode (no GUI), suitable for scripting.<br><br><b>--quiet</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Suppress non-error output.<br><br><b>--no-warnings</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Do not show warnings during operation.<br><br><b>--disable-update-check</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Disable checking for new application updates.<br><br><b>--allow-unverified-download</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Allow downloading images with unverified checksums (not recommended).<br><br><b>--ignore-device-size-warnings</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Ignore warnings about small device sizes.<br><br><b>--clear-config</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Clear all saved configuration settings.<br><br><b>--skip-download</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Skip downloading the image and use a local file specified by `--image`.<br><br><b>--list-devices</b><br>&nbsp;&nbsp;&nbsp;&nbsp;List available block devices suitable for writing and exit.<br><br><b>--list-images</b><br>&nbsp;&nbsp;&nbsp;&nbsp;List available OS images from the repository and exit.<br><br><b>--default-settings</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Reset all application settings to their default values.<br><br><b>--skip-download-sha256-check</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Skip SHA256 checksum verification during image download.<br><br><b>--skip-image-sha256-check</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Skip SHA256 checksum verification of the downloaded image file.<br><br><b>--skip-network-check</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Skip checking for network connectivity.<br><br><b>--boot-from-usb</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Enable USB boot for compatible Raspberry Pi models (e.g., Pi 2B v1.2, Pi 3A+, 3B, 3B+).<br><br><b>--write-eeprom</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Write or update the EEPROM firmware on Raspberry Pi 4/400.<br><br><b>--reformat <device></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Reformat the specified device with a FAT32 partition.<br><br><b>--eject <device></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Eject the specified device after writing.<br><br>


title: DESCRIPTION
content:
rpi-imager is the <i>official GUI tool</i> provided by the Raspberry Pi Foundation for easily writing operating system images to SD cards or USB drives. It simplifies the process of getting a Raspberry Pi up and running by offering a curated list of official and recommended operating systems, along with common utilities like Raspberry Pi OS (formerly Raspbian). Users can select an OS from the list, choose their target device, and then write the image. The tool handles downloading the image, flashing it, and optionally verifying the write. <br><br>While primarily a graphical application, rpi-imager also provides a <i>powerful command-line interface (CLI)</i>, allowing for automation of image writing, pre-configuration of OS settings (like Wi-Fi and SSH), and advanced debugging. This CLI mode makes it suitable for scripting and headless operations, expanding its utility beyond typical desktop use cases.


title: CAVEATS
content:
Writing an image with <b>rpi-imager</b> will <b>erase all existing data</b> on the target device. Users must exercise extreme caution to select the correct device to avoid unintended data loss.<br>Requires <i>sudo</i> or root privileges to write to devices.<br>Some advanced features like <i>--mass-storage-mode</i> or <i>--write-eeprom</i> are specific to certain Raspberry Pi models and may not apply to all devices. CLI mode options require precise device paths and image files; incorrect paths can lead to critical system damage.


title: PRE-CONFIGURATION OPTIONS
content:
When using the GUI, <b>rpi-imager</b> offers advanced pre-configuration, allowing users to set Wi-Fi credentials, enable SSH, set hostname, timezone, and keyboard layout, and even enable telemetry, all <i>before</i> writing the image to the SD card. This significantly reduces post-installation setup time and can also be automated using the <i>--config</i> option with a JSON file.


title: INTEGRATED IMAGE REPOSITORY
content:
The tool maintains an online repository of official and recommended operating systems, which it can download directly. This ensures users always get the latest and correct images without having to manually search and download from websites. The <i>--repo</i> option allows specifying a custom repository, enabling advanced users to access alternative image sources.


title: HISTORY
content:
The Raspberry Pi Imager was introduced by the Raspberry Pi Foundation in 2020 as a modern, user-friendly alternative to existing imaging tools. Prior to its release, users often relied on tools like <i>dd</i> on Linux, <i>Win32 Disk Imager</i> on Windows, or <i>balenaEtcher</i> across platforms. The Imager was designed to streamline the process, integrate with the official image repository, and offer convenient features like pre-configuration directly within the tool, making it significantly easier for newcomers to get started with Raspberry Pi. Its continuous development adds support for new hardware and features like EEPROM updates and direct USB boot enabling.


title: SYNOPSIS
content:
<b>rpi-otp-private-key</b> [<i>OPTIONS</i>]<br><b>rpi-otp-private-key --new-key</b><br><b>rpi-otp-private-key --sign-bootloader</b> <i>&lt;bootloader.bin&gt;</i> <b>--key</b> <i>&lt;private_key.pem&gt;</i><br><b>rpi-otp-private-key --burn-public-key</b> <i>&lt;public_key.pem&gt;</i><br><b>rpi-otp-private-key --read-public-key</b>


title: PARAMETERS
content:
<b>--new-key</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Generates a new RSA private key (PEM format) suitable for secure boot operations. The key is typically saved to `private_key.pem` in the current directory.<br><br><b>--sign-bootloader &lt;bootloader.bin&gt;</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Signs the specified Raspberry Pi bootloader image (`.bin` file) using a provided private key. This creates a signed bootloader image (`.signed` file) ready for secure boot.<br><br><b>--key &lt;private_key.pem&gt;</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Specifies the path to the private key file (PEM format) to be used for signing bootloader images. This option is used in conjunction with `--sign-bootloader`.<br><br><b>--burn-public-key &lt;public_key.pem&gt;</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Burns the public key derived from the specified private key into the Raspberry Pi's One-Time Programmable (OTP) memory. <b>This operation is permanent and irreversible.</b><br><br><b>--read-public-key</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Attempts to read the public key hash (or the full key if possible) from the Raspberry Pi's OTP memory. This is used to verify if a public key has been successfully burned.<br><br>


title: DESCRIPTION
content:
<i>rpi-otp-private-key</i> is a specialized utility designed for Raspberry Pi 4, Compute Module 4 (CM4), and newer models to manage cryptographic keys essential for the secure boot process.<br><br>It allows users to generate new private keys, sign Raspberry Pi bootloader images with a private key, and burn the corresponding public key into the SoC's One-Time Programmable (OTP) memory. The public key stored in OTP memory is then used by the Raspberry Pi hardware to verify the integrity and authenticity of signed bootloader images, preventing unauthorized or malicious firmware from running. This command is crucial for implementing a secure boot chain on compatible Raspberry Pi devices.


title: CAVEATS
content:
Burning a public key into the Raspberry Pi's OTP memory is a <b>permanent and irreversible</b> operation. If the incorrect key is burned or the process is interrupted, it can render the secure boot functionality unusable for that device. Extreme caution is advised.<br><br>This command requires root privileges (e.g., using <b>sudo</b>) to perform operations like burning public keys or accessing specific hardware features. It is specific to Raspberry Pi 4, Compute Module 4, and newer models that support secure boot and OTP memory functionality.<br><br>A compromised private key could allow an attacker to sign malicious bootloaders, undermining the secure boot chain.


title: SECURE BOOT CHAIN
content:
Secure boot ensures that only trusted software runs on the device. With Raspberry Pi, this typically involves signing the bootloader with a private key. The corresponding public key is then permanently fused into the device's OTP memory. During boot, the hardware uses this OTP-stored public key to verify the bootloader's signature before executing it, thereby preventing unauthorized bootloaders from running.


title: ONE-TIME PROGRAMMABLE (OTP) MEMORY
content:
OTP memory is a type of non-volatile memory that can be programmed only once. Once data (such as a public key) is written to it, it cannot be erased or modified. This makes it ideal for storing cryptographic keys or configuration data that must be permanent and tamper-proof for security purposes.


title: HISTORY
content:
The <i>rpi-otp-private-key</i> utility was introduced as part of the broader secure boot ecosystem developed for Raspberry Pi 4 and subsequent models. Its development was driven by the need to enhance device security by providing a mechanism to verify the authenticity and integrity of bootloader firmware. It became available with specific versions of the Raspberry Pi EEPROM firmware that enabled the secure boot features.


title: PARAMETERS
content:
<b>-t <milliseconds>, --timeout <milliseconds></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Sets the duration in milliseconds for the preview to run before exiting. Default is often 5000 (5 seconds).<br><br><b>-c <camera_idx>, --camera <camera_idx></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Selects which camera to use when multiple are available. Defaults to camera 0.<br><br><b>-p <x,y,w,h>, --preview <x,y,w,h></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Defines the position and size of the preview window on the screen (x, y coordinates, width, height).<br><br><b>-f, --fullscreen</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Displays the preview window in fullscreen mode.<br><br><b>-w <width>, --width <width></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Sets the width of the camera stream for the preview.<br><br><b>-h <height>, --height <height></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Sets the height of the camera stream for the preview.<br><br><b>--shutter <microseconds></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Sets the manual shutter speed in microseconds.<br><br><b>--gain <gain></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Sets the manual analog gain value.<br><br><b>--brightness <level></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Adjusts the brightness of the preview. Range: -1.0 to 1.0.<br><br><b>--contrast <level></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Adjusts the contrast of the preview. Range: 0.0 to 10.0.<br><br><b>--saturation <level></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Adjusts the saturation of the preview. Range: 0.0 to 10.0.<br><br><b>--sharpness <level></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Adjusts the sharpness of the preview. Range: 0.0 to 10.0.<br><br><b>--framerate <fps></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Sets the target framerate for the camera stream.<br><br><b>--help</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Displays a help message with available command-line options.<br><br><b>--version</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Displays the version information for the rpicam-hello utility.<br><br>


title: DESCRIPTION
content:
<i>rpicam-hello</i> is a fundamental command-line utility designed for Raspberry Pi computers with an attached camera module. As part of the modern <b>libcamera</b> stack, it serves as a simple "hello world" application to quickly verify the camera's basic functionality. When executed, it typically opens a graphical preview window on the connected display, showcasing the live video feed from the camera.<br><br>This makes it an invaluable tool for confirming that the camera hardware is correctly connected and recognized, and that the underlying <b>libcamera</b> software is operational. It's often the first command used when troubleshooting camera setup issues, offering a quick visual check before proceeding to more complex image or video capture tasks using related commands like <i>rpicam-still</i> or <i>rpicam-vid</i>. <i>rpicam-hello</i> replaced the preview capabilities previously found in the legacy <i>raspistill</i> utility, aligning with the Raspberry Pi Foundation's transition to the open-source <b>libcamera</b> framework for camera control.


title: CAVEATS
content:
Requires a compatible Raspberry Pi camera module and a graphical environment (X server or Wayland) for preview display. <br>Without a display or X forwarding (when connecting via SSH), the command will run but the visual preview will not be visible. <br><i>rpicam-hello</i> is primarily for preview and basic testing; use <b>rpicam-still</b> or <b>rpicam-vid</b> for actual image/video capture.


title: GRAPHICAL DISPLAY REQUIREMENT
content:
The primary function of <i>rpicam-hello</i> is to display a live camera preview. This requires a connected display and a running graphical environment (like Wayland or X11) for the preview window to appear. When running via SSH, X forwarding (<code>ssh -X</code>) or a virtual desktop is necessary to view the output remotely.


title: UNDERLYING FRAMEWORK
content:
This command is built upon the <b>libcamera</b> framework, which provides a modern, standardized interface for controlling camera hardware on Linux. This ensures better compatibility, flexibility, and future-proofing compared to the previous proprietary camera stack used on Raspberry Pi.


title: HISTORY
content:
<i>rpicam-hello</i> is a relatively modern command, introduced as part of the Raspberry Pi's transition from the legacy `mmal` camera stack (used by <i>raspistill</i>/<i>raspivid</i>) to the more standardized, open-source <b>libcamera</b> framework. Its development reflects a broader industry move towards a unified camera API for Linux. It became the standard "hello world" camera test on Raspberry Pi OS releases starting with Bullseye (released in late 2021) and newer, replacing older methods for basic camera verification.


title: PARAMETERS
content:
<b><b>-o</b> <I>filename</I></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Specifies the output filename for the JPEG image. This option is mandatory.<br><br><b><b>-t</b> <I>milliseconds</I></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Sets the time (in milliseconds) before an image is captured. Useful for setting up the shot or allowing auto-exposure to settle.<br><br><b><b>--width</b> <I>pixels</I></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Sets the width of the captured image in pixels.<br><br><b><b>--height</b> <I>pixels</I></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Sets the height of the captured image in pixels.<br><br><b><b>--quality</b> <I>0-100</I></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Sets the JPEG compression quality, where 100 is best quality (largest file) and 0 is worst quality (smallest file).<br><br><b><b>--shutter</b> <I>microseconds</I></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Sets the shutter speed in microseconds. Overrides automatic exposure.<br><br><b><b>--gain</b> <I>float</I></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Sets the analog gain of the sensor. Overrides automatic gain control.<br><br><b><b>--ev</b> <I>float</I></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Adjusts the Exposure Value (EV) compensation relative to the current exposure mode. Default is 0.<br><br><b><b>--awb</b> <I>mode</I></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Sets the Auto White Balance mode (e.g., <i>auto</i>, <i>incandescent</i>, <i>fluorescent</i>, <i>cloudy</i>, <i>daylight</i>).<br><br><b><b>--exposure</b> <I>mode</I></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Sets the exposure control algorithm (e.g., <i>auto</i>, <i>normal</i>, <i>sport</i>, <i>long</i>).<br><br><b><b>--metering</b> <I>mode</I></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Sets the metering mode (e.g., <i>centre</i>, <i>spot</i>, <i>matrix</i>, <i>custom</i>).<br><br><b><b>--saturation</b> <I>float</I></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Adjusts the color saturation (e.g., 1.0 for normal, 0.0 for grayscale, higher for more saturation).<br><br><b><b>--contrast</b> <I>float</I></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Adjusts the image contrast (e.g., 1.0 for normal, higher for more contrast).<br><br><b><b>--sharpness</b> <I>float</I></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Adjusts the image sharpness (e.g., 1.0 for normal, higher for more sharpness).<br><br><b><b>--vflip</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Flips the image vertically.<br><br><b><b>--hflip</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Flips the image horizontally.<br><br><b><b>--camera</b> <I>index</I></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Selects a specific camera if multiple are connected (e.g., 0, 1).<br><br><b><b>--hdr</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Enables High Dynamic Range capture, if supported by the camera.<br><br><b><b>--verbose</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Enables verbose output, showing more details about the capture process and camera settings.<br><br>


title: DESCRIPTION
content:
<b>rpicam-jpeg</b> is a command-line utility for capturing still images in JPEG format directly from Raspberry Pi camera modules. Part of the <i>rpicam-apps</i> suite, it leverages the modern <i>libcamera</i> framework, offering a robust and flexible alternative to the legacy <i>raspistill</i> command.<br><br>This tool is designed to work seamlessly with various Raspberry Pi camera hardware, including standard and High Quality cameras. It provides extensive controls over image parameters such as resolution, exposure, white balance, and saturation, allowing users to fine-tune image acquisition for specific applications. <b>rpicam-jpeg</b> is particularly suited for scripting automated image capture tasks, surveillance, time-lapse photography, and integrating camera functionality into custom projects on Raspberry Pi OS. Its integration with <i>libcamera</i> ensures better support for newer camera modules and future advancements in camera technology.


title: CAVEATS
content:
<ul><li>Requires a Raspberry Pi device and a compatible camera module connected via the CSI port.</li><li>Specific to Raspberry Pi OS with <i>libcamera</i> support (Bullseye and later).</li><li>It supersedes the legacy <i>raspistill</i> command; direct <i>MMAL</i> commands are no longer supported.</li><li>Performance, including capture speed and maximum resolution, may vary depending on the Raspberry Pi model and camera hardware being used.</li></ul>


title: TUNING FILES
content:
<b>rpicam-jpeg</b> supports loading custom camera tuning files using the <b>--tuning-file</b> option. These files, typically in <i>.json</i> format, allow advanced users to fine-tune camera ISP (Image Signal Processor) parameters for specific lighting conditions or artistic effects, overriding the default camera profiles. This is crucial for achieving optimal image quality in non-standard environments or for specialized applications.


title: LIVE PREVIEW
content:
While primarily designed for still image capture, <b>rpicam-jpeg</b> often provides a brief live preview on connected displays (such as an HDMI monitor or DSI display) before capturing the final image. This feature, similar to its predecessor <i>raspistill</i>, aids in framing the shot and adjusting settings in real-time. The duration of this preview is typically controlled by the <b>-t</b> (timeout) parameter, after which the image is captured.


title: HISTORY
content:
The <b>rpicam-jpeg</b> command emerged as part of the Raspberry Pi Foundation's significant transition from the proprietary <i>MMAL</i> (Multi-Media Abstraction Layer) camera stack to the open-source <i>libcamera</i> framework. Prior to this, image capture on Raspberry Pi relied on tools like <i>raspistill</i>.<br><br>With <i>libcamera</i> becoming the standard camera interface on Raspberry Pi OS Bullseye and later versions, <b>rpicam-jpeg</b> (and the broader <i>rpicam-apps</i> suite) was developed to provide modern, robust camera applications that fully leverage the new <i>libcamera</i> API. This shift aimed to improve compatibility with a wider range of camera modules, enhance performance, and ensure long-term maintainability through an open standard. <b>rpicam-jpeg</b> specifically focuses on direct JPEG output, simplifying still image capture for many common use cases while offering granular control over image parameters.


title: PARAMETERS
content:
<b><b>-o</b>, <b>--output</b> <i><filename></i></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Specifies the output file for the raw image data. This option is mandatory.<br><br><b><b>-t</b>, <b>--timeout</b> <i><milliseconds></i></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Sets the duration (in milliseconds) for the camera to run and capture. After this time, the application will exit.<br><br><b><b>--width</b> <i><pixels></i></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Sets the desired width of the captured raw image in pixels.<br><br><b><b>--height</b> <i><pixels></i></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Sets the desired height of the captured raw image in pixels.<br><br><b><b>--mode</b> <i><width>:<height>:<bit_depth>:[P|S]</i></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Specifies the camera operating mode, defining resolution, bit depth, and packing (P for packed, S for unpacked/sparse).<br><br><b><b>--gain</b> <i><value></i></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Sets the analogue gain of the sensor. Typically a floating-point value.<br><br><b><b>--exposure</b> <i><microseconds></i></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Sets the exposure time of the sensor in microseconds.<br><br><b><b>--tuning-file</b> <i><path></i></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Specifies a custom tuning file to load for camera configuration, allowing advanced control over ISP (if used) and sensor parameters.<br><br><b><b>-n</b>, <b>--no-display</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Prevents the application from displaying a preview window on the screen.<br><br><b><b>--segment</b> <i><seconds></i></b><br>&nbsp;&nbsp;&nbsp;&nbsp;If capturing continuous raw data, this option causes the output to be split into new files every specified number of seconds. It works by adding a frame counter and timestamp to the output filename.<br><br>


title: DESCRIPTION
content:
<i>rpicam-raw</i> is a command-line utility for Raspberry Pi that enables the direct capture of raw sensor data from connected camera modules. Unlike <i>rpicam-still</i> or <i>rpicam-vid</i>, which typically apply in-camera Image Signal Processor (ISP) processing, <i>rpicam-raw</i> bypasses this processing, providing unprocessed sensor output. This makes it invaluable for applications requiring precise control over image data, such as scientific imaging, custom ISP development, computer vision research, or situations where post-processing algorithms are to be applied to the pristine sensor output.<br><br>It is built on the <i>libcamera</i> camera stack, offering a modern, modular, and performant interface to Raspberry Pi camera hardware. Users gain fine-grained control over various camera parameters, including exposure, gain, sensor mode, and output format. The raw data captured by <i>rpicam-raw</i> is typically provided in formats like DNG or a custom raw format, which often requires specialised software for viewing and processing.


title: CAVEATS
content:
<i>rpicam-raw</i> requires a Raspberry Pi with a compatible camera module and the <i>libcamera</i> software stack installed. The output consists of raw sensor data, which is typically uncompressed and not directly viewable by standard image viewers without specialised post-processing. Users are expected to have knowledge of raw image formats and potentially their own processing pipelines to make use of the captured data.


title: OUTPUT FORMAT
content:
The raw image data captured by <i>rpicam-raw</i> is typically saved in a proprietary raw format specific to the camera sensor, or occasionally in DNG (Digital Negative) format if supported by the camera and driver. These files contain the unprocessed Bayer array data, which requires demosaicing and other ISP steps to produce a viewable RGB image.


title: HISTORY
content:
<i>rpicam-raw</i> is part of the new generation of Raspberry Pi camera tools built upon the <i>libcamera</i> framework, which began to replace the older 'MMAL' (Multi-Media Abstraction Layer) camera stack and its associated utilities (like <i>raspistill</i> and <i>raspivid</i>) around 2020-2021. The shift to <i>libcamera</i> was driven by the need for a modern, open-source, and standardised camera stack, allowing for greater flexibility and control over camera hardware. <i>rpicam-raw</i> specifically addresses the demand for direct access to sensor data, a feature that was less robust or more complex to achieve with the legacy tools.


title: PARAMETERS
content:
<b><b>-o</b> <i>&lt;file&gt;</i>, <b>--output</b> <i>&lt;file&gt;</i></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Specifies the output filename for the captured image. If omitted, a preview is shown but no image is saved.<br><br><b><b>-t</b> <i>&lt;ms&gt;</i>, <b>--timeout</b> <i>&lt;ms&gt;</i></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Sets the time in milliseconds before image capture or preview shutdown. Use 0 for infinite preview (until Ctrl+C or -k).<br><br><b><b>-w</b> <i>&lt;pixels&gt;</i>, <b>--width</b> <i>&lt;pixels&gt;</i></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Sets the width of the captured image in pixels.<br><br><b><b>-h</b> <i>&lt;pixels&gt;</i>, <b>--height</b> <i>&lt;pixels&gt;</i></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Sets the height of the captured image in pixels.<br><br><b><b>--shutter</b> <i>&lt;us&gt;</i></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Sets the camera's shutter speed in microseconds.<br><br><b><b>--gain</b> <i>&lt;float&gt;</i></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Sets the sensor's combined analog and digital gain.<br><br><b><b>--ev</b> <i>&lt;float&gt;</i></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Sets the exposure compensation value.<br><br><b><b>--awb</b> <i>&lt;mode&gt;</i></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Sets the Auto White Balance mode (e.g., <i>auto</i>, <i>incandescent</i>, <i>fluorescent</i>, <i>sunlight</i>, <i>cloudy</i>, <i>custom</i>).<br><br><b><b>--awbgains</b> <i>&lt;R:B&gt;</i></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Sets specific Red and Blue gains for Auto White Balance (e.g., <i>1.5:1.2</i>). Requires <i>--awb custom</i>.<br><br><b><b>--quality</b> <i>&lt;0-100&gt;</i></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Sets the JPEG quality for output images, where 100 is best quality.<br><br><b><b>--raw</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Captures and saves the raw sensor data alongside the processed image.<br><br><b><b>--nopreview</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Disables the live preview window.<br><br><b><b>--mode</b> <i>&lt;W:H:F:C&gt;</i></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Selects a specific camera mode based on Width, Height, Frames-per-second, and Colours (e.g., <i>2304:1296:10:P</i>). If not specified, the best available mode for the given resolution is chosen.<br><br><b><b>--segment</b> <i>&lt;count&gt;</i></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Captures images in segments, creating multiple files. Used with <i>--timeout</i> for time-lapse.<br><br><b><b>--latest</b> <i>&lt;file&gt;</i></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Creates a symlink to the latest captured image, useful for time-lapse monitoring.<br><br><b><b>--keypress</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Waits for a key press to capture an image or quit the application.<br><br><b><b>--datetime</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Appends the current date and time to the output filename automatically.<br><br><b><b>--hdr</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Enables High Dynamic Range capture, combining multiple exposures into one image.<br><br><b><b>--denoise</b> <i>&lt;mode&gt;</i></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Sets the denoise algorithm mode (e.g., <i>auto</i>, <i>off</i>, <i>cdn_fast</i>, <i>cdn_hq</i>).<br><br><b><b>--encoding</b> <i>&lt;type&gt;</i></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Specifies the output encoding type (e.g., <i>jpeg</i>, <i>png</i>, <i>bmp</i>, <i>yuv420</i>, <i>rgb</i>). Default is <i>jpeg</i>.<br><br><b><b>--rotation</b> <i>&lt;deg&gt;</i></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Rotates the image by 0, 90, 180, or 270 degrees clockwise.<br><br><b><b>--hflip</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Fliips the image horizontally.<br><br><b><b>--vflip</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Flips the image vertically.<br><br><b><b>--metering</b> <i>&lt;mode&gt;</i></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Sets the metering mode (e.g., <i>centre</i>, <i>spot</i>, <i>matrix</i>, <i>custom</i>).<br><br>


title: DESCRIPTION
content:
rpicam-still is a command-line utility designed for capturing high-quality still images from Raspberry Pi camera modules. It is part of the modern <B>libcamera</B> camera stack, which superseded the older <B>MMAL</B> (Multimedia Abstraction Layer) framework and its associated <I>raspistill</I> tool. This shift provides enhanced performance, greater flexibility in camera control, and improved compatibility with various camera sensors and operating systems.<br><br>Users can specify various image parameters such as resolution, quality, exposure settings, white balance, and output format. It supports both standard JPEG output and raw image capture. <I>rpicam-still</I> also offers options for previewing the camera feed before capture, enabling time-lapse photography, and embedding metadata. It's an essential tool for photography, computer vision projects, and general imaging tasks on Raspberry Pi devices.


title: CAVEATS
content:
rpicam-still requires a compatible Raspberry Pi camera module and the <B>libcamera</B> framework, along with a recent version of Raspberry Pi OS (Bullseye or newer). It replaces the legacy <I>raspistill</I> tool, and some command-line options or behaviors may differ. A display environment (X-server or Wayland compositor) is typically required for the preview window to function correctly.


title: LIVE PREVIEW
content:
<I>rpicam-still</I> provides a real-time preview of the camera feed by default, displayed on the connected screen. This is highly useful for framing shots and adjusting settings before capturing the final image. The preview can be disabled using the <B>--nopreview</B> option.


title: TIME-LAPSE PHOTOGRAPHY
content:
Users can easily set up time-lapse capture sequences by combining options like <B>--timeout</B> with <B>--segment</B> or <B>--latest</B>. This allows for automatic capture of images at regular intervals over an extended period, suitable for monitoring gradual changes or creating time-lapse videos.


title: METADATA INTEGRATION
content:
The <B>--save-meta</B> option enables saving detailed camera and image metadata in a separate JSON file alongside the captured image. This metadata includes information about exposure, gains, white balance, and lens settings, which can be invaluable for post-processing, debugging, or scientific analysis.


title: HISTORY
content:
<I>rpicam-still</I> emerged as the official successor to the widely used <I>raspistill</I> command on Raspberry Pi. The transition was necessitated by the shift from the proprietary <B>MMAL</B> (Multimedia Abstraction Layer) camera stack to the open-source <B>libcamera</B> framework. This change began with Raspberry Pi OS Bullseye, aiming to provide a more standardized, maintainable, and flexible camera interface that is compatible with a broader range of camera sensors and aligns better with the Linux ecosystem.


title: PARAMETERS
content:
<b><b>-o</b>, <b>--output</b> <i>&lt;file&gt;</i></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Specifies the output file path for the recorded video. This option is mandatory for saving video to disk.<br><br><b><b>-t</b>, <b>--timeout</b> <i>&lt;ms&gt;</i></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Sets the video recording duration in milliseconds. A value of 0 means infinite recording until interrupted by user input (e.g., Ctrl+C or --keypress).<br><br><b><b>-w</b>, <b>--width</b> <i>&lt;pixels&gt;</i></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Sets the width of the captured video resolution.<br><br><b><b>-h</b>, <b>--height</b> <i>&lt;pixels&gt;</i></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Sets the height of the captured video resolution.<br><br><b><b>-f</b>, <b>--framerate</b> <i>&lt;fps&gt;</i></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Sets the target frame rate for video capture.<br><br><b><b>--codec</b> <i>&lt;name&gt;</i></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Specifies the video encoding codec. Common options include <i>h264</i>, <i>h265</i>, or <i>mjpeg</i>.<br><br><b><b>-q</b>, <b>--quality</b> <i>&lt;level&gt;</i></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Sets the video encoding quality (0-100). Higher values result in better quality but larger file sizes.<br><br><b><b>--bitrate</b> <i>&lt;bps&gt;</i></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Sets the target bitrate for video encoding in bits per second.<br><br><b><b>--nopreview</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Disables the live preview window on the attached display.<br><br><b><b>--vflip</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Vertically flips the camera image.<br><br><b><b>--hflip</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Horizontally flips the camera image.<br><br><b><b>--exposure</b> <i>&lt;mode&gt;</i></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Sets the exposure mode (e.g., <i>auto</i>, <i>normal</i>, <i>sport</i>, <i>long</i>).<br><br><b><b>--awb</b> <i>&lt;mode&gt;</i></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Sets the auto white balance mode (e.g., <i>auto</i>, <i>incandescent</i>, <i>fluorescent</i>).<br><br><b><b>--listen</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Enables network streaming by listening for incoming client connections (default port 8000).<br><br><b><b>--tcp</b> | <b>--udp</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Specifies the network protocol for streaming when <i>--listen</i> is enabled (TCP or UDP).<br><br><b><b>--keypress</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Allows stopping recording by pressing the Enter key in the terminal.<br><br>


title: DESCRIPTION
content:
<i>rpicam-vid</i> is the dedicated command-line application for recording video using the camera module connected to a Raspberry Pi.<br>It leverages the modern <b>libcamera</b> API, offering a robust and flexible solution for video capture, succeeding the older <i>raspivid</i> utility. This tool supports various video formats (H.264, H.265, MJPEG), resolutions, and frame rates. It provides extensive control over camera parameters such as exposure, gain, white balance, and more.<br>Beyond local file recording, <i>rpicam-vid</i> can stream video over a network and display a live preview, making it versatile for both simple video capture and more complex streaming applications. It's an essential utility for anyone doing video work on a Raspberry Pi.


title: CAVEATS
content:
<i>rpicam-vid</i> requires a Raspberry Pi with a compatible camera module and a recent version of Raspberry Pi OS (e.g., Bullseye or newer) with the <b>libcamera</b> stack enabled. Performance metrics such as resolution and frame rate are dependent on the specific Raspberry Pi model and camera sensor capabilities.


title: LIVE PREVIEW AND DISPLAY
content:
By default, <i>rpicam-vid</i> displays a live preview of the camera feed on the attached display. This can be useful for framing shots or monitoring the video capture. The preview can be disabled using the <i>--nopreview</i> option.


title: NETWORK STREAMING CAPABILITIES
content:
The command has built-in capabilities to stream the video over TCP or UDP using options like <i>--listen</i>, <i>--port</i>, <i>--tcp</i>, or <i>--udp</i>. This makes it suitable for remote monitoring, surveillance, or integration into network-based video applications without needing external streaming tools.


title: HISTORY
content:
<i>rpicam-vid</i> emerged as part of the transition of Raspberry Pi camera software from the legacy <b>MMAL</b> (Multi-Media Abstraction Layer) stack to the modern open-source <b>libcamera</b> framework. This shift began around Raspberry Pi OS Bullseye. It specifically replaced the older <i>raspivid</i> command, offering improved stability, broader camera support, and better integration with standard Linux multimedia frameworks. It represents a significant step towards a more open and maintainable camera stack for the Raspberry Pi.


title: SYNOPSIS
content:
<b><I>rpm</I></b> {<b>-i</b>|<b>-U</b>|<b>-F</b>|<b>-q</b>|<b>-V</b>|<b>-e</b>|<b>--rebuilddb</b>} [<b>OPTIONS</b>] [<b>PACKAGE_FILE</b> | <b>PACKAGE_NAME</b> | <b>ARGUMENTS</b>]...


title: PARAMETERS
content:
<b><b>-i</b>, <b>--install</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Installs an RPM package file. Does not upgrade existing packages.<br><br><b><b>-U</b>, <b>--upgrade</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Upgrades an existing RPM package or installs it if not present.<br><br><b><b>-F</b>, <b>--freshen</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Freshens an existing RPM package. Installs only if an older version is already present.<br><br><b><b>-e</b>, <b>--erase</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Erases (uninstalls) an installed RPM package by its name.<br><br><b><b>-q</b>, <b>--query</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Queries the RPM database for information about packages. Requires an additional query option.<br><br><b><b>-qa</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Lists all installed packages.<br><br><b><b>-qi</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Displays information about an installed package.<br><br><b><b>-ql</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Lists all files belonging to an installed package.<br><br><b><b>-qc</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Lists configuration files belonging to an installed package.<br><br><b><b>-qd</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Lists documentation files belonging to an installed package.<br><br><b><b>-qf</b> <i>FILE</i></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Determines which installed package owns a given file.<br><br><b><b>-qp</b> <i>PACKAGE_FILE</i></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Queries information about an uninstalled RPM package file.<br><br><b><b>-V</b>, <b>--verify</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Verifies the integrity of an installed package against its original metadata.<br><br><b><b>-Va</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Verifies all installed packages.<br><br><b><b>--nodeps</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Ignores package dependencies during install, upgrade, or erase operations. Use with caution!<br><br><b><b>--force</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Forces installation/upgrade/erase, ignoring file conflicts or package verification errors.<br><br><b><b>--prefix</b> <i>PATH</i></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Relocates a relocatable package to an alternative path.<br><br><b><b>--root</b> <i>DIR</i></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Operates on an alternative root directory for package installations.<br><br><b><b>--dbpath</b> <i>PATH</i></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Uses an alternative RPM database path.<br><br><b><b>--rebuilddb</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Rebuilds the RPM database from the installed package headers. Useful for database corruption.<br><br>


title: DESCRIPTION
content:
The <b><I>rpm</I></b> (Red Hat Package Manager) command is a powerful, low-level package management tool used primarily on Red Hat-based Linux distributions like Fedora, CentOS, and RHEL. It allows users to install, update, query, verify, and uninstall software packages distributed in the .rpm format.<br><br>Unlike higher-level package managers such as <b><I>yum</I></b> or <b><I>dnf</I></b>, <b><I>rpm</I></b> operates directly on individual package files and does not automatically resolve dependencies or manage software repositories. This makes it a fundamental tool for system administrators and developers who need precise control over package operations, troubleshooting, or building custom packages. While it provides detailed information about installed software, its direct usage is often superseded by `yum` or `dnf` for day-to-day operations due to their enhanced dependency resolution and repository management capabilities.


title: CAVEATS
content:
<b><I>rpm</I></b> is a low-level tool that does not automatically handle package dependencies or repository management. Incorrect use, especially with options like <b>--nodeps</b> or <b>--force</b>, can lead to a broken system or dependency hell. For most common package management tasks, higher-level tools like <b><I>dnf</I></b> or <b><I>yum</I></b> are recommended as they provide robust dependency resolution and integrate with software repositories.


title: KEY MODES OF OPERATION
content:
The <b><I>rpm</I></b> command operates in several distinct modes, determined by the primary option used:<br><br><b><I>• Install/Upgrade Mode</I></b>: Used with <b>-i</b>, <b>-U</b>, or <b>-F</b> to add new packages or update existing ones on the system. For example, <b><I>rpm -i package.rpm</I></b>.<br><br><b><I>• Query Mode</I></b>: Activated by <b>-q</b>, this mode retrieves information about installed packages or .rpm files. It's often combined with other options like <b>-qi</b> (info), <b>-ql</b> (list files), or <b>-qf</b> (find package owning a file).<br><br><b><I>• Erase Mode</I></b>: Uses <b>-e</b> to remove an installed package from the system. For instance, <b><I>rpm -e package_name</I></b>.<br><br><b><I>• Verify Mode</I></b>: With <b>-V</b>, this mode checks the integrity and authenticity of installed packages by comparing them against their original metadata. <b><I>rpm -Va</I></b> verifies all installed packages.


title: HISTORY
content:
The <b><I>rpm</I></b> command and the RPM Package Manager were originally developed by Red Hat, Inc. in 1997. It quickly became the standard package management system for Red Hat Linux and subsequently for other distributions in the Red Hat family, such as Fedora, CentOS, and SUSE Linux. Its introduction provided a structured way to distribute, install, and manage software on Linux systems, moving beyond simple archives. While foundational, its lack of automatic dependency resolution led to the development of higher-level tools like <b><I>up2date</I></b>, then <b><I>yum</I></b>, and more recently <b><I>dnf</I></b>, which abstract away the complexities of dependency management and repository handling. Despite these advancements, <b><I>rpm</I></b> remains an essential utility for system administrators for low-level package operations, troubleshooting, and scripting.


title: PARAMETERS
content:
<b><b>install</b> <i>&lt;pkg...&gt;</i></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Layers new RPM packages on top of the base OS. Requires a reboot to apply.<br><br><b><b>upgrade</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Downloads and deploys the latest available atomic OS update. Requires a reboot.<br><br><b><b>rollback</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Reverts the system to the previously deployed operating system version. Requires a reboot.<br><br><b><b>status</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Displays information about the current and available OS deployments, including layered packages.<br><br><b><b>rebase</b> <i>&lt;ref&gt;</i></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Changes the base OSTree branch or remote, effectively switching the system to a different OS variant or version.<br><br><b><b>override</b> <i>&lt;subcommand...&gt;</i></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Manages package overrides for base OS content, allowing replacement or removal of default packages.<br><br>


title: DESCRIPTION
content:
<i>rpm-ostree</i> is a <b>hybrid image/package system</b> that bridges the gap between immutable OSTree deployments and traditional RPM package management. It is foundational for operating systems like Fedora Silverblue, Fedora CoreOS, and RHEL for Edge, enabling <i>atomic</i> and <i>transactional</i> updates. <br><br>The core principle is an <b>immutable root filesystem</b>, where the base operating system is read-only. This significantly enhances system stability and security by preventing accidental or malicious modifications to core system files. Updates are performed atomically: the entire operating system, along with any layered packages, is updated as a single unit. This ensures that a system is always in a consistent state, and in case of an update failure, a <b>rollback to the previous known-good deployment</b> is straightforward and reliable. <br><br>While the base OS is immutable, <i>rpm-ostree</i> allows users to <b>layer additional RPM packages</b>. These layered packages are integrated into the atomic update process, guaranteeing their presence and consistency across system reboots and updates. It also supports <b>rebasing</b> the system to a different base image (e.g., switching branches or major versions) and provides robust rollback capabilities, making it an ideal solution for environments requiring high reliability and predictable system states.


title: CAVEATS
content:
<i>rpm-ostree</i> fundamentally alters how packages are managed compared to traditional distributions:<br><b>1. Not a traditional package manager:</b> It's not a direct replacement for <i>dnf</i> or <i>yum</i> for general package management. Its primary role is to layer RPMs on an immutable base, not manage packages within that base.<br><b>2. Reboots required:</b> Most significant changes (e.g., installing layered RPMs, upgrading, rebasing) necessitate a system reboot to apply the new deployment.<br><b>3. Disk space usage:</b> Multiple deployments are maintained for rollback functionality, which can consume significant disk space over time.<br><b>4. Layering limitations:</b> Excessive layering of RPMs can complicate management and increase deployment size. For development tools or frequently changing software, containers (e.g., <i>toolbox</i>, <i>distrobox</i>) are generally recommended.


title: DEPLOYMENT MODEL
content:
<i>rpm-ostree</i> operates on the concept of 'deployments'. Each time you make a change (e.g., install a package, upgrade), a new deployment is created. The system keeps multiple deployments, allowing for easy rollback to a previous, known-good state. Only one deployment is active at a time, and a reboot is required to switch to a different deployment.


title: LAYERING VS. CONTAINERS
content:
While <i>rpm-ostree</i> allows layering RPMs, it's generally advised to use containers (like <i>toolbox</i> or <i>distrobox</i>) for development tools, programming languages, or software not strictly necessary for the core OS function. Layering should be reserved for system-level utilities, drivers, or applications that deeply integrate with the host OS. This approach keeps the base system lean and stable, while providing flexibility for user-space applications.


title: HISTORY
content:
<i>rpm-ostree</i> was developed to address the need for reliable, atomic system updates in environments like Fedora Atomic Host (now Fedora CoreOS) and Fedora Silverblue. It emerged from the foundational <i>OSTree</i> project, which provides the underlying immutable filesystem and content-addressable storage for operating system deployments. The command was created to seamlessly integrate the existing RPM package ecosystem with OSTree's image-based update model. This allows users to layer traditional RPMs on top of an immutable base, providing flexibility without compromising the atomic update guarantees. Its development has been central to the evolution of "Atomic Workstation" and "Atomic Host" distributions, providing a robust and predictable operating system experience.


title: PARAMETERS
content:
<b><i>RPM_FILE</i></b><br>&nbsp;&nbsp;&nbsp;&nbsp;The path to the RPM package file from which the CPIO archive is to be extracted. If not specified, <i>rpm2cpio</i> reads the RPM package from standard input.<br><br>


title: DESCRIPTION
content:
The <i>rpm2cpio</i> command is a lightweight utility designed to extract the payload (file data) from an RPM package. Unlike the <i>rpm</i> command itself, which manages package installation and query, <i>rpm2cpio</i> focuses solely on extracting the file archive contained within an RPM. It reads an RPM package, either from a specified file or from standard input, and then outputs the embedded CPIO archive to standard output. This output can then be piped to the <i>cpio</i> command (e.g., <i>rpm2cpio package.rpm | cpio -idmv</i>) to extract the actual files to the filesystem. It's particularly useful for inspecting package contents without installing them, or for extracting specific files from an RPM package without administrative privileges or disturbing an existing system installation.


title: CAVEATS
content:
<i>rpm2cpio</i> only extracts the CPIO data stream; it does not extract the files to the filesystem. To extract files, its output must be piped to the <i>cpio</i> command (e.g., <i>rpm2cpio mypackage.rpm | cpio -idmv</i>). It does not provide access to RPM metadata (e.g., package name, version, dependencies); for that, the <i>rpm</i> command's query functionality is required.


title: TYPICAL USAGE
content:
The most common way to use <i>rpm2cpio</i> is to pipe its output directly to the <i>cpio</i> command to extract the files. For example:<br><i>rpm2cpio mypackage.rpm | cpio -idmv</i><br>Here, <i>-i</i> extracts files, <i>-d</i> creates leading directories, <i>-m</i> preserves modification times, and <i>-v</i> lists files verbosely.


title: HISTORY
content:
<i>rpm2cpio</i> is typically distributed as part of the <i>RPM Package Manager</i> suite itself. Its development is intertwined with the evolution of RPM. It serves as a fundamental helper utility, providing a low-level interface to extract the core file archive from an RPM package, reflecting RPM's internal structure where file data is stored in a CPIO archive. Its design principle is 'do one thing and do it well', focusing purely on the CPIO extraction aspect without added complexity.


title: SYNOPSIS
content:
<b>rpmbuild</b> [<i>OPTIONS</i>] <i>SPECSPEC</i> | <i>SRPMFILE</i> | <i>TARBALL</i><br><br>Common build stages:<br>&nbsp;&nbsp;<b>rpmbuild -ba</b> <i>SPECFILE</i> - Build both binary and source packages.<br>&nbsp;&nbsp;<b>rpmbuild -bb</b> <i>SPECFILE</i> - Build only the binary package.<br>&nbsp;&nbsp;<b>rpmbuild -bs</b> <i>SPECFILE</i> - Build only the source package.<br><br>Other common usage:<br>&nbsp;&nbsp;<b>rpmbuild --rebuild</b> <i>SRPMFILE</i> - Rebuild a binary RPM from a source RPM.<br>&nbsp;&nbsp;<b>rpmbuild --clean</b> <i>SPECFILE</i> - Clean up the build directory after a build.<br>&nbsp;&nbsp;<b>rpmbuild --define</b> '<i>MACRO VALUE</i>' <i>SPECFILE</i> - Define a macro for the build.<br>&nbsp;&nbsp;<b>rpmbuild --with</b> <i>FEATURE</i> <i>SPECFILE</i> - Enable a conditional feature in the spec file.<br>&nbsp;&nbsp;<b>rpmbuild --without</b> <i>FEATURE</i> <i>SPECFILE</i> - Disable a conditional feature in the spec file.


title: PARAMETERS
content:
<b><b>-ba</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Build both binary and source packages from the specified <i>.spec</i> file.<br><br><b><b>-bb</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Build only the binary package from the specified <i>.spec</i> file.<br><br><b><b>-bs</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Build only the source RPM package from the specified <i>.spec</i> file.<br><br><b><b>-bp</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Prepare the sources (unpack archives, apply patches) in the build directory, then exit.<br><br><b><b>-bc</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Execute the <b>%build</b> section of the <i>.spec</i> file, after preparation.<br><br><b><b>-bi</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Execute the <b>%install</b> section of the <i>.spec</i> file, after compilation.<br><br><b><b>--rebuild</b> <i>SRPMFILE</i></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Unpack and build a binary RPM from a given source RPM package.<br><br><b><b>--clean</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Remove the temporary build directory (<i>BUILD/</i> and <i>BUILDROOT/</i>) after the build process completes.<br><br><b><b>--define</b> '<i>MACRO VALUE</i>'</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Define or override a macro with a specified value during the build process. Useful for custom build options.<br><br><b><b>--with</b> <i>FEATURE</i></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Set the RPM macro <i>_with_feature</i> to 1, enabling conditional build paths in the <i>.spec</i> file.<br><br><b><b>--without</b> <i>FEATURE</i></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Set the RPM macro <i>_without_feature</i> to 1, disabling conditional build paths in the <i>.spec</i> file.<br><br><b><b>--sign</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Sign the resulting RPM package(s) with GPG using the configured keys.<br><br><b><b>--target</b> <i>ARCH</i></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Specify the target architecture for cross-compilation (e.g., <i>armv7hl</i>, <i>x86_64</i>).<br><br><b><b>--noclean</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Do not remove the temporary build directory after the build process, useful for debugging.<br><br>


title: DESCRIPTION
content:
<b>rpmbuild</b> is the primary command-line utility for creating RPM (Red Hat Package Manager) software packages. It automates the complex process of transforming source code into distributable <i>.rpm</i> files, which are used for software installation and management on RPM-based Linux distributions like Fedora, RHEL, CentOS, and openSUSE.<br><br>The tool relies on a <i>.spec</i> file, a detailed blueprint that describes how to build the software, including its sources, patches, build dependencies, compilation instructions (e.g., <b>%prep</b>, <b>%build</b>, <b>%install</b>), and metadata. <b>rpmbuild</b> orchestrates the entire build process, from unpacking source archives and applying patches to configuring, compiling, installing, and finally packaging the results into a binary RPM (<i>.rpm</i>) and/or a source RPM (<i>.src.rpm</i>).<br><br>It operates within a standardized build environment, typically located under <i>~/rpmbuild</i> (or <i>/usr/src/redhat</i> on older systems), which contains dedicated subdirectories for sources, spec files, build outputs, and temporary build roots. This structured approach ensures consistency and reproducibility in package creation. <b>rpmbuild</b> is an indispensable tool for developers and package maintainers contributing to the RPM ecosystem.


title: CAVEATS
content:
<ul><li>Requires a well-defined <i>.spec</i> file and a properly set up RPM build environment (e.g., <i>~/rpmbuild</i>).</li><li>Building as the <i>root</i> user is strongly discouraged for security reasons; <b>rpmbuild</b> is designed to be run as a regular user.</li><li>Does not automatically resolve or install build dependencies; these must be declared in the spec file and met by the system.</li><li>The complexity of spec files can be high, requiring in-depth knowledge of packaging guidelines and the software being built.</li></ul>


title: SPEC FILE DIRECTIVES AND SECTIONS
content:
The <i>.spec</i> file is the heart of <b>rpmbuild</b>. It is divided into several logical sections, each serving a specific purpose:<br><ul><li><b>Name</b>, <b>Version</b>, <b>Release</b>, <b>Summary</b>, <b>License</b>, <b>URL</b>: Package metadata.</li><li><b>Source</b>: Specifies the original source archive(s).</li><li><b>Patch</b>: Specifies patch files to apply.</li><li><b>BuildRequires</b>, <b>Requires</b>: Define build-time and runtime dependencies.</li><li><b>%description</b>: Detailed description of the package.</li><li><b>%prep</b>: Prepares the source tree (unpacks, applies patches).</li><li><b>%build</b>: Compiles the source code.</li><li><b>%install</b>: Installs the compiled software into the build root (a temporary installation directory).</li><li><b>%check</b>: Runs tests for the built software.</li><li><b>%files</b>: Lists all files to be included in the final package.</li><li><b>%changelog</b>: Records changes to the package over time.</li></ul>


title: STANDARD BUILD ENVIRONMENT
content:
<b>rpmbuild</b> requires a specific directory structure to operate correctly. By default, this is found in <i>~/rpmbuild/</i> (or configurable via `<i>_topdir</i>` macro) and includes the following subdirectories:<br><ul><li><i>BUILD/</i>: Where the actual compilation and packaging takes place.</li><li><i>BUILDROOT/</i>: A temporary root directory mimicking the final installation structure before packaging.</li><li><i>RPMS/</i>: Output directory for binary RPM packages, further categorized by architecture.</li><li><i>SOURCES/</i>: Stores original source tarballs and patch files referenced in the <i>.spec</i> file.</li><li><i>SPECS/</i>: Stores the <i>.spec</i> files themselves.</li><li><i>SRPMS/</i>: Output directory for source RPM packages.</li></ul>


title: HISTORY
content:
<b>rpmbuild</b> is an integral part of the RPM (Red Hat Package Manager) system, which was originally developed by Red Hat for its Linux distribution. It evolved from simpler build scripts into a robust and standardized tool to automate the complex process of software packaging. Over the years, its core functionality, centered around the <i>.spec</i> file, has remained consistent, making it a cornerstone for package creation across various RPM-based Linux distributions. Its development has focused on reliability, reproducibility, and enabling sophisticated build workflows.


title: SEE ALSO
content:
<b>rpm</b>(8): The core RPM package manager for querying, installing, and uninstalling packages., <b>rpmspec</b>(8): Utility for parsing and querying RPM spec files., <b>rpmmacros</b>(5): Describes the RPM macro configuration files., <b>createrepo</b>(8): Creates a YUM/DNF repository from a collection of RPM packages.


title: PARAMETERS
content:
<b><b>-a</b>, <b>--all</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Process all unresolved <i>.rpmnew</i> and <i>.rpmsave</i> files found on the system.<br><br><b><b>-o</b>, <b>--output-diff</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Show the diff in the output rather than interactively prompting for action. Often used with <b>-a</b> for non-interactive analysis.<br><br><b><b>-r</b>, <b>--rpm-file</b> <I>file</I></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Process configuration files related to the specified RPM package <i>file</i> (e.g., <i>/path/to/mypackage.rpm</i>).<br><br><b><b>-P</b>, <b>--package</b> <I>pkg</I></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Process configuration files for the specified installed <i>pkg</i> (name or glob pattern, e.g., <i>httpd</i>).<br><br><b><b>-f</b>, <b>--file</b> <I>file</I></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Process the specified configuration <i>file</i>, typically one ending in <i>.rpmnew</i> or <i>.rpmsave</i>.<br><br><b><b>--diff-program</b> <I>prog</I></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Specify an alternative program to use for showing differences (default is <i>diff</i> or from <i>RPMDIFFPROG</i> env var).<br><br><b><b>--editor</b> <I>prog</I></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Specify an alternative editor to use for merging files (default is <i>vi</i> or from <i>EDITOR</i> env var).<br><br><b><b>--text-mode</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Use text mode for interaction, which can be useful in non-graphical environments or for basic scripting.<br><br><b><b>-v</b>, <b>--verbose</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Increase verbosity of output.<br><br><b><b>-h</b>, <b>--help</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Display a help message and exit.<br><br><b><b>-V</b>, <b>--version</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Display version information and exit.<br><br>


title: DESCRIPTION
content:
<i>rpmconf</i> is a command-line utility used primarily by system administrators to manage and resolve conflicts in configuration files during or after an RPM package upgrade. When an RPM package is upgraded, and a configuration file included in the package has been locally modified, RPM might install the new version with an extension (e.g., <i>.rpmnew</i>) or move the old version to <i>.rpmsave</i>.<br><br><i>rpmconf</i> automates the process of finding these conflict files (e.g., <i>.rpmnew</i>, <i>.rpmsave</i>) and interactively prompts the user to decide which version to keep, view the differences, or edit/merge the files. It simplifies the post-upgrade cleanup of configuration files, ensuring system stability while preserving local customizations.


title: CAVEATS
content:
<i>rpmconf</i> is primarily an interactive tool, requiring user input for each conflict resolution. While some options provide non-interactive output, its core design focuses on guided conflict management. It generally requires root privileges to modify system configuration files and addresses conflicts <b>after</b> the RPM transaction has completed, not during the package installation or upgrade itself.


title: INTERACTIVE PROMPTS
content:
When <i>rpmconf</i> encounters a conflict, it presents a series of interactive choices to the user. The most common options are:<br><b>k</b> (keep): Keep the existing, locally modified file and ignore the new package version.<br><b>n</b> (new): Install the new file from the package, overwriting the locally modified version.<br><b>d</b> (diff): Show the differences between the two files (local and new).<br><b>m</b> (merge): Merge the files using the configured editor (e.g., <i>vi</i>), allowing manual resolution.<br><b>s</b> (skip): Skip this file and leave it unresolved for now, proceeding to the next conflict.<br><b>x</b> (exit): Exit <i>rpmconf</i> immediately.<br><b>?</b> (help): Show help for the prompt options.


title: CONFLICT FILE EXTENSIONS
content:
<i>rpmconf</i> specifically targets configuration files marked by RPM during package upgrades. These typically have the following extensions:<br><b>.rpmnew</b>: This file indicates the new version of a configuration file from the package. It is created when RPM detects that the original file was locally modified, and thus installs the new version alongside the old.<br><b>.rpmsave</b>: This file indicates the old, locally modified version of a configuration file. It is created by RPM when the new package version overwrites the original file, saving the user's modifications.


title: HISTORY
content:
<i>rpmconf</i> is part of the <i>rpm-utils</i> package, which is commonly distributed with Red Hat-based Linux distributions (e.g., RHEL, Fedora, CentOS). Its development is intrinsically linked to the RPM package management system, having emerged as a dedicated utility to streamline the common administrative challenge of managing configuration file changes and conflicts during package upgrades. It automates a task that was previously manual and error-prone, thereby enhancing system stability and maintainability.


title: PARAMETERS
content:
<b><b>-P</b>, <b>--parse</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;<i>Parse the spec file and print the build tree to standard output. This shows the result of macro expansion and conditional processing.</i><br><br><b><b>-q</b>, <b>--query</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;<i>Query the spec file for package information. This is the default action if no other action is specified.</i><br><br><b><b>-l</b>, <b>--list</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;<i>List files included in the package as defined by the <i>%files</i> section of the spec file.</i><br><br><b><b>-i</b>, <b>--info</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;<i>Display package information (Name, Version, Release, Summary, License, etc.) from the spec file.</i><br><br><b><b>--buildarch</b> <i>ARCH</i></b><br>&nbsp;&nbsp;&nbsp;&nbsp;<i>Override the detected build architecture (e.g., <i>x86_64</i>, <i>aarch64</i>). Useful for testing cross-build scenarios.</i><br><br><b><b>--target</b> <i>PLATFORM</i></b><br>&nbsp;&nbsp;&nbsp;&nbsp;<i>Override the detected build target platform (e.g., <i>i686-linux-gnu</i>).</i><br><br><b><b>--define='<i>MACRO VALUE</i>'</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;<i>Define a macro with a specific value, overriding default or previously defined macros.</i><br><br><b><b>--undefine=<i>MACRO</i></b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;<i>Undefine a macro, preventing its expansion.</i><br><br><b><b>--with=<i>FEATURE</i></b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;<i>Enable a conditional build feature as specified by <i>%bcond_with</i> or similar constructs in the spec file.</i><br><br><b><b>--without=<i>FEATURE</i></b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;<i>Disable a conditional build feature as specified by <i>%bcond_without</i> or similar constructs.</i><br><br><b><b>--queryformat='<i>FORMAT_STRING</i>'</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;<i>Specify a custom format string for query output, similar to <i>rpm -q --queryformat</i>.</i><br><br><b><b>--rcfile=<i>FILELIST</i></b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;<i>Read RPM configuration from the specified colon-separated <i>FILELIST</i> instead of the default.</i><br><br><b><b>--root=<i>PATH</i></b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;<i>Specify an alternate root directory to operate on.</i><br><br><b><b>-D</b>, <b>--debug</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;<i>Enable debugging output, showing more details about internal processes.</i><br><br><b><b>-h</b>, <b>--help</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;<i>Print a concise help message and exit.</i><br><br><b><b>--version</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;<i>Print the version number of <i>rpmspec</i> and exit.</i><br><br>


title: DESCRIPTION
content:
The <i>rpmspec</i> command is a utility from the RPM Package Manager suite, primarily used for analyzing <i>.spec</i> files. A <i>.spec</i> file is a blueprint used by <i>rpmbuild</i> to create RPM packages. <i>rpmspec</i> allows developers and administrators to parse these files, query their contents, and inspect the package metadata without necessarily building the package.<br><br>It's invaluable for understanding package dependencies, build requirements, included files, and general package structure before the actual build process. It can evaluate conditional sections (like <i>%if</i>, <i>%else</i>) and macro expansions, providing a final, processed view of the spec file's instructions. This helps in debugging spec file issues and ensuring correct package metadata.


title: CAVEATS
content:
<i>rpmspec</i> evaluates the spec file in a similar way to <i>rpmbuild</i>, meaning it considers defined macros and conditional builds. However, it does not actually perform any build operations, download sources, or check for build environments. Its output is based purely on the parsing and evaluation of the <i>.spec</i> file itself, which might not reflect the actual state if external conditions (like missing build dependencies) would prevent a successful <i>rpmbuild</i>. It also might not catch all syntax errors that <i>rpmbuild</i> would, especially those related to source/patch file presence or execution of scriptlets.


title: MACRO EXPANSION
content:
<i><i>rpmspec</i> is particularly useful for understanding how macros are expanded within a spec file. Using <b>-P</b> will show the fully expanded spec file, which is invaluable for debugging complex macro definitions and conditional logic, especially when dealing with environment-specific builds or complex dependencies.</i>


title: QUERYING METADATA
content:
<i>Beyond just parsing, <i>rpmspec</i> can extract specific metadata (like <i>Name</i>, <i>Version</i>, <i>Release</i>, <i>Summary</i>, <i>License</i>, <i>BuildRequires</i>, <i>Requires</i>, <i>Source</i> files, etc.) from a spec file without needing to build the package. This is similar to querying an already built RPM package, making it a quick way to inspect a package's definition.</i>


title: HISTORY
content:
<i>The <i>rpmspec</i> command is an integral part of the RPM Package Manager project, which was originally developed by Red Hat. It emerged as a dedicated utility to inspect and parse <i>.spec</i> files, a crucial component of RPM package creation. While <i>rpmbuild</i> can also parse spec files internally during a build, <i>rpmspec</i> provides a standalone, non-intrusive way to review the package definition, aiding developers in debugging spec file logic, verifying macros, and understanding the final package structure before committing to a full build process. Its development reflects the need for more granular control and inspection capabilities within the RPM ecosystem.</i>


title: SYNOPSIS
content:
<b>rr</b> <I>command</I> [<I>options</I>] [<I>arguments</I>]<br>Common commands:<br><b>rr</b> <I>record</I> [<I>options</I>] <I>program</I> [<I>program_arguments</I>]<br><b>rr</b> <I>replay</I> [<I>options</I>] [<I>trace_dir</I>]<br><b>rr</b> <I>dump</I> [<I>options</I>] [<I>trace_dir</I>]<br><b>rr</b> <I>ps</I><br><b>rr</b> <I>cat</I> <I>trace_file</I>


title: PARAMETERS
content:
<b><b>record</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Records the execution of a program, creating a trace directory.<br><br><b><b>replay</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Replays a previously recorded trace. Often used with <b>-g</b> to launch GDB.<br><br><b><b>dump</b> [<I>trace_dir</I>]</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Dumps the contents of a trace directory, showing recorded events and execution information.<br><br><b><b>ps</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Lists active <b>rr</b> recording or replay processes on the system.<br><br><b><b>cat</b> <I>trace_file</I></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Prints the raw contents of a specific trace file from a trace directory.<br><br><b><b>-o</b> <I>DIR</I>, <b>--output-trace-dir</b>=<I>DIR</I></b><br>&nbsp;&nbsp;&nbsp;&nbsp;(Record) Specifies the directory where the trace data will be stored. Defaults to a unique directory in <b>~/.local/share/rr/</b>.<br><br><b><b>--nested</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;(Record) Allows <b>rr</b> to be used inside another <b>rr</b> recording, useful for debugging <b>rr</b> itself or its interactions.<br><br><b><b>--disable-randomization</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;(Record) Disables Address Space Layout Randomization (ASLR) for the recorded program, making addresses consistent across replays.<br><br><b><b>--cpu-affinity</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;(Record) Pins the recorded process and its children to a single CPU core, which can sometimes improve performance or reduce overhead.<br><br><b><b>--single-process</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;(Record) Instructs <b>rr</b> to only record the initial process and not any of its children (forked processes).<br><br><b><b>-g</b>, <b>--gdb</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;(Replay) Launches <b>GDB</b> and automatically attaches it to the replaying process. This is the primary way to debug with <b>rr</b>.<br><br><b><b>-s</b>, <b>--server</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;(Replay) Starts a GDB server on a specified port, allowing a remote GDB client to connect to the replaying process.<br><br><b><b>-f</b>, <b>--on-exit-failure</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;(Replay) Executes a specified command if the replayed process exits with a non-zero status or is terminated by a signal.<br><br><b><b>-v</b>, <b>--verbose</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Increases verbosity of <b>rr</b>'s output, useful for debugging <b>rr</b>'s own operations.<br><br><b><b>-h</b>, <b>--help</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Displays help information for <b>rr</b> commands and options.<br><br>


title: DESCRIPTION
content:
<i>The <b>rr</b> command is a powerful, lightweight tool for recording and deterministically replaying program execution on Linux. Developed primarily by Mozilla, <b>rr</b> allows developers to capture the exact execution path of a program, including all non-deterministic events like system calls, signals, and context switches. This capability is invaluable for debugging intermittent or hard-to-reproduce bugs, especially concurrency issues (Heisenbugs).</i><br><br><i>When a program is recorded, <b>rr</b> logs all necessary inputs and events. Later, this recording can be replayed an arbitrary number of times, always yielding the identical execution. This deterministic replay enables powerful debugging workflows, particularly when integrated with the <b>GDB</b> debugger. Users can step forward and backward through code, inspect memory, and set breakpoints, knowing that the execution environment is perfectly reproducible. <b>rr</b> virtualizes CPU time, ensuring that even time-dependent operations behave deterministically during replay. It significantly reduces the time and effort required to diagnose complex software defects.</i>


title: CAVEATS
content:
<i><b>rr</b> has certain limitations. It primarily works on x86-64 Linux systems and requires specific kernel features (like <b>perf_event_open</b> and <b>ptrace</b> support). While generally efficient, recording can introduce performance overhead, especially for CPU-intensive or highly I/O-bound applications. The generated trace files can also become quite large, requiring significant disk space. Furthermore, <b>rr</b> cannot record everything; it's designed for user-space applications and does not trace kernel execution. It also doesn't support recording processes that use certain advanced kernel features or hardware interactions directly (e.g., direct GPU programming without standard APIs). Recording multi-threaded applications is fully supported and is one of its strongest features for reproducing concurrency bugs, but it does incur more overhead.</i>


title: <B>DEBUGGING WITH GDB INTEGRATION</B>
content:
<i>The primary use case for <b>rr</b> is in conjunction with the GNU Debugger (<b>GDB</b>). After recording a program's execution using <b>rr record</b>, users can replay the trace and attach <b>GDB</b> (e.g., <b>rr replay -g</b>). This allows for full debugging capabilities, including reverse execution (stepping backward in time), inspecting variables, and setting breakpoints, all with perfect determinism. This is crucial for understanding the root cause of complex bugs.</i>


title: <B>TRACE DIRECTORY STRUCTURE</B>
content:
<i>When <b>rr</b> records a program, it creates a unique trace directory (usually in <b>~/.local/share/rr/</b>). This directory contains all the necessary data to replay the execution, including syscall logs, memory maps, and other metadata. This self-contained nature makes it easy to share traces with other developers for collaborative debugging.</i>


title: <B>SYSTEM REQUIREMENTS AND PERFORMANCE</B>
content:
<i><b>rr</b> requires a Linux kernel with <b>perf_event_open</b> and <b>ptrace</b> support, running on an x86-64 architecture. While highly optimized, recording introduces some performance overhead, especially for I/O-heavy applications. The size of trace files can also be substantial for long-running or memory-intensive programs, so sufficient disk space is recommended.</i>


title: HISTORY
content:
<i>The <b>rr</b> project was initiated at Mozilla by Robert O'Callahan in 2011, driven by the need for a more robust and deterministic way to debug complex browser bugs, particularly those involving concurrency. The initial motivation was to tackle Heisenbugs that were notoriously difficult to reproduce in traditional debugging environments. Over the years, it has gained significant traction and contributions from various developers and organizations, including Google. Its development continues to be active, with ongoing improvements in performance, stability, and feature set. <b>rr</b> has become an essential tool in the arsenal of many developers working on intricate C/C++ applications on Linux, proving its value in reproducing and fixing bugs that would otherwise be nearly impossible to diagnose.</i>


title: SYNOPSIS
content:
rrdtool <i>command</i> [<i>options</i>] [<i>arguments</i>]<br>Example: rrdtool <b>create</b> mydata.rrd DS:temp:GAUGE:600:U:U RRA:AVERAGE:0.5:1:120<br>Example: rrdtool <b>update</b> mydata.rrd N:25.5<br>Example: rrdtool <b>graph</b> mygraph.png --start -1d DEF:mydata=mydata.rrd:temp:AVERAGE LINE1:mydata#FF0000:Temperature


title: PARAMETERS
content:
<b>Subcommands</b><br>&nbsp;&nbsp;&nbsp;&nbsp;<i>rrdtool</i> operates primarily through subcommands, each performing a specific function. General options for <i>rrdtool</i> itself are minimal; most options are specific to the subcommand being used.<br><br><b>create</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Creates a new RRD file. This involves defining data sources (DS) and Round Robin Archives (RRA) for data storage and aggregation.<br><br><b>update</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Adds new data points to an existing RRD file. This is the core operation for logging real-time or historical data.<br><br><b>graph</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Generates a graph (e.g., PNG, SVG) from the data stored in one or more RRD files. Offers extensive options for data definition, processing, and visual presentation.<br><br><b>fetch</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Retrieves raw data from an RRD file for a specified time range and consolidation function. Useful for scripting and further data analysis.<br><br><b>dump</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Outputs the contents of an RRD file into an XML format, which can be used for backup or inspection.<br><br><b>restore</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Restores an RRD file from an XML dump created by the <b>dump</b> subcommand.<br><br><b>tune</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Modifies various parameters of an existing RRD file (e.g., data source type, heartbeats) without losing existing data.<br><br><b>info</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Displays detailed information about an RRD file, including its data sources, archives, and internal structure.<br><br><b>xport</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Extracts data from multiple RRD files and presents it in a unified XML format, allowing for cross-RRD analysis.<br><br>


title: DESCRIPTION
content:
<i>rrdtool</i> is a powerful and versatile command-line tool for managing Round Robin Databases (RRDs). It's designed to store and display time-series data, such as network bandwidth, CPU load, temperature, or any other value that changes over time. Its key feature is the "Round Robin" aspect, where the database file has a fixed size, and older data points are automatically consolidated or overwritten as new data arrives. This prevents the database from growing indefinitely. <i>rrdtool</i> provides functionalities to <b>create</b> new RRDs, <b>update</b> them with new data, <b>fetch</b> data, and most notably, <b>graph</b> the stored data into various image formats (like PNG, SVG). It's widely used in system monitoring, network management, and performance analysis, often integrated with tools like Nagios, Cacti, or independently for custom monitoring solutions.


title: CAVEATS
content:
<b>Fixed Size Databases</b>: RRD files have a fixed size. While this prevents indefinite growth, it means older, more granular data is automatically consolidated or lost. Careful planning of Round Robin Archives (RRAs) is crucial.<br><b>Time Synchronization</b>: Accurate system time is critical for <i>rrdtool</i>'s operation, as data is timestamped. Time jumps or synchronization issues can lead to invalid data updates.<br><b>Learning Curve</b>: While powerful, <i>rrdtool</i> can have a steep learning curve, especially for defining complex RRD structures and advanced graphing options (e.g., CDEF, VDEF functions).<br><b>Error Handling</b>: Error messages can sometimes be cryptic, requiring detailed knowledge of the RRD format and command syntax for debugging.<br><b>Data Source Types</b>: Understanding the different data source types (GAUGE, COUNTER, DERIVE, ABSOLUTE, COMPUTE) is essential for correct data interpretation and storage.


title: RRD FILE FORMAT
content:
An RRD file is a binary file optimized for storing time-series data. It contains definitions for <b>Data Sources (DS)</b>, which describe the type of data being collected (e.g., COUNTER for increasing values, GAUGE for current values), and <b>Round Robin Archives (RRA)</b>, which define how data is aggregated and stored over different time periods (e.g., average every 5 minutes for 1 day, average every 30 minutes for 1 month). Understanding this internal structure is key to effective <i>rrdtool</i> usage.


title: INTEGRATION WITH SCRIPTING
content:
<i>rrdtool</i> is primarily a command-line utility, making it exceptionally well-suited for integration into shell scripts, Perl, Python, or other programming languages. This allows for automated data collection, updates, and graph generation, forming the backbone of many custom monitoring systems.


title: HISTORY
content:
<i>rrdtool</i> was created by Tobias Oetiker in 1999 as a successor to <i>mrtg</i> (Multi Router Traffic Grapher), which also used RRD principles but was more limited. Tobias recognized the need for a more generic and flexible tool for handling time-series data beyond just network traffic. The "Round Robin Database" concept itself dates back earlier, but <i>rrdtool</i> popularized its use for general-purpose monitoring. Its design focus was on efficiency, speed, and providing a robust framework for managing time-series data without indefinite storage growth. It quickly became a de facto standard for many open-source monitoring solutions due to its power and flexibility, and continues to be actively maintained and widely used today.


title: PARAMETERS
content:
<b><b>-in</b> <i>file</i></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Specifies the input file containing the RSA key. Defaults to standard input if not specified.<br><br><b><b>-out</b> <i>file</i></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Specifies the output file for the processed key. Defaults to standard output if not specified.<br><br><b><b>-pubin</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Indicates that the input file contains a public key rather than a private key.<br><br><b><b>-pubout</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Outputs the public key from the private key or a public key input.<br><br><b><b>-text</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Prints the public and private key components in human-readable form.<br><br><b><b>-noout</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Prevents output of the encoded version of the key. Useful when only information like '<b>-text</b>' or '<b>-modulus</b>' is desired.<br><br><b><b>-check</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Performs an extensive check of the private key for consistency.<br><br><b><b>-modulus</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Prints the modulus value of the RSA key.<br><br><b><b>-passin</b> <i>arg</i></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Specifies the passphrase source for the input key.<br><br><b><b>-passout</b> <i>arg</i></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Specifies the passphrase source for encrypting the output key.<br><br><b><b>-des</b> | <b>-des3</b> | <b>-aes128</b> | ...</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Encrypts the output private key using the specified symmetric cipher (e.g., DES, Triple DES, AES).<br><br>


title: DESCRIPTION
content:
<i>rsa.1s</i> specifically refers to the documentation for the <b>openssl rsa</b> command, a powerful utility within the OpenSSL toolkit. This command is primarily used for processing RSA private and public keys. It allows users to read, convert, and output RSA keys in various formats (e.g., PEM, DER, PKCS#1, PKCS#8). <br><br>Key functionalities include extracting the public key from a private key, encrypting/decrypting a private key with a passphrase, checking the consistency of a private key, and displaying key components in human-readable text. It's a fundamental tool for developers and system administrators working with secure communications, digital signatures, and certificate management, enabling precise control over RSA key operations.


title: CAVEATS
content:
<b>rsa.1s</b> (the <b>openssl rsa</b> command) handles sensitive cryptographic material. <br><br><i>Key Security:</i> Always protect private keys with strong, unique passphrases. Avoid storing passphrases directly in scripts or command line history.<br><i>File Permissions:</i> Ensure proper file permissions on key files to prevent unauthorized access. Private keys should typically be readable only by the owner.<br><i>Complexity:</i> Misuse of options or incorrect understanding of key formats can lead to unusable keys or security vulnerabilities. Always back up keys before performing irreversible operations.


title: KEY FORMATS AND CONVERSION
content:
The <b>openssl rsa</b> command is crucial for converting RSA keys between various formats, including PEM (Privacy-Enhanced Mail, a common ASCII Base64 encoded format), DER (Distinguished Encoding Rules, a binary format), PKCS#1 (RSA private key format defined by RSA Laboratories), and PKCS#8 (a standard for storing private keys in an encrypted or unencrypted form). Understanding these formats is essential when interacting with different cryptographic systems or applications.


title: PUBLIC KEY EXTRACTION
content:
A common use case is extracting the public key from an existing RSA private key. The public key can then be shared with others for encryption or signature verification without exposing the sensitive private key. This is typically done using the <b>-pubout</b> option.


title: HISTORY
content:
The <b>rsa.1s</b> command is an integral part of the OpenSSL project, a widely used open-source cryptography library. OpenSSL itself has a long history, originating from SSLeay in the mid-1990s. The <b>rsa</b> command has evolved alongside the OpenSSL toolkit, continuously updated to support new cryptographic standards, improve security features, and address vulnerabilities. Its development reflects the ongoing need for robust tools to manage the foundational RSA algorithm in secure communication protocols like TLS/SSL.


title: SYNOPSIS
content:
python rsactftool.py [-h] [-v] [-n N] [-e E] [-c C] [-p P] [-q Q] [-i FILE] [-o FILE] [--private] [--decrypt] [--attack ATTACK_TYPE]


title: PARAMETERS
content:
<b>-h, --help</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Show the help message and exit.<br><br><b>-v, --verbose</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Increase verbosity, showing more information during the attack process.<br><br><b>-n N, --modulus N</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Specify the RSA modulus N (as an integer).<br><br><b>-e E, --public-exponent E</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Specify the public exponent E (as an integer).<br><br><b>-c C, --ciphertext C</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Specify the ciphertext C (as an integer) to be decrypted.<br><br><b>-p P</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Specify one of the prime factors P of the modulus N (if known).<br><br><b>-q Q</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Specify one of the prime factors Q of the modulus N (if known).<br><br><b>-i FILE, --input-file FILE</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Read RSA parameters (N, e, c, p, q) from an input file (e.g., PEM key, text file).<br><br><b>-o FILE, --output-file FILE</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Write the results (e.g., private key, decrypted message) to an output file.<br><br><b>--private</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Attempt to recover and output the private key parameters (d, p, q) if successful.<br><br><b>--decrypt</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Attempt to decrypt the provided ciphertext using the recovered private key.<br><br><b>--attack ATTACK_TYPE</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Specify a particular attack method to attempt (e.g., 'fermat', 'wiener', 'boneh_durfee'). By default, it tries common attacks.<br><br>


title: DESCRIPTION
content:
The <b>rsactftool.py</b> is a specialized <I>Python script</I> designed to assist in <I>Capture The Flag (CTF)</I> competitions by attacking weak or improperly implemented RSA cryptographic schemes. It automates various known RSA vulnerabilities and attack methods, allowing security enthusiasts and competitors to recover private keys or decrypt ciphertexts when specific conditions are met. <br><br>Common attacks it can perform include Wiener's attack (for small private exponents), Fermat's factorization (for prime factors that are close to each other), common factor attacks, and other methods leveraging properties of RSA parameters (N, e, p, q) that might be exposed or vulnerable. It's an invaluable tool for quickly analyzing RSA challenges in a CTF environment, helping to identify and exploit cryptographic flaws.


title: CAVEATS
content:
This tool is intended for <I>educational and CTF purposes only</I>. It is not designed for attacking strong, properly implemented RSA cryptography and should <I>never be used in a production environment</I> for real-world security assessments. Its effectiveness relies on specific weaknesses or misconfigurations in the RSA parameters. Performance can vary significantly depending on the size of the modulus and the complexity of the attack being performed. Requires Python 3 and its dependencies.


title: HISTORY
content:
<b>rsactftool.py</b> emerged from the Capture The Flag (CTF) community as a response to recurring RSA-based challenges. It is an open-source project, primarily developed and maintained on GitHub, with contributions from various security researchers and CTF players. Its development focuses on consolidating and automating known mathematical and cryptographic attacks against RSA, making it a go-to utility for participants in cybersecurity competitions since its inception.


title: SYNOPSIS
content:
<b>openssl rsautl</b> -<i>mode</i> [-in <i>file</i>] [-out <i>file</i>] [-inkey <i>keyfile</i>] [-pubin] [-certin] [-ssl] [-pkcs] [-oaep] [-sign] [-verify] [-raw] [-hexdump] [-keyform PEM|DER] [-passin <i>arg</i>]


title: PARAMETERS
content:
<b><b>-in</b> <i>file</i></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Specifies the input file containing the data to be processed. If not specified, input is read from standard input.<br><br><b><b>-out</b> <i>file</i></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Specifies the output file where the result of the operation will be written. If not specified, output is written to standard output.<br><br><b><b>-inkey</b> <i>keyfile</i></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Specifies the RSA key file to be used for the operation. This can be a private or public key, depending on the chosen mode.<br><br><b><b>-pubin</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Indicates that the input key file is a public key, not a private key. This is required for encryption and verification operations when providing a public key.<br><br><b><b>-certin</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Indicates that the input file contains a certificate from which the public key should be extracted for use.<br><br><b><b>-ssl</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Uses SSL v23 padding. This padding scheme is generally considered insecure for new applications.<br><br><b><b>-pkcs</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Uses PKCS#1 v1.5 padding. This is the default padding for encryption and decryption if no other padding is specified. For encryption, OAEP is generally preferred over PKCS#1 v1.5 for security reasons.<br><br><b><b>-oaep</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Uses PKCS#1 OAEP (Optimal Asymmetric Encryption Padding). This is the recommended padding scheme for encryption and decryption due to its improved security properties compared to PKCS#1 v1.5.<br><br><b><b>-sign</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Performs an RSA signing operation using the provided private key. The input data is hashed and then signed.<br><br><b><b>-verify</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Performs an RSA signature verification operation using the provided public key. The input data is verified against the signature (provided via <b>-in</b>).<br><br><b><b>-encrypt</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Explicitly sets the operation to encryption. Requires a public key. (Often implicit if no other operation is specified and a public key is used).<br><br><b><b>-decrypt</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Explicitly sets the operation to decryption. Requires a private key. (Often implicit if no other operation is specified and a private key is used).<br><br><b><b>-raw</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Performs the RSA operation without any padding. This is highly discouraged for cryptographic operations as it can lead to security vulnerabilities. Typically used for specific testing or raw operations.<br><br><b><b>-hexdump</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Outputs the result of the operation as a hexadecimal dump.<br><br><b><b>-keyform</b> PEM|DER</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Specifies the format of the key file (PEM or DER). PEM is the default and most common format.<br><br><b><b>-passin</b> <i>arg</i></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Specifies the passphrase for the input key file, if it is encrypted. Refer to OpenSSL documentation for accepted argument formats.<br><br>


title: DESCRIPTION
content:
The <b>rsautl</b> utility, typically invoked as openssl rsautl, is a command-line tool within the OpenSSL cryptographic library. It provides functionalities for performing RSA public key operations such as encryption, decryption, signing, and signature verification. It is primarily designed for processing small amounts of data, such as session keys, rather than large files, due to the computational overhead and block size limitations of RSA. Users specify input data, an RSA key (private or public), and the desired operation (encrypt, decrypt, sign, or verify), along with optional padding schemes. While <b>rsautl</b> offers specific RSA functions, the more general <b>pkeyutl</b> command provides similar capabilities for various public key algorithms.


title: CAVEATS
content:
<b>rsautl</b> is designed for handling <i>small amounts of data</i>. Encrypting large files directly with RSA is computationally inefficient and subject to RSA block size limits. For large data, a common practice is to encrypt the data with a symmetric cipher (e.g., AES) and then use RSA to encrypt only the symmetric key. The choice of <i>padding scheme</i> is critical for security; OAEP is generally recommended for encryption over PKCS#1 v1.5, and raw padding should be avoided in production environments.


title: OPERATION MODES AND KEY TYPES
content:
<i>Encryption</i> (<b>-encrypt</b>): Requires a <i>public key</i>.<br><i>Decryption</i> (<b>-decrypt</b>): Requires a <i>private key</i>.<br><i>Signing</i> (<b>-sign</b>): Requires a <i>private key</i>.<br><i>Verification</i> (<b>-verify</b>): Requires a <i>public key</i>.<br><br>The tool automatically infers the operation mode if a specific mode is not provided, based on the key type (public/private) and the presence of <b>-sign</b> or <b>-verify</b>.


title: PADDING SCHEMES EXPLAINED
content:
<b>PKCS#1 v1.5</b>: The traditional RSA padding scheme. While widely supported, it has known vulnerabilities for encryption if not implemented carefully.<br><b>PKCS#1 OAEP (Optimal Asymmetric Encryption Padding)</b>: A more secure and recommended padding scheme for RSA encryption, offering probabilistic encryption and resistance to various attacks.<br><b>SSL v23</b>: A legacy padding scheme associated with SSL/TLS versions 2 and 3. Generally not recommended for new applications due to security concerns.<br><b>Raw</b>: No padding applied. <i>Highly discouraged</i> for cryptographic use cases as it exposes the underlying RSA algorithm to direct attacks and removes essential security features.


title: SYNOPSIS
content:
<b>rsh</b> [<b>-l</b> <i>user</i>] [<b>-n</b>] [<b>-t</b>] [<b>-x</b>] <i>host</i> [<i>command</i> ...]


title: PARAMETERS
content:
<b><b>-l</b> <i>user</i></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Specifies the username to use on the remote host. If omitted, the local username is used.<br><br><b><b>-n</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Redirects input from <i>/dev/null</i>. This is useful when running <i>rsh</i> in the background.<br><br><b><b>-t</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Forces pseudo-terminal allocation. This can be useful for commands that expect interactive input or terminal-specific features.<br><br><b><b>-x</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Disables X11 forwarding. By default, <i>rsh</i> may attempt to forward X11 connections.<br><br>


title: DESCRIPTION
content:
<i>rsh</i> (remote shell) is a command-line utility that allows users to execute commands on a remote host without explicitly logging in. It is part of the traditional "r-commands" suite (along with <i>rlogin</i> and <i>rcp</i>) that originated from the Berkeley Software Distribution (BSD) Unix. To establish a connection, <i>rsh</i> relies on a "trusted host" mechanism, typically configured via the <i>/etc/hosts.equiv</i> file on the remote server or a user's <i>~/.rhosts</i> file. If the client host and/or user are listed as trusted, the remote command is executed without requiring password authentication. While convenient for local area networks with high levels of implicit trust, <i>rsh</i> transmits all data, including usernames and command output, in plaintext. This severe security vulnerability has led to its deprecation on modern systems in favor of more secure alternatives like <i>ssh</i>.


title: CAVEATS
content:
<i>rsh</i> is considered highly insecure and should be avoided on untrusted networks or for sensitive operations. It transmits all information, including usernames, passwords (if authentication were to occur, though it typically relies on trust), and command output, in plaintext, making it vulnerable to packet sniffing and man-in-the-middle attacks. The underlying trust model, based on IP addresses and hostnames, is susceptible to IP spoofing and DNS spoofing, allowing attackers to impersonate trusted hosts. Due to these critical security flaws, <i>rsh</i> is disabled by default on most modern Linux distributions and is largely deprecated in favor of <i>ssh</i>.


title: SECURITY IMPLICATIONS
content:
The primary concern with <i>rsh</i> is its complete lack of encryption. All data transmitted between the client and server, including any credentials (though typically authentication is bypassed via trust), commands, and their output, is sent in plaintext. This makes it trivial for an attacker on the same network to intercept and read sensitive information using tools like packet sniffers. Furthermore, the IP-based trust mechanism is vulnerable to IP spoofing, where an attacker can forge their IP address to appear as a trusted host, gaining unauthorized access.


title: TRUST MECHANISM
content:
<i>rsh</i> relies on a simple, host-based authentication system. On the remote server, two files govern trust: <i>/etc/hosts.equiv</i> and <i>~/.rhosts</i>.<br><ul><li><b>/etc/hosts.equiv</b>: A system-wide file listing trusted hosts and, optionally, users from those hosts who are allowed to execute commands without a password.</li><li><b>~/.rhosts</b>: A per-user file in a user's home directory on the remote host, listing trusted hosts and users who can connect as that specific user.</li></ul>While convenient, this trust model is inherently insecure as it doesn't verify the identity of the connecting host cryptographically, leading to the vulnerabilities mentioned above.


title: HISTORY
content:
<i>rsh</i> originated in the early 1980s as part of the Berkeley Software Distribution (BSD) Unix operating system, forming a core component of the "r-commands" suite designed for convenient remote access within trusted local area networks. It gained significant popularity throughout the 1980s and early 1990s as a simple way to automate tasks across Unix systems. However, with the exponential growth of the internet and the increasing demand for secure communications, <i>rsh</i>'s fundamental design flaw—plaintext transmission of data and reliance on an easily spoofed trust model—became a critical liability. This led to the development and widespread adoption of the Secure Shell (SSH) protocol in the mid-1990s, which offered robust encryption and authentication, effectively rendering <i>rsh</i> obsolete for secure environments.


title: SEE ALSO
content:
<b>ssh</b>(1) - Secure Shell client, <b>scp</b>(1) - Secure Copy (file copy over SSH), <b>rlogin</b>(1) - Remote login, <b>rcp</b>(1) - Remote copy (file copy using rsh/rlogin protocol), <b>telnet</b>(1) - User interface to the TELNET protocol


title: SYNOPSIS
content:
<b>rspamc</b> [<i>options</i>] <i>command</i> [<i>arguments</i>]<br><br><i>Common commands:</i><br><i>  check</i> <i>[filename]</i>: Check a message for spam.<br><i>  learn_spam</i> <i>[filename]</i>: Teach Rspamd that a message is spam.<br><i>  learn_ham</i> <i>[filename]</i>: Teach Rspamd that a message is ham.<br><i>  add_symbol</i> <i>&lt;symbol&gt;</i>: Add a custom symbol to the learning database.<br><i>  del_symbol</i> <i>&lt;symbol&gt;</i>: Delete a custom symbol from the learning database.<br><i>  stat</i>: Show statistics about the Rspamd daemon.<br><i>  status</i>: Show basic status of the Rspamd daemon.<br><i>  symbols</i>: List all available Rspamd symbols.


title: PARAMETERS
content:
<b><b>-h</b>, <b>--help</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Show a help message and exit.<br><br><b><b>-P</b>, <b>--port</b> <i>&lt;port&gt;</i></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Connect to the specified port (default: 11333).<br><br><b><b>-H</b>, <b>--host</b> <i>&lt;hostname&gt;</i></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Connect to the specified host (default: localhost).<br><br><b><b>-u</b>, <b>--url</b> <i>&lt;url&gt;</i></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Connect to a specific Rspamd HTTP API URL.<br><br><b><b>-p</b>, <b>--password</b> <i>&lt;password&gt;</i></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Password for authenticated commands (e.g., learn, symbol management).<br><br><b><b>-d</b>, <b>--deliver-to</b> <i>&lt;recipient&gt;</i></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Specify the recipient for the email (used for per-user settings).<br><br><b><b>-i</b>, <b>--ip</b> <i>&lt;sender_ip&gt;</i></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Specify the sender's IP address.<br><br><b><b>-s</b>, <b>--sender</b> <i>&lt;sender_email&gt;</i></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Specify the sender's email address.<br><br><b><b>-v</b>, <b>--verbose</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Enable verbose output.<br><br><b><b>-C</b>, <b>--config-file</b> <i>&lt;path&gt;</i></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Path to the rspamc configuration file.<br><br><b><b>-j</b>, <b>--json</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Output results in JSON format.<br><br><b><b>-f</b>, <b>--file</b> <i>&lt;path&gt;</i></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Read message from specified file instead of stdin.<br><br><b><b>-c</b>, <b>--command</b> <i>&lt;command&gt;</i></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Specify the command to execute (alternative to positional argument).<br><br>


title: DESCRIPTION
content:
<b>rspamc</b> is the command-line client for the <i>Rspamd</i> spam filtering system.<br>It allows users and scripts to interact with the <i>Rspamd</i> daemon to perform various operations, including checking messages for spam, learning from messages (marking them as spam or ham), managing custom symbols, and querying the daemon's operational status and statistics.<br>It's commonly used in mail processing pipelines to integrate <i>Rspamd</i>'s powerful and highly performant filtering capabilities, often reading email content from standard input or a file and returning results in a human-readable format or structured JSON for automated processing.


title: CAVEATS
content:
<b>rspamc</b> requires a running <i>Rspamd</i> daemon to function.<br>Authentication (using <b>-p</b>/<b>--password</b>) is necessary for sensitive commands like <i>learn_spam</i>, <i>learn_ham</i>, <i>add_symbol</i>, and <i>del_symbol</i>, unless the <i>Rspamd</i> configuration explicitly allows unauthenticated access from the client's IP.<br>Ensure proper network connectivity and firewall rules if connecting to a remote <i>Rspamd</i> instance.


title: INPUT AND OUTPUT
content:
<b>rspamc</b> can read email messages from standard input (stdin) or from a specified file using the <b>-f</b> option.<br>For example, to check an email file: <code>cat <i>email.eml</i> | rspamc check</code> or <code>rspamc check <i>email.eml</i></code>.<br>Output can be displayed in a human-readable format or in machine-parseable JSON format using the <b>-j</b> option, which is useful for scripting and integration with other systems.


title: HISTORY
content:
<i>Rspamd</i> was initially developed by Vsevolod Stakhov as a performant, open-source spam filtering system, designed as a modern alternative to <i>SpamAssassin</i>.<br>Its development focuses on high performance, flexibility, and extensibility, leveraging technologies like C, Lua, and libev.<br><b>rspamc</b> emerged as the primary command-line interface for interacting with the <i>Rspamd</i> daemon, reflecting its modular architecture and client-server design.


title: SYNOPSIS
content:
<I>rspec</I> [OPTIONS] [FILES_OR_DIRECTORIES]<br><br>Examples:<br> <I>rspec</I> (Runs all specs in the default `spec` directory)<br> <I>rspec spec/models/user_spec.rb</I> (Runs a specific spec file)<br> <I>rspec -f d</I> (Runs all specs with documentation formatter)<br> <I>rspec --init</I> (Initializes RSpec in the current directory)


title: PARAMETERS
content:
<b><B>-f</B>, <B>--format</B> <I>FORMATTER</I></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Specifies the output formatter (e.g., 'progress', 'documentation', 'html').<br><br><b><B>-d</B>, <B>--dry-run</B></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Don't run examples, just show what would run.<br><br><b><B>-e</B>, <B>--example</B> <I>PATTERN</I></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Runs examples whose full descriptions match the given pattern.<br><br><b><B>-t</B>, <B>--tag</B> <I>TAG</I></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Runs examples tagged with the specified tag (e.g., `--tag focus`).<br><br><b><B>--require</B> <I>FILE</I></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Requires a file before running tests (useful for custom helpers).<br><br><b><B>--init</B></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Initializes RSpec in the current directory by creating necessary files and folders.<br><br><b><B>--color</B>, <B>--no-color</B></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Enables or disables color output in the console.<br><br><b><B>-b</B>, <B>--backtrace</B></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Shows the full backtrace for failures.<br><br><b><B>--fail-fast</B></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Aborts the test run after the first failure.<br><br><b><B>-l</B>, <B>--line_number</B> <I>LINE</I></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Runs the example located at a specific line number within a file.<br><br><b><B>--order</B> <I>RAND</I></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Randomizes the order of examples for better test isolation (e.g., 'rand', 'defined').<br><br><b><B>--help</B></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Displays the help message and exits.<br><br>


title: DESCRIPTION
content:
RSpec is a powerful testing framework for the Ruby programming language, widely adopted for <I>Behavior-Driven Development</I> (BDD). It provides a structured and readable way to describe the expected behavior of Ruby applications through executable examples. Unlike traditional unit testing frameworks, RSpec encourages writing "specs" that read like natural language, making tests more understandable to a broader audience, including business stakeholders.<br><br>The framework comprises several core components: <I>rspec-core</I> (the test runner), <I>rspec-expectations</I> (for expressing assertions), and <I>rspec-mocks</I> (for creating test doubles like stubs and mocks). Developers define system behaviors using <I>describe</I> blocks for components and <I>it</I> blocks for specific examples, utilizing <I>expect</I> to assert outcomes. When executed, <I>rspec</I> runs these examples and reports successes or failures, providing immediate feedback during development and helping ensure code quality. It's typically installed as a Ruby gem within a project's dependency management system.


title: CAVEATS
content:
RSpec is not a built-in Linux utility. It requires the Ruby programming language and the RSpec gem to be installed on the system. Its usage is primarily within Ruby software development contexts.


title: <B>BDD PHILOSOPHY</B>
content:
RSpec is built upon the principles of <I>Behavior-Driven Development</I> (BDD), a software development methodology that extends Test-Driven Development (TDD) by focusing on describing the desired behavior of software from the perspective of its users or stakeholders. This approach leads to more readable, maintainable, and collaborative test suites that often serve as living documentation for the application.


title: <B>PROJECT INTEGRATION</B>
content:
For Ruby projects, RSpec is typically added as a dependency in the project's <I>Gemfile</I> and installed via `bundle install`. Running `rspec --init` in a project directory sets up the necessary structure, including a `spec/` directory for test files and a `spec_helper.rb` for shared configuration and setup logic.


title: HISTORY
content:
RSpec emerged around 2005-2006, influenced by other BDD tools and testing frameworks like JMock and NUnit. It quickly gained traction in the Ruby community for its expressive syntax and focus on behavior. Key figures in its development include Steven Baker, David Chelimsky, and Myron Marston. The framework has undergone several major version updates, continually refining its API and performance, solidifying its position as the dominant testing tool for Ruby on Rails and other Ruby applications. Its popularity significantly contributed to the adoption of BDD principles in agile development.


title: PARAMETERS
content:
<b><b>--config</b>=<i>&lt;path&gt;</i></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Specify an alternative configuration file path. Defaults to <i>~/.rss2email/config.py</i>.<br><br><b><b>--email-field</b>=<i>&lt;field&gt;</i></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Override the default email field (e.g., 'To', 'From', 'Subject') for generated emails.<br><br><b><b>--html-email</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Force sending emails in HTML format, even if not explicitly configured for the feed.<br><br><b><b>--full-text</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Attempt to extract the full text of articles from linked pages, rather than just the feed's summary. Requires the <i>readability-lxml</i> Python library.<br><br><b><b>--template</b>=<i>&lt;path&gt;</i></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Specify a custom Jinja2 template file for rendering email content.<br><br><b><b>--dry-run</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Process feeds and show what emails would be sent, but do not actually send them. Useful for testing configurations.<br><br><b><b>--log-level</b>={debug|info|warning|error|critical}</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Set the verbosity level for logging output.<br><br><b><b>--verbose</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Provide more detailed output during execution.<br><br><b><b>--debug</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Enable debug mode, which typically provides extensive diagnostic output.<br><br><b><b>--force</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Force processing even if errors or warnings are encountered, or re-send previously sent items.<br><br><b><b>-v</b>, <b>--version</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Display the program's version number and exit.<br><br><b><b>-h</b>, <b>--help</b> [<i>command</i>]</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Display a help message for the main command or a specific subcommand.<br><br>


title: DESCRIPTION
content:
<i>rss2email</i> is a versatile command-line utility that converts content from RSS and Atom feeds into email messages. It's designed for users who prefer to consume their news, blog updates, or other subscribed content directly in their email client rather than using a dedicated feed reader. The tool periodically checks specified feeds for new entries, formats each new item as an individual email, and then sends these emails via a local Mail Transfer Agent (MTA) like Postfix or Sendmail. This allows for integration with existing email workflows, enabling users to leverage their email client's features for sorting, searching, and archiving feed content. It's particularly useful for automated alerts, monitoring specific topics, or keeping up with frequently updated sources without constantly checking a web interface.


title: CAVEATS
content:
<i>rss2email</i> relies on a properly configured local Mail Transfer Agent (MTA) such as Postfix or Sendmail to send emails. Without an MTA, emails will not be delivered. Care must be taken with configuration, especially regarding email addresses, to prevent potential spam issues. While it can fetch full text, this feature's reliability depends on the website's structure and the effectiveness of the underlying <i>readability-lxml</i> library. Large numbers of feeds or frequent polling might consume significant system resources.


title: <B>TYPICAL USAGE WORKFLOW</B>
content:
A typical workflow involves first initializing a configuration directory with <i>rss2email init</i>. Then, feeds are added using <i>rss2email add &lt;URL&gt;</i>. To process and send emails for new entries, the <i>rss2email run</i> command is executed, usually scheduled periodically via a cron job.


title: <B>SUBCOMMANDS OVERVIEW</B>
content:
Beyond the global options, <i>rss2email</i> operates through a series of subcommands, each performing a specific task:<br><ul><li><b>init</b>: Creates the configuration directory and default <i>config.py</i> file.</li><li><b>add</b> <i>&lt;URL&gt;</i>: Adds a new feed to be monitored. Accepts feed-specific options like <i>--full-text</i> or <i>--html-email</i>.</li><li><b>run</b>: Checks all configured feeds for new entries and sends emails for them.</li><li><b>list</b>: Displays all currently configured feeds and their unique IDs.</li><li><b>delete</b> <i>&lt;ID&gt;</i>: Removes a feed using its numeric ID.</li><li><b>config</b> <i>&lt;key&gt;</i> [<i>&lt;value&gt;</i>]: Used to get or set configuration variables in the <i>config.py</i> file.</li></ul>


title: <B>CONFIGURATION</B>
content:
<i>rss2email</i> uses a Python-based configuration file (default: <i>~/.rss2email/config.py</i>) for its settings. This file allows for extensive customization, including the default email recipient (<i>R2E_EMAIL_ADDRESS</i>), sender, subject line formatting, HTML vs. plain text output, and more. It can be edited directly using a text editor or managed conveniently via the <i>rss2email config</i> subcommand.


title: HISTORY
content:
Developed as a Python script, <i>rss2email</i> emerged as a solution for users who preferred to integrate their RSS/Atom feed consumption into their existing email workflows. Its development predates the widespread adoption of dedicated web-based feed readers, offering a flexible, command-line driven alternative. It has undergone various iterations, adapting to changes in Python and feed standards, maintaining its utility for automated content delivery.


title: SYNOPSIS
content:
<b>rstart</b> [<i>OPTIONS</i>] <i>HOST</i> [<i>COMMAND_OR_SERVICE</i>]<br><br><i>(Note: This is a hypothetical synopsis for a non-standard command. Actual syntax depends on implementation.)</i>


title: PARAMETERS
content:
<b>-h, --help</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Display help information and exit.<br><br><b>-u, --user <i>USER</i></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Specify the username to use for authentication on the remote host.<br><br><b>-p, --port <i>PORT</i></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Specify the port to connect to on the remote host (if applicable, e.g., for SSH).<br><br><b>-b, --background</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Start the remote command or service in the background on the remote host.<br><br><b>-f, --force</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Attempt to start the service even if it's already running (implementation specific).<br><br><b>-c, --config <i>FILE</i></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Use a specified configuration file for connection parameters or remote commands.<br><br><b><i>HOST</i></b><br>&nbsp;&nbsp;&nbsp;&nbsp;The hostname or IP address of the remote machine where the command/service should be started.<br><br><b><i>COMMAND_OR_SERVICE</i></b><br>&nbsp;&nbsp;&nbsp;&nbsp;The command to execute or the name of the service to start on the remote host.<br><br>


title: DESCRIPTION
content:
<b>rstart</b> is <i>not a standard Linux command</i> found in most common distributions. Its functionality, if it exists, is typically part of a specific software package, a custom script, or an older, specialized system component (e.g., related to XDM remote display management in certain contexts).<br><br><i>Hypothetically</i>, if an <b>rstart</b> command were implemented, it would likely facilitate the remote execution or initiation of a process or service on a specified remote host. This could involve using underlying protocols like SSH, RSH (less common now due to security), or a custom remote procedure call (RPC) mechanism. Its primary purpose would be to automate the starting of applications, daemons, or scripts on a remote machine without requiring an interactive login.<br><br>Users might find custom <b>rstart</b> scripts in environments where particular applications need to be launched remotely and repeatedly, or as part of a larger system administration toolkit. Due to its non-standard nature, its exact behavior, options, and security implications would vary greatly depending on its specific implementation.


title: CAVEATS
content:
<b>rstart</b> is <i>not a universally recognized or standard Linux command</i>. Its existence and functionality depend entirely on specific software installations or custom scripts.<br><br>If you encounter <b>rstart</b>, it's likely a custom wrapper, an old utility from a niche package, or part of an embedded system's toolset.<br><br>Security implications are significant for any remote execution command. Ensure that the underlying remote access mechanisms (e.g., SSH keys, passwords) are properly secured and that the remote command being executed is trusted.<br><br>Documentation for a custom <b>rstart</b> would need to be found within the specific project or system it belongs to.


title: COMMON IMPLEMENTATIONS
content:
If an <b>rstart</b> command is found, it's often a custom script (e.g., Bash, Python) that wraps <b>ssh</b> commands to perform specific tasks. For example, it might:<br><br><ul><li>Run a predefined command on the remote host (e.g., <code>ssh user@host "nohup /path/to/service &"</code>).</li><li>Use <b>systemctl</b> or <b>service</b> commands remotely (e.g., <code>ssh user@host "sudo systemctl start my_service"</code>).</li><li>Transfer and execute a script remotely.</li></ul><br>Due to this variability, always inspect the source or local documentation if you encounter an <b>rstart</b> command.


title: SECURITY CONSIDERATIONS
content:
When using any command that initiates remote processes, security is paramount. Ensure:<br><br><ul><li>Strong authentication methods (e.g., SSH key pairs instead of passwords).</li><li>Least privilege principle: The remote user account should only have necessary permissions.</li><li>Network security: Use firewalls to restrict access to the remote host.</li><li>Data integrity: Ensure commands and data transmitted are not tampered with.</li></ul><br>Avoid hardcoding credentials within scripts.


title: HISTORY
content:
There is <i>no general history</i> for a standard <b>rstart</b> command across Linux distributions. Any command named <b>rstart</b> would have its history tied to the specific project or organization that developed it. Historically, some X11 display managers (like <b>xdm</b>) used internal mechanisms that might have been conceptually related to 'remote start' for X client applications, but this was not a user-facing <b>rstart</b> command.


title: SYNOPSIS
content:
<b>rstartd</b> [options]<br><i>(Typically launched by inetd or xinetd, without direct command-line invocation from users.)</i>


title: PARAMETERS
content:
<b><b>-a</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Use <i>xauth</i> for authentication. This option instructs <i>rstartd</i> to add a new X authorization entry for the remote display and remove it upon process exit. This is generally the preferred and more secure method for handling X authorization.<br><br><b><b>-s</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Use <i>xauth</i> for authentication, but only add an authorization entry if one doesn't already exist for the given display. This can be less robust for cleanup than <b>-a</b>.<br><br><b><b>-v</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Enable verbose output. This option causes <i>rstartd</i> to print detailed debugging information to standard error, which is useful for troubleshooting connection or execution issues.<br><br><b><b>-p</b> <I>path</I></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Specify the full path to the <i>xauth</i> program. This is useful if <i>xauth</i> is not found in <i>rstartd</i>'s default PATH or if a specific version needs to be used.<br><br>


title: DESCRIPTION
content:
<i>rstartd</i> is a daemon program designed to facilitate the remote launching of X Window System applications and other programs. It typically runs on a server and listens for incoming connections, usually on TCP port 514 (the <i>shell</i> service port). When a remote client (such as <i>rstart</i>) connects, <i>rstartd</i> performs authentication, often relying on the traditional <i>.rhosts</i> or <i>/etc/hosts.equiv</i> files for trusted host/user validation. Upon successful authentication, it receives a command to execute along with necessary environment variables and X display information. <i>rstartd</i> then forks a child process to run the requested command, ensuring proper X authorization setup (e.g., using <i>xauth</i>) and standard I/O redirection. It's particularly useful in environments where users need to run applications on a powerful remote machine while displaying them on their local X workstation. After the launched application exits, <i>rstartd</i> handles the cleanup of temporary X authorization entries.


title: CAVEATS
content:
<b>Security Risks:</b> <i>rstartd</i> relies on the inherently insecure <i>.rhosts</i> and <i>/etc/hosts.equiv</i> authentication mechanisms, making it vulnerable to IP spoofing and DNS attacks. It also lacks encryption for data in transit. For these reasons, it is largely superseded by <i>SSH</i> with X forwarding.<br><b>Configuration Complexity:</b> Requires careful configuration within <i>inetd</i> or <i>xinetd</i>, and correct X authorization setup (<i>xauth</i>) is critical.<br><b>Limited Modern Support:</b> Many modern Linux distributions have deprecated or removed the <i>rstart</i> package due to its security limitations and the availability of superior alternatives.


title: TYPICAL CONFIGURATION
content:
<i>rstartd</i> is almost always launched by a super-server like <i>inetd</i> or <i>xinetd</i> when a connection is received on its designated port. A typical entry in <i>/etc/inetd.conf</i> might look like:<br><b>shell stream tcp nowait root /usr/sbin/rstartd rstartd</b><br>Or in <i>/etc/xinetd.d/rstartd</i> (for <i>xinetd</i>):<br><b>service shell</b><br><b>{</b><br><b>  disable = no</b><br><b>  socket_type = stream</b><br><b>  wait = no</b><br><b>  user = root</b><br><b>  server = /usr/sbin/rstartd</b><br><b>  log_on_success += USERID</b><br><b>  log_on_failure += USERID</b><br><b>}</b>


title: ALTERNATIVES
content:
The recommended and secure alternative for remote X application forwarding is <i>SSH</i>. Using <b>ssh -X user@hostname</b> (or <b>ssh -Y</b> for trusted forwarding) provides encrypted communication, stronger authentication methods, and significantly greater security than <i>rstartd</i>.


title: HISTORY
content:
<i>rstartd</i> is a component of the <i>rstart</i> package, which emerged in the early days of the X Window System (late 1980s/early 1990s). It was developed to address the need for remotely launching graphical applications in a network environment, leveraging existing remote shell (<i>rsh</i>) authentication paradigms. Its design made it convenient for users familiar with the <i>.rhosts</i> system. However, with the advent and widespread adoption of <i>SSH</i> in the late 1990s, which provides secure, encrypted remote access and robust X forwarding capabilities (<i>ssh -X</i>), the use of <i>rstartd</i> has sharply declined. It is now considered an outdated and insecure technology, with most modern systems favoring <i>SSH</i> for remote X application management.


title: SYNOPSIS
content:
<B>rsync</B> [OPTION...] SRC... DEST<br><B>rsync</B> [OPTION...] SRC... [USER@]HOST:DEST<br><B>rsync</B> [OPTION...] [USER@]HOST:SRC... [DEST]<br><B>rsync</B> [OPTION...] [USER@]HOST::SRC... [DEST]


title: PARAMETERS
content:
<b>-a, --archive</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Archive mode; a quick way to sync files while preserving permissions, ownership, timestamps, and symbolic links. Equivalent to -rlptgoD.<br><br><b>-v, --verbose</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Increase verbosity, providing more information about the transfer process.<br><br><b>-z, --compress</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Compress file data during the transfer, useful for slow network connections.<br><br><b>-h, --human-readable</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Output numbers in a human-readable format, such as file sizes.<br><br><b>-n, --dry-run</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Perform a trial run without making any actual changes, useful for testing commands.<br><br><b>-r, --recursive</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Recurse into directories, copying their contents. Implied by -a.<br><br><b>--delete</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Delete extraneous files from the destination directory that are not present in the source.<br><br><b>-P</b><br>&nbsp;&nbsp;&nbsp;&nbsp;A combination of --partial (keep partially transferred files) and --progress (show transfer progress).<br><br><b>--exclude=PATTERN</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Exclude files or directories matching the specified PATTERN from the transfer.<br><br><b>--include=PATTERN</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Don't exclude files or directories matching the specified PATTERN, even if excluded by a previous --exclude rule.<br><br><b>-t, --times</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Preserve modification times of files.<br><br><b>-p, --perms</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Preserve permissions of files.<br><br><b>-g, --group</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Preserve group ownership of files.<br><br><b>-o, --owner</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Preserve owner (user) ownership of files (requires super-user privileges).<br><br><b>--bwlimit=KBPS</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Limit the network bandwidth used by rsync, specified in kilobytes per second.<br><br>


title: DESCRIPTION
content:
<I>rsync</I> is a powerful and versatile command-line utility for <B>synchronizing files and directories</B> between two locations, whether on the same machine or across a network. Its primary strength lies in its <B>delta-transfer algorithm</B>, which detects and transfers only the parts of files that have changed since the last synchronization, significantly reducing data transfer and bandwidth usage. This makes <I>rsync</I> exceptionally efficient for incremental backups, mirroring, and maintaining up-to-date copies of data. Beyond simple copying, <I>rsync</I> can preserve a wide array of file attributes, including permissions, ownership, modification times, symbolic links, hard links, and even extended attributes. It supports various modes of operation, including local file copying, remote synchronization via SSH, and direct connections to an <I>rsync</I> daemon. Its flexibility and efficiency make it an indispensable tool for system administrators and users alike.


title: CAVEATS
content:
<I>rsync</I> is a powerful tool that requires careful usage, especially concerning its deletion features. <B>Always use <I>--dry-run</I> (-n) first</B> when combining with <I>--delete</I> to prevent unintended data loss. The behavior of <I>rsync</I> can be drastically different based on whether the source path has a <B>trailing slash</B> (e.g., <I>src/</I> vs. <I>src</I>). A trailing slash means "copy the contents of this directory," while no trailing slash means "copy the directory itself." When using <I>rsync</I> for remote operations, ensure proper SSH key setup or passwordless authentication for automation, or secure the <I>rsync</I> daemon if used. Preserving ownership (<I>-o</I>) or special files (<I>-D</I>) often requires super-user privileges on the destination system.


title: TRAILING SLASH SEMANTICS
content:
The presence or absence of a trailing slash on the source path fundamentally changes <I>rsync</I>'s behavior. For example, <I>rsync -a src/ dest</I> copies the <B>contents</B> of <I>src</I> into <I>dest</I>. In contrast, <I>rsync -a src dest</I> copies the <B>directory <I>src</I> itself</B> (and its contents) into <I>dest</I>, resulting in <I>dest/src</I>. This distinction is crucial for correct synchronization and mirroring operations.


title: DELTA-TRANSFER ALGORITHM
content:
At its heart, <I>rsync</I> uses a sophisticated algorithm to minimize data transfer. It breaks files into blocks and computes checksums for these blocks. When synchronizing, it compares the checksums of the source file blocks with those of the destination file. Only blocks that have changed or are missing on the destination are transferred, making it extremely efficient for updating large files with small modifications. This significantly reduces network bandwidth usage and transfer time compared to simply copying entire files.


title: HISTORY
content:
<I>rsync</I> was originally authored by Andrew Tridgell and Paul Mackerras, with its <B>first public release in June 1996</B>. Its development was a direct response to the need for a more efficient file transfer utility, particularly over slow or unreliable networks. The core innovation behind <I>rsync</I>'s efficiency is its <B>delta-transfer algorithm</B>, which intelligently detects and transfers only the differences between files, rather than copying entire files. This groundbreaking approach quickly established <I>rsync</I> as an indispensable tool for backups, mirroring, and general system administration, significantly influencing the design of subsequent data synchronization protocols.


title: PARAMETERS
content:
<b>-f <i><config-file></i></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Specify an alternative configuration file to use instead of the default.<br><br><b>-i <i><pid-file></i></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Specify an alternative PID file to use instead of the default <i>/var/run/rsyslogd.pid</i>.<br><br><b>-N <i><level></i></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Check configuration file syntax and exit. The <i>level</i> determines the verbosity of the check (e.g., 1 for warnings, 2 for verbose errors).<br><br><b>-C</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Do not daemonize. Forces <b>rsyslogd</b> to stay in the foreground, useful for debugging.<br><br><b>-D</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Enable debug mode, producing extensive diagnostic output to standard error.<br><br><b>-M <i><module-name></i></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Load a specific rsyslog module at startup. This option can be specified multiple times.<br><br><b>-v</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Print the version information and exit.<br><br>


title: DESCRIPTION
content:
<b>rsyslogd</b> is the <b>Rocket-fast SYStem LOGger</b> daemon, a modern and highly configurable replacement for the traditional <b>syslogd</b>. It's designed to provide robust and secure message logging capabilities for Unix-like systems. <b>rsyslogd</b> collects log messages from various sources, including the kernel, system processes, applications, and remote machines.<br><br>Its primary function is to process these messages according to a set of rules defined in its configuration file, typically <i>/etc/rsyslog.conf</i>. This processing can involve writing logs to local files, forwarding them to remote log servers (over TCP, UDP, or encrypted TLS connections), writing to databases, or even sending them to message queues. <b>rsyslogd</b> supports advanced filtering, content modification, and a modular architecture, making it suitable for high-performance and secure log management in complex environments.


title: CAVEATS
content:
Configuring <b>rsyslogd</b> can be complex due to its extensive features and rule-based processing. Improper configuration might lead to performance issues, security vulnerabilities (especially with remote logging), or loss of critical log data.<br><br>Ensure proper file permissions on log directories and files to prevent unauthorized access or modification. When forwarding logs over the network, strong encryption (TLS) should be used for sensitive information.


title: CONFIGURATION FILE
content:
The primary configuration for <b>rsyslogd</b> is typically located at <i>/etc/rsyslog.conf</i>. This file uses a directive-based syntax to define input sources, processing rules, output destinations, and other system-wide parameters for log management. It can also include additional configuration files from a directory like <i>/etc/rsyslog.d/</i>.


title: MODULARITY
content:
<b>rsyslogd</b> is built with a highly modular architecture, allowing it to support various input (e.g., <i>imuxsock</i> for Unix sockets, <i>imudp</i> for UDP, <i>imtcp</i> for TCP) and output modules (e.g., <i>omfile</i> for files, <i>ommydb</i> for databases, <i>omelasticsearch</i> for Elasticsearch). This modularity extends its functionality significantly beyond basic logging.


title: LOG FORMATS
content:
<b>rsyslogd</b> supports a variety of log formats, including the traditional BSD syslog protocol (RFC 3164), the more modern and structured IETF syslog protocol (RFC 5424), and various custom templates. It can also output logs in structured data formats like JSON, often used for integration with centralized logging systems.


title: HISTORY
content:
The original <b>syslogd</b> daemon has been a staple of Unix-like systems for decades, providing basic message logging. However, its limitations in terms of reliability, security, and advanced filtering led to the development of modern alternatives.<br><br><b>rsyslog</b> (Rocket-fast SYStem LOGger) was created by Rainer Gerhards as a high-performance, enterprise-class logging solution. It started gaining prominence in the mid-2000s, offering features like reliable TCP transport, TLS encryption, database output, and sophisticated filtering capabilities. Due to its robustness and flexibility, <b>rsyslogd</b> has become the default syslog daemon on many major Linux distributions, including Debian, Ubuntu, and Red Hat Enterprise Linux/CentOS, replacing the older <b>syslogd</b> and <b>sysklogd</b> implementations.


title: SYNOPSIS
content:
There is <I>no standard synopsis</I> for <I>rtacct</I> as it is not a recognized Linux command. If it were a custom utility, its syntax would depend entirely on its specific implementation.


title: DESCRIPTION
content:
The command <I>rtacct</I> is <I>not a standard Linux command</I> and is <I>not typically found</I> in common distributions (e.g., Debian, Ubuntu, CentOS, Fedora) as part of core utilities or standard accounting packages. Its name suggests 'real-time accounting,' which refers to the process of collecting and analyzing system resource usage data as it happens. While Linux systems offer various mechanisms for process, network, and resource accounting (such as the <I>acct</I> service, <I>netfilter</I>/<I>nftables</I> accounting, or kernel-level statistics), there is no single, widely-adopted command named <I>rtacct</I> to provide a generic real-time accounting interface. If encountered, <I>rtacct</I> likely refers to a <I>custom script</I>, a <I>niche utility</I> from a specialized environment, or perhaps a component of a specific network device's firmware or a very old/obscure Unix-like system. Users should not expect to find <I>rtacct</I> on a typical Linux installation.


title: CAVEATS
content:
The most significant caveat is that <I>rtacct</I> is <I>not a standard or widely available Linux command</I>. Attempting to use it on a typical Linux system will likely result in a 'command not found' error. Users interested in real-time accounting should explore established Linux tools and kernel features like <I>acct</I>, <I>sa</I>, <I>netstat</I>, <I>ss</I>, <I>ip -s</I>, <I>procfs</I> entries, <I>cgroups</I>, or specialized network monitoring tools.


title: UNDERSTANDING REAL-TIME ACCOUNTING IN LINUX
content:
While <I>rtacct</I> isn't a command, the concept of real-time accounting is crucial for system monitoring, performance tuning, and security. In Linux, this often involves a combination of kernel features (like <I>perf</I> events, <I>eBPF</I>, <I>cgroups</I>, <I>procfs</I>, <I>sysfs</I>), user-space tools that read and process these kernel statistics (<I>top</I>, <I>htop</I>, <I>vmstat</I>, <I>iostat</I>, <I>netstat</I>, <I>sar</I>), and potentially specialized daemons or frameworks (e.g., for network flow accounting, deep packet inspection, or application-level metrics). Implementing real-time accounting typically requires careful configuration of kernel modules and user-space applications to capture, store, and visualize the desired metrics without significant performance overhead.


title: HISTORY
content:
As <I>rtacct</I> is <I>not a standard, officially documented Linux command</I>, there is <I>no public development history or widespread usage pattern</I> to describe. Any historical presence would be confined to specific, non-mainstream operating system variants or custom system administrations.


title: SEE ALSO
content:
<b><I>acct(8)</I></b>: Process accounting utility., <b><I>sa(8)</I></b>: Summarize accounting data., <b><I>lastcomm(1)</I></b>: Show information about previously executed commands., <b><I>dump-acct(8)</I></b>: Dump process accounting file in readable format., <b><I>netstat(8)</I></b> or <b><I>ss(8)</I></b>: Network statistics., <b><I>ip(8)</I></b>: (with <I>-s</I> option for statistics) Network interface statistics., <b><I>nfacct(8)</I></b> (from <I>netfilter</I>): <I>nftables</I> accounting.


title: SYNOPSIS
content:
<b>rtcwake</b> [<i>options</i>] [<b>-d</b> <i>device</i>] [<b>-m</b> <i>mode</i>] { <b>-s</b> <i>seconds</i> | <b>-t</b> <i>time_t</i> | <b>-A</b> } [ <b>-l</b> | <b>-u</b> ]


title: PARAMETERS
content:
<b><b>-A</b>, <b>--show-alarm</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Displays the current RTC alarm time and then exits. This option cannot be combined with setting an alarm time.<br><br><b><b>-d</b> <i>device</i>, <b>--device=</b><i>device</i></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Specifies the RTC device to use, for example, <i>rtc0</i> or <i>rtc1</i>. The default is usually <i>rtc0</i>.<br><br><b><b>-m</b> <i>mode</i>, <b>--mode=</b><i>mode</i></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Defines the system power state <b>rtcwake</b> should transition to after setting the alarm. Valid modes include:<br><i><b>no</b></i>: Do not suspend, just set the alarm.<br><i><b>mem</b></i>: Suspend to RAM (ACPI S3 state).<br><i><b>disk</b></i>: Suspend to disk (ACPI S4 state, hibernate).<br><i><b>off</b></i>: Power off the system (ACPI S5 state). Requires proper BIOS and hardware support.<br><i><b>disable</b></i>: Disables any pending RTC alarm.<br><i><b>show</b></i>: Displays the current RTC alarm time (similar to <b>-A</b>).<br><br><b><b>-s</b> <i>seconds</i>, <b>--seconds=</b><i>seconds</i></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Sets the RTC alarm to trigger after the specified <i>seconds</i> from the current time. This option is mutually exclusive with <b>-t</b> and <b>-A</b>.<br><br><b><b>-t</b> <i>time_t</i>, <b>--time=</b><i>time_t</i></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Sets the RTC alarm to trigger at the specified <i>time_t</i>, which is the number of seconds since the Unix epoch (January 1, 1970, 00:00:00 UTC). This option is mutually exclusive with <b>-s</b> and <b>-A</b>.<br><br><b><b>-l</b>, <b>--local</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Interprets the specified time (with <b>-t</b> or <b>-s</b>) as being in the local timezone. By default, <b>rtcwake</b> attempts to determine whether the RTC is set to local time or UTC.<br><br><b><b>-u</b>, <b>--utc</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Interprets the specified time (with <b>-t</b> or <b>-s</b>) as being in UTC. By default, <b>rtcwake</b> attempts to determine whether the RTC is set to local time or UTC.<br><br><b><b>-n</b>, <b>--dry-run</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Performs a dry run: it shows what would happen without actually setting the alarm or suspending the system.<br><br><b><b>-v</b>, <b>--verbose</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Enables verbose output, providing more information about the command's execution.<br><br><b><b>-h</b>, <b>--help</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Displays a help message and exits.<br><br><b><b>-V</b>, <b>--version</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Displays version information and exits.<br><br>


title: DESCRIPTION
content:
The <b>rtcwake</b> command is a utility designed to interact with the system's Real-Time Clock (RTC) and its alarm functionality. Its primary purpose is to set a hardware alarm that can cause the system to wake up from a suspended state (like suspend-to-RAM or suspend-to-disk) or, if supported by the hardware and BIOS, to power on from a powered-off state. This is particularly useful for scheduling unattended system operations, such as nightly backups or system maintenance, without needing the system to remain fully powered on.<br><br><b>rtcwake</b> can set an alarm for a specific number of seconds from now or for an absolute time (seconds since epoch). It also provides options to query the current RTC alarm time or to disable an existing alarm. The command handles the different system power states (sleep modes) like S3 (suspend-to-RAM), S4 (suspend-to-disk/hibernate), and S5 (power off). Proper functionality, especially for power-off wake-up, heavily relies on the underlying hardware and BIOS support. Running <b>rtcwake</b> typically requires root privileges as it interacts directly with kernel hardware interfaces.


title: CAVEATS
content:
Using <b>rtcwake</b> requires root privileges (<code>CAP_SYS_ADMIN</code> capability).<br>The success of suspend/hibernate/power-off modes (<b>-m mem</b>, <b>-m disk</b>, <b>-m off</b>) depends heavily on the underlying hardware, BIOS/UEFI firmware, and kernel support for ACPI power management.<br>Incorrect configuration of the system clock (e.g., whether the RTC is set to UTC or local time via <code>/etc/adjtime</code>) can lead to alarms triggering at unexpected times.<br>Some RTC hardware might not support all alarm features or may have limitations on alarm resolution.


title: RTC AND TIMEZONES
content:
For <b>rtcwake</b> to function correctly with absolute times (using <b>-t</b>), it's crucial that the system accurately knows whether the hardware RTC is set to UTC or local time. Linux typically determines this from the <code>UTC</code> entry in the <code>/etc/adjtime</code> file. If this file is missing or incorrect, or if the RTC's time zone setting is ambiguous, <b>rtcwake</b> might interpret the alarm time incorrectly. The <b>-l</b> (local) and <b>-u</b> (UTC) options provide explicit control over this interpretation, overriding the system's default behavior.


title: HISTORY
content:
<b>rtcwake</b> is a long-standing utility included in the <i>util-linux</i> package, which provides a set of essential system utilities for Linux. Its origins trace back to the early days of Linux power management, offering a direct way to schedule system wake-ups via the hardware RTC. While modern systems often use higher-level power management frameworks like <b>systemd</b>'s built-in suspend/hibernate capabilities, <b>rtcwake</b> remains a fundamental tool for direct RTC interaction, particularly useful for scripting and embedded systems. Over time, options like <b>-m off</b> were added to support powering off the system and waking it up, and certain older options like <b>-a</b> (auto) have been deprecated.


title: DESCRIPTION
content:
<b>rtkitctl</b> is a command-line utility designed for basic interaction with the <I>RealtimeKit</I> D-Bus system service. <I>RealtimeKit</I> acts as a security broker, enabling unprivileged applications (like audio servers) to safely acquire real-time scheduling priority and lock memory (<I>RLIMIT_RTPRIO</I> and <I>RLIMIT_MEMLOCK</I> capabilities) without requiring root privileges directly for the application itself.<br>This functionality is critical for low-latency audio and video processing, preventing glitches and ensuring smooth operation by granting applications the necessary CPU time.<br>The <b>rtkitctl</b> command primarily checks if the <I>RealtimeKit</I> D-Bus service is running and accessible. It serves as a simple diagnostic tool rather than a comprehensive control interface for real-time priorities, which are typically managed programmatically by applications interacting with the <I>RealtimeKit</I> D-Bus API.


title: CAVEATS
content:
The <b>rtkitctl</b> command is a very simple utility, often only designed to check the status of the RealtimeKit D-Bus service. It does not provide options for directly manipulating real-time priorities or advanced daemon configuration.<br>Real-time priority management is primarily handled by applications (e.g., PulseAudio, PipeWire, JACK) by interacting with the RealtimeKit D-Bus API, not through this command-line utility.<br>On some Linux distributions, the <b>rtkitctl</b> executable might be minimal or even non-existent, with users instead relying on <b>systemctl status rtkit-daemon</b> or checking the <b>rtkit-daemon</b> logs for status.


title: D-BUS INTERACTION
content:
Applications that require real-time scheduling, such as audio servers, interact directly with the RealtimeKit D-Bus service to request and release real-time priority. <b>rtkitctl</b> is merely a thin client to query the service's availability, not to perform real-time scheduling operations.


title: SECURITY MODEL
content:
RealtimeKit's core benefit lies in its security model. Instead of individual applications running as root or having broad capabilities, a single, well-controlled daemon (<I>rtkit-daemon</I>) handles the sensitive task of granting real-time priority, mediating access for multiple applications and preventing abuse.


title: HISTORY
content:
RealtimeKit was created to address the challenge of securely granting real-time scheduling capabilities to unprivileged applications on Linux. Historically, only root or processes with <I>CAP_SYS_NICE</I> could set real-time priorities, which posed a security risk for audio/multimedia applications needing low latency.<br>By introducing a D-Bus service, RealtimeKit allows applications to request these capabilities from a trusted, privileged daemon, thus improving security and stability while ensuring optimal performance for real-time workloads. It became an integral part of modern desktop Linux audio infrastructures.


title: PARAMETERS
content:
<b>-f <i>freq</i></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Set center frequency in Hz. Supports common suffixes like 'M' for MHz (e.g., 100M for 100,000,000 Hz).<br><br><b>-s <i>samplerate</i></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Set sample rate in Hz. Typical values range from 250,000 to 3,200,000 samples per second. Higher rates capture wider bandwidths.<br><br><b>-g <i>gain</i></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Set tuner gain in dB. Use 'rtl_sdr -g' without a value to list available discrete gain settings for your device. Default is often automatic gain control (AGC).<br><br><b>-d <i>index</i></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Select RTL-SDR device by index (e.g., 0, 1, 2...). Useful when multiple dongles are connected to the system.<br><br><b>-p <i>ppm</i></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Set frequency correction in PPM (parts per million). Used to compensate for inaccuracies in the dongle's crystal oscillator, which can cause frequency drift.<br><br><b>-n <i>samples</i></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Read only the specified number of samples and then exit. Useful for capturing short bursts of data or for testing.<br><br><b>-b <i>bytes</i></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Set the USB transfer buffer length in bytes. Default is usually 262144 bytes. A smaller buffer may reduce latency but increase CPU load.<br><br><b>-E <i>mode</i></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Enable RTL2832 test mode or specialized sampling modes. Common modes include 'direct_samp' for direct sampling of HF signals or 'offset_tuning' for baseband IQ correction.<br><br><b>-F</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Enable direct sampling mode (requires hardware modification or specific dongle versions). Bypasses the tuner for direct sampling of signals, typically used for HF (below 30 MHz).<br><br><b>-A</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Enable automatic gain control (AGC) if not already the default. This allows the device to automatically adjust gain for optimal signal reception.<br><br><b>-R</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Reset the RTL2832 chip. Can sometimes resolve issues with the dongle not being recognized or functioning correctly after previous use.<br><br><b>-T</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Enable Bias-T output. Provides DC power (typically 5V) through the antenna input to power external low-noise amplifiers (LNAs) or active antennas.<br><br><b>-S</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Enable read sync. Attempts to synchronize the reading process with the start of new sample buffers from the device, potentially reducing jitter.<br><br><b>-h</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Display a help message with available options and exit.<br><br>


title: DESCRIPTION
content:
The <b>rtl_sdr</b> command is a fundamental tool within the <i>rtl-sdr</i> software suite, enabling users to transform inexpensive DVB-T USB dongles based on the Realtek RTL2832U chipset into powerful Software-Defined Radio (SDR) receivers. It serves as the primary interface for configuring the dongle's parameters, such as center frequency, sample rate, and gain, and for capturing raw complex I/Q (In-phase and Quadrature) data streams. This raw data, typically in a byte-stream format, can then be processed by other SDR applications, visualized, or saved to a file for later analysis, forming the backbone of many SDR experiments and applications.


title: CAVEATS
content:
Optimal performance with <b>rtl_sdr</b> is highly dependent on antenna quality, appropriate gain settings, and accurate frequency correction (PPM). High sample rates, especially on less powerful systems or over busy USB buses, can lead to dropped samples or buffer underruns, indicated by warnings or gaps in the received data. Ensure sufficient USB bandwidth is available.


title: OUTPUT FORMAT
content:
The command outputs raw I/Q samples to standard output (stdout) or to a specified file if a <i>filename</i> argument is provided. The data consists of interleaved 8-bit unsigned I and Q values (e.g., I1, Q1, I2, Q2, ...), representing the complex baseband signal. This raw binary format is designed to be easily piped into other signal processing tools or saved for later analysis.


title: TYPICAL USAGE
content:
<b>rtl_sdr</b> is frequently used as the source for a data pipeline, with its output streamed directly to other programs for demodulation, decoding, or visualization.<br><br><i>Example: Capture FM radio and pipe to SoX for audio playback</i><br><b>rtl_sdr</b> -f 96.1M -s 2.048M -g 40 - | <b>sox</b> -t raw -e signed-integer -b 16 -c 2 -r 2.048M - -t raw -e signed-integer -b 16 -c 1 -r 48k - highpass 200 lowpass 3k | <b>play</b> -<br><br><i>Example: Record raw I/Q data to a file</i><br><b>rtl_sdr</b> -f 433.92M -s 2.4M -g 30 out.iq


title: HISTORY
content:
The <b>rtl_sdr</b> utility is a cornerstone of the original <i>rtl-sdr</i> project. Its genesis dates back to 2012 when the discovery was made that inexpensive DVB-T USB dongles, primarily those using the Realtek RTL2832U chip, could be repurposed as versatile Software-Defined Radio receivers. This breakthrough, along with the rapid development of open-source drivers and command-line tools like <b>rtl_sdr</b>, democratized access to SDR technology, leading to an explosion of interest and innovation in radio hobbyism, research, and various applications worldwide.


title: PARAMETERS
content:
<b>-f <filename></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Directs the output of <b>rtmon</b> to the specified <i>filename</i> instead of standard output.<br><br><b>-d <delay></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Sets the delay interval, in seconds, between consecutive reports or updates from <b>rtmon</b>.<br><br><b>-s</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Enables the display of detailed scheduling-related information and statistics.<br><br><b>-m</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Activates the monitoring and reporting of memory-related statistics.<br><br><b>-l</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Focuses the output on latency-specific data, such as minimum, maximum, and average latencies.<br><br><b>-t</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Shows information and statistics related to active tasks and processes.<br><br><b>-c <cpu></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Specifies a particular CPU core (e.g., 0, 1) to monitor exclusively.<br><br><b>-v</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Increases the verbosity of the output, providing more detailed information.<br><br><b>-h</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Displays a brief help message with available command options and exits.<br><br><b>-r</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Resets the collected statistics, allowing for a fresh measurement period.<br><br>


title: DESCRIPTION
content:
The <b>rtmon</b> command is a specialized utility designed for monitoring the real-time performance characteristics of a Linux system, particularly those running with real-time kernel patches like PREEMPT_RT. It provides insights into various kernel activities crucial for deterministic execution, such as scheduler behavior, interrupt latencies, and context switches. <br><br>Developers and system engineers utilize <b>rtmon</b> to diagnose and debug real-time applications, identify sources of non-determinism, and ensure systems meet strict timing requirements. It helps in understanding if tasks are being scheduled predictably, if interrupts are processed promptly, and if there are unexpected delays impacting critical operations. The tool collects and displays statistics that highlight potential issues, making it invaluable for optimizing real-time embedded systems, industrial control, audio/video processing, and other latency-sensitive applications.


title: CAVEATS
content:
<i>rtmon</i> is primarily effective on Linux systems running a real-time kernel (e.g., PREEMPT_RT), as it leverages real-time specific kernel features.<br>Execution often requires elevated privileges (e.g., root) to access necessary kernel interfaces and tracepoints.<br>It's typically part of the <i>rt-tests</i> suite and may not be pre-installed on standard Linux distributions.<br>Interpreting its output requires a basic understanding of real-time operating system concepts and kernel internals.


title: TYPICAL OUTPUT INFORMATION
content:
When run, <i>rtmon</i> typically presents statistics including minimum, maximum, and average latencies for various kernel events (like scheduling delays or interrupt response times). It may also show counts of context switches, interrupt requests (IRQs) per CPU, and details about process priority and CPU utilization, all critical for assessing real-time performance. The exact output format can vary slightly depending on the invoked options and the specific version of the tool.


title: INTEGRATION WITH REAL-TIME DEVELOPMENT
content:
<i>rtmon</i> is a cornerstone tool in the real-time Linux development workflow. It helps in validating the effectiveness of real-time configurations, debugging issues like priority inversions or excessive jitter, and profiling custom real-time applications to ensure they meet stringent timing deadlines. It is often used in conjunction with other <i>rt-tests</i> tools like <i>cyclictest</i> for comprehensive real-time system analysis.


title: HISTORY
content:
<i>rtmon</i> originated as a component of the <i>rt-tests</i> suite, a collection of utilities developed to benchmark and validate the real-time capabilities of the Linux kernel, specifically in conjunction with the PREEMPT_RT patchset. Its development has closely paralleled the evolution of real-time Linux, serving as a vital tool for developers and engineers working on low-latency and deterministic systems. It has been instrumental in identifying performance bottlenecks, verifying real-time integrity, and ensuring predictable behavior in demanding applications like embedded systems, robotics, and industrial control.


title: PARAMETERS
content:
<b><b>-r</b>, <b>--rtmp</b> <i>&lt;url&gt;</i></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Specifies the full RTMP URL of the stream to connect to, including application and playpath.<br><br><b><b>-o</b>, <b>--output</b> <i>&lt;file&gt;</i></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Sets the name of the output file where the captured stream will be saved. Commonly an FLV file.<br><br><b><b>-a</b>, <b>--app</b> <i>&lt;app&gt;</i></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Defines the RTMP application name. This is often part of the URL but can be specified separately.<br><br><b><b>-y</b>, <b>--playpath</b> <i>&lt;path&gt;</i></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Specifies the stream's playpath, which identifies the specific media resource within the application.<br><br><b><b>-W</b>, <b>--swfUrl</b> <i>&lt;url&gt;</i></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Provides the URL of the SWF (Flash) player that plays the stream. Used for server-side authentication or verification.<br><br><b><b>-p</b>, <b>--pageUrl</b> <i>&lt;url&gt;</i></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Supplies the URL of the web page that originally embedded the RTMP player. Also for verification.<br><br><b><b>-C</b>, <b>--connect</b> <i>&lt;arg&gt;</i></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Allows passing custom AMF (Action Message Format) connection arguments to the RTMP server.<br><br><b><b>-f</b>, <b>--flashVer</b> <i>&lt;version&gt;</i></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Sets the emulated Flash player version string for the server handshake (e.g., 'LNX 11,2,202,233').<br><br><b><b>-L</b>, <b>--live</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Indicates that the stream is a live broadcast, implying it's not a video-on-demand (VOD) asset.<br><br><b><b>-z</b>, <b>--resume</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Attempts to resume a previously interrupted download from where it left off, if the server supports it.<br><br><b><b>-v</b>, <b>--verbose</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Increases the verbosity of the output, showing more details about the connection and download process.<br><br><b><b>--debug</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Enables extensive debug output, providing detailed insights for troubleshooting connection or stream issues.<br><br><b><b>--flv</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Forces the output file to be in FLV (Flash Video) format, regardless of the specified file extension.<br><br>


title: DESCRIPTION
content:
<i>rtmpdump</i> is a command-line utility designed to interact with the Real Time Messaging Protocol (RTMP). It acts as an RTMP client, capable of connecting to RTMP servers, receiving streaming audio and video data, and saving it to a local file, typically in the FLV (Flash Video) format. This tool was historically invaluable for capturing and archiving live or on-demand content delivered via RTMP, especially when direct download links were unavailable or when browser plugins were insufficient. It supports various RTMP variants, including RTMP, RTMPE (encrypted), RTMPT (tunneled over HTTP), RTMPTE (tunneled and encrypted), and RTMPS (secure RTMP over SSL). While less relevant for modern streaming protocols like HLS or DASH, it remains useful for legacy RTMP-based content or specific server interactions.


title: CAVEATS
content:
<i>rtmpdump</i> is no longer actively developed and is considered largely superseded by more modern and versatile tools like <i>yt-dlp</i> or <i>ffmpeg</i>, which support a wider array of streaming protocols (e.g., HLS, DASH) and platforms.<br>It does not handle DRM-protected content.<br>Its effectiveness is limited strictly to RTMP streams and may not work with some contemporary streaming platforms that employ advanced anti-dumping measures or have fully transitioned to newer protocols.


title: OUTPUT FORMAT
content:
By default, <i>rtmpdump</i> saves the captured stream into an FLV (Flash Video) container file. This format is natively compatible with RTMP streams and older Flash players, but may require conversion for broader compatibility with modern media players if they do not directly support FLV playback.


title: HISTORY
content:
Developed primarily between 2008 and 2010, <i>rtmpdump</i> emerged as a crucial tool for capturing Real Time Messaging Protocol (RTMP) streams, which were prevalent for delivering video content via Adobe Flash Player. It addressed the growing need to download or archive content that was only accessible through live or on-demand streaming. Its development largely ceased as the internet transitioned away from Flash and RTMP towards HTML5-based video and more modern streaming protocols like HLS and DASH. Despite its age, it remains functional for legacy RTMP sources.


title: SYNOPSIS
content:
<b>rtorrent</b> [<i>OPTIONS</i>] [<i>TORRENT_FILE</i> | <i>MAGNET_URI</i> | <i>URL</i>]<br><b>rtorrent</b> -o <i>key</i>=<i>value</i> [-o <i>key</i>=<i>value</i> ...]


title: PARAMETERS
content:
<b><b>-h</b>, <b>--help</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;<i>Displays a summary of command-line options.</i><br><br><b><b>-o</b>, <b>--option</b> <i>key</i>=<i>value</i></b><br>&nbsp;&nbsp;&nbsp;&nbsp;<i>Sets a session option. Can be used multiple times to set multiple options.</i><br><br><b><b>-n</b>, <b>--no-start</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;<i>Adds the torrent without automatically starting the download upon loading.</i><br><br><b><b>-d</b>, <b>--daemon</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;<i>Starts rtorrent in daemon mode, running in the background without a user interface.</i><br><br><b><b>-s</b>, <b>--session</b> <i>directory</i></b><br>&nbsp;&nbsp;&nbsp;&nbsp;<i>Specifies the directory for session files and torrent metadata. Defaults to <b>~/.rtorrent/</b>.</i><br><br><b><b>-D</b>, <b>--do-not-detach</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;<i>Used with <b>--daemon</b> to prevent rtorrent from detaching from the terminal, useful for debugging or logging.</i><br><br><b><b>-C</b>, <b>--check-hash</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;<i>Forces a full hash check of all data after loading the torrent, regardless of previous state.</i><br><br><b><b>--version</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;<i>Prints the rtorrent version information and exits.</i><br><br>


title: DESCRIPTION
content:
<b>rtorrent</b> is a powerful and efficient console-based BitTorrent client, designed for low resource consumption and high performance. Written in C++ and utilizing the <i>ncurses</i> library, it provides a text-based user interface that is ideal for servers, headless environments, or users who prefer a terminal-centric workflow.<br><br>It supports essential BitTorrent features including <i>DHT</i>, <i>PEX</i>, <i>UPnP</i>, <i>NAT-PMP</i>, encryption, and selective file downloading. Its disk caching mechanism helps optimize performance and reduce disk I/O. Beyond interactive use, <b>rtorrent</b> can be extensively controlled via an <i>XML-RPC</i> interface, making it highly scriptable and suitable for integration with web-based frontends like <i>ruTorrent</i>.


title: CAVEATS
content:
The <b>rtorrent</b> <i>ncurses</i> interface, while powerful, can have a steeper learning curve for users unfamiliar with terminal-based applications.<br><br>Optimal configuration often requires manual editing of the <b>~/.rtorrent.rc</b> file, which can be complex for new users.<br><br>While highly extensible via <i>XML-RPC</i>, setting up and interacting with this interface might require additional scripting knowledge and tools.


title: CONFIGURATION FILE (<B>~/.RTORRENT.RC</B>)
content:
<i>This file is central to configuring <b>rtorrent</b>'s behavior. It allows setting global options like default download directories, port ranges, upload/download limits, queue management, and advanced features such as scripting commands and watch directories. It's essential for automating <b>rtorrent</b> operations or customizing its extensive features.</i>


title: XML-RPC INTERFACE
content:
<i><b>rtorrent</b> exposes a powerful <b>XML-RPC</b> interface, enabling external applications and scripts to control and monitor it remotely. This is widely used by web-based frontends (e.g., <b>ruTorrent</b>) to provide a graphical user interface over a headless <b>rtorrent</b> instance, allowing for comprehensive management of torrents, settings, and statistics.</i>


title: INTERACTIVE CONTROLS
content:
<i>When run in interactive mode, <b>rtorrent</b> provides a rich set of keyboard shortcuts for managing torrents directly within the terminal. Users can start, stop, pause, and delete torrents, view detailed information about peers and files, navigate through different views, and dynamically adjust settings.</i>


title: HISTORY
content:
<b>rtorrent</b> was created by <i>Jari Sundell</i> and first publicly released around 2007. It was developed to be a lightweight and high-performance BitTorrent client, distinct from other clients by its direct use of the <i>libtorrent</i> BitTorrent library (Sundell's own, not the one by Arvid Norberg). Its design prioritizes efficiency, making it a popular choice for continuous operation on servers and seedboxes, a role it has maintained for over a decade.


title: PARAMETERS
content:
<b><b>-h</b>, <b>--help</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Show the program's help message and exit.<br><br><b><b>-s</b> <i>SUBREDDIT</i>, <b>--subreddit</b> <i>SUBREDDIT</i></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Open a specific subreddit directly on startup (e.g., <i>rtv linux</i>).<br><br><b><b>-l</b>, <b>--login</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Authenticate with Reddit using OAuth. This typically opens a browser for the authorization flow.<br><br><b><b>-i</b>, <b>--inbox</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Open the user's inbox directly.<br><br><b><b>-u</b> <i>USER</i>, <b>--user</b> <i>USER</i></b><br>&nbsp;&nbsp;&nbsp;&nbsp;View a specific user's profile.<br><br><b><b>-V</b>, <b>--version</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Show the program's version number and exit.<br><br><b><b>--copy-oauth-url</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Copy the OAuth URL to the clipboard instead of opening a browser.<br><br><b><b>--config-path</b> <i>PATH</i></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Specify a custom path for the configuration directory.<br><br><b><b>--log-level</b> <i>LEVEL</i></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Set the logging verbosity (e.g., DEBUG, INFO, WARNING, ERROR).<br><br><b><b>--submission</b> <i>URL</i></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Open a specific Reddit submission given its URL.<br><br><b><b>--theme</b> <i>NAME</i></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Specify a custom theme name to use for the interface.<br><br>


title: DESCRIPTION
content:
<i>rtv</i> (Reddit Terminal Viewer) is a lightweight, open-source command-line interface application that allows users to browse and interact with Reddit directly from their terminal. It's built using Python and utilizes the PRAW (Python Reddit API Wrapper) library.<br><br>It provides a text-based browsing experience for subreddits, posts, comments, and user profiles, mimicking much of the functionality of the web interface in a console-friendly format. Users can upvote/downvote, comment, submit posts, and save content without leaving their terminal. It is particularly useful for users who prefer keyboard navigation or want to reduce distractions, offering a pure terminal-based Reddit experience.


title: CAVEATS
content:
<i>rtv</i> is not a standard Linux command and must be installed separately, typically via Python's pip or a distribution's package manager. Full interactive features (like voting or commenting) require a Reddit account and authentication.<br><br>It relies on the Reddit API, which means its functionality can be affected by API changes or rate limits. While it supports links to external media, it does not natively display rich media like images or videos within the terminal.


title: INSTALLATION
content:
<i>rtv</i> is typically installed using Python's package installer: <b>pip install rtv</b>. On some Linux distributions, it might be available through the native package manager (e.g., <b>sudo apt install rtv</b> on Debian/Ubuntu, <b>sudo dnf install rtv</b> on Fedora).


title: KEYBINDINGS AND NAVIGATION
content:
<i>rtv</i> heavily relies on keyboard shortcuts for efficient navigation and interaction. Common keybindings include <b>j</b>/<b>k</b> for navigating posts/comments, <b>a</b>/<b>z</b> for upvote/downvote, <b>c</b> to comment on a post, <b>/</b> to search, and <b>q</b> to quit. A comprehensive list of keybindings is available within the application by pressing <b>?</b>.


title: CONFIGURATION
content:
Users can customize <i>rtv</i>'s behavior and appearance through a configuration file, usually located at <b>~/.config/rtv/rtv.cfg</b>. This file allows setting default subreddits, custom themes, logging preferences, and more.


title: HISTORY
content:
<i>rtv</i> was created by Michael Lazar and quickly gained traction among Linux users and terminal enthusiasts for its unique approach to browsing Reddit. Its development has been largely community-driven, adapting to Reddit API changes and expanding its feature set to provide a comprehensive terminal-based experience. It embodies the philosophy of highly efficient, keyboard-centric command-line tools.


title: SYNOPSIS
content:
<b><I>ruby</I></b> [<I>options</I>] [<I>program_file</I>] [<I>arguments...</I>]<br><b><I>ruby</I></b> [<I>options</I>] <I>-e COMMAND</I> [<I>arguments...</I>]<br><b><I>ruby</I></b> [<I>options</I>] <I>-c</I><br><b><I>ruby</I></b> [<I>options</I>] <I>-v</I><br><b><I>ruby</I></b> [<I>options</I>] <I>-h</I>


title: PARAMETERS
content:
<b>-e COMMAND</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Executes the Ruby code specified in <I>COMMAND</I> as a string.<br><br><b>-c</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Checks the syntax of the Ruby script without executing it. Returns 0 if syntax is OK, 1 otherwise.<br><br><b>-w</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Enables verbose warning messages during execution. Useful for debugging and identifying potential issues.<br><br><b>-v, --version</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Prints the Ruby interpreter version number and exits.<br><br><b>-h, --help</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Displays a summary of command-line options and exits.<br><br><b>-r LIBRARY</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Requires the specified <I>LIBRARY</I> (e.g., a gem or a Ruby file) before executing the script.<br><br><b>-I DIRECTORY</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Adds <I>DIRECTORY</I> to the `$LOAD_PATH` (<code>$:</code>), where Ruby searches for required files.<br><br><b>-S</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Looks for the program using the system's `$PATH` environment variable. Useful for shebang-less scripts.<br><br><b>-i [EXTENSION]</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Enables in-place editing of ARGF files. A backup is created if <I>EXTENSION</I> is provided (e.g., <I>-i.bak</I>).<br><br><b>-d</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Turns on debug mode, which can provide more detailed output for debugging purposes.<br><br><b>-n</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Causes Ruby to loop over standard input line by line, executing the script body for each line. Does not print lines by default.<br><br><b>-p</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Similar to <I>-n</I>, but also prints each line after executing the script body.<br><br>


title: DESCRIPTION
content:
The <b><I>ruby</I></b> command is the official interpreter for the Ruby programming language. It executes Ruby source code directly from a file, standard input, or from a string provided on the command line.<br><br>Ruby is a dynamic, open-source programming language with a focus on simplicity and productivity. It has an elegant syntax that is natural to read and easy to write. The <b><I>ruby</I></b> interpreter can be used for a wide range of tasks, including web development (with frameworks like Ruby on Rails), scripting, data processing, automation, and system administration.<br><br>Beyond executing scripts, the command can also be used to check Ruby code for syntax errors without running it, print the Ruby version, or configure its execution environment with various command-line options like warning levels and load paths.


title: CAVEATS
content:
While highly productive, Ruby's performance can sometimes be a consideration for extremely CPU-bound applications compared to compiled languages like C or Java, though recent JIT compilers have significantly improved this.<br><br>Managing Ruby versions and gem dependencies can be complex, often requiring tools like RVM, rbenv, or `chruby` to ensure projects use the correct Ruby version and associated libraries. Incompatible Ruby versions or gem conflicts can lead to unexpected runtime errors.


title: ENVIRONMENT VARIABLES
content:
The behavior of the <b><I>ruby</I></b> command can be influenced by several environment variables:<br><ul><li><I>RUBYOPT</I>: Specifies command-line options that are processed before any explicit options.</li><li><I>RUBYLIB</I>: Specifies additional directories to be added to the `$LOAD_PATH` before any <I>-I</I> options.</li><li><I>PATH</I>: Used with the <I>-S</I> option to locate the Ruby program file.</li></ul>


title: SHEBANG (#! )
content:
Ruby scripts often start with a 'shebang' line, such as <code>#!/usr/bin/env ruby</code> or <code>#!/usr/bin/ruby</code>, which allows the script to be executed directly as an executable without explicitly calling <b><I>ruby</I></b> beforehand (e.g., <code>./myscript.rb</code> instead of <code>ruby myscript.rb</code>).


title: EXIT STATUS
content:
The <b><I>ruby</I></b> command typically exits with a status of 0 upon successful execution. A non-zero exit status usually indicates an error, such as a syntax error (when using <I>-c</I>), a runtime exception that was not handled, or the script exiting with a non-zero value.


title: HISTORY
content:
The Ruby programming language was created by Yukihiro 'Matz' Matsumoto in Japan, with the first public release in December 1995. Matz aimed to create a language that was powerful, object-oriented, and focused on programmer happiness and productivity.<br><br>Ruby gained significant global popularity in the mid-2000s, largely due to the emergence of the Ruby on Rails web application framework. This framework showcased Ruby's strengths in rapid development and elegant syntax, leading to widespread adoption in the startup community and beyond.<br><br>Since its initial release, Ruby has undergone continuous development, with major versions introducing new features, performance improvements (like the Ruby 3x3 initiative, aiming for 3x performance increase over Ruby 2.0), and syntax enhancements.


title: SYNOPSIS
content:
<b>ruff</b> [<i>COMMAND</i>] [<i>OPTIONS</i>] [<i>PATH</i>...]<br><b>ruff</b> [<i>OPTIONS</i>] [<i>PATH</i>...] (defaults to <b>check</b> command)


title: PARAMETERS
content:
<b><b>--fix</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Apply all auto-fixable linting violations.<br><br><b><b>--select</b> <i>&lt;CODES&gt;</i></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Comma-separated list of rule codes to enable (e.g., `E402,W292`).<br><br><b><b>--ignore</b> <i>&lt;CODES&gt;</i></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Comma-separated list of rule codes to ignore (e.g., `E501`).<br><br><b><b>--exclude</b> <i>&lt;PATH&gt;</i></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Comma-separated list of file paths to exclude from checking.<br><br><b><b>--target-version</b> <i>&lt;VERSION&gt;</i></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Specify the target Python version (e.g., `py38`, `py310`).<br><br><b><b>--config</b> <i>&lt;FILE&gt;</i></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Path to a `ruff.toml` or `pyproject.toml` file to use for configuration.<br><br><b><b>--diff</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Display a diff of changes that would be applied (for `format` command).<br><br><b><b>--quiet</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Suppress output from linting checks, only showing errors.<br><br><b><b>--verbose</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Enable verbose output, showing more details during execution.<br><br><b><b>--force-exclude</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Respect `exclude` patterns even for explicitly provided paths.<br><br><b><b>--show-fixes</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Show which fixes were applied to the code.<br><br><b><b>--help</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Display help information for the command or subcommand.<br><br><b><b>--version</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Print the current <i>ruff</i> version.<br><br>


title: DESCRIPTION
content:
<i>ruff</i> is an incredibly fast Python linter and formatter, written in Rust. It aims to replace and consolidate multiple existing tools in the Python ecosystem, including <b>Flake8</b>, <b>isort</b>, and parts of <b>Black</b> and <b>Pylint</b>. By providing a single, performant tool for code quality and formatting, <i>ruff</i> streamlines development workflows. It boasts speeds orders of magnitude faster than its Python-based counterparts, making it ideal for large codebases or continuous integration environments. <i>ruff</i> is highly configurable, allowing users to select or ignore specific linting rules, define formatting styles, and integrate seamlessly into existing `pyproject.toml` configurations. Its primary commands are `check` for linting and `format` for code reformatting, often used together to maintain consistent and high-quality Python code.


title: CAVEATS
content:
While <i>ruff</i> aims to be a comprehensive replacement, it may not yet support every niche plugin or customization available in older, more established linters. Its rapid development cycle means features and configurations are constantly evolving. It is primarily designed for Python codebases.


title: COMMON COMMANDS
content:
<i>ruff</i> operates with subcommands:<br><b>check</b>: The default command for linting code and identifying issues.<br><b>format</b>: Reformat Python code according to a consistent style.<br><b>rule</b>: Display information about specific linting rules by their code (e.g., `ruff rule E501`).<br><b>config</b>: Interact with <i>ruff</i>'s configuration.<br><b>linter</b>: List all supported linting rules.<br><b>clean</b>: Clear <i>ruff</i>'s cache.


title: CONFIGURATION
content:
<i>ruff</i> is primarily configured via a `pyproject.toml` file under the `[tool.ruff]` section, or alternatively via a `ruff.toml` file. This allows for extensive customization of enabled rules, exclusions, and formatting options.


title: INTEGRATION
content:
Due to its speed, <i>ruff</i> is highly suitable for integration into Continuous Integration (CI/CD) pipelines, Git hooks, and various Integrated Development Environments (IDEs) like VS Code, PyCharm, and Sublime Text, enhancing code quality checks at various stages of development.


title: HISTORY
content:
<i>ruff</i> was created by Astral (formerly known as Charlie Marsh) with its first public release in late 2022. It quickly gained significant traction in the Python community due to its unprecedented speed and its ability to consolidate multiple code quality tools into a single, efficient binary. Its development has focused on performance and ease of use, leading to rapid adoption across various projects and organizations.


title: SYNOPSIS
content:
`<b>ruff check</b> [<i>path ...</i>] [<i>options</i>]`<br><br><i>path ...</i>: One or more files or directories to check. If omitted, the current working directory is checked.<br><i>options</i>: Optional flags and arguments to control linting behavior.


title: PARAMETERS
content:
<b><b>path ...</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Specifies the files or directories to lint. If not provided, <i>Ruff</i> will lint the current working directory recursively.<br><br><b><b>--fix</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Automatically fix all fixable violations. Not all violations are fixable. Use with caution and review changes.<br><br><b><b>--select <i><codes></i></b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Comma-separated list of rule codes to enable. Overrides rules specified in configuration files.<br><br><b><b>--ignore <i><codes></i></b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Comma-separated list of rule codes to ignore. Overrides rules specified in configuration files.<br><br><b><b>--exclude <i><paths></i></b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Comma-separated list of path patterns to exclude from checking.<br><br><b><b>--target-version <i><version></i></b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;The Python version to target, e.g., 'py38', 'py39'. Affects rules that depend on Python syntax or features.<br><br><b><b>--config <i><path></i></b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Path to a <i>pyproject.toml</i> file to use for configuration instead of discovering one.<br><br><b><b>--format <i><format></i></b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;The output format for violations (e.g., 'text', 'json', 'github', 'grouped').<br><br><b><b>--watch</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Watch files for changes and re-run checks automatically.<br><br><b><b>--verbose</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Enable verbose output, showing more details about the linting process.<br><br><b><b>--silent</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Suppress all non-error output, only showing violations or errors.<br><br>


title: DESCRIPTION
content:
The `<b>ruff check</b>` command is the core linting functionality of <i>Ruff</i>, an extremely fast Python linter and code formatter written in Rust. It rapidly analyzes Python source code to identify and report on various issues, including stylistic inconsistencies, potential bugs, unused imports, and common programming errors. Designed as a high-performance alternative to traditional Python linters like <i>Flake8</i> and <i>Pylint</i>, `<b>ruff check</b>` aims to drastically reduce linting times, making it ideal for large codebases and continuous integration/continuous deployment (CI/CD) pipelines. It supports a vast array of rules, many of which are compatible with existing tools, and offers extensive configurability via `<b>pyproject.toml</b>` files. By enforcing code standards and catching issues early, `<b>ruff check</b>` helps developers maintain high-quality, consistent, and maintainable Python code.


title: CAVEATS
content:
While `<b>ruff check</b>` is highly effective, users should be aware of a few points:<br><br><i>Completeness</i>: It doesn't cover every single rule from all possible linters (e.g., <i>Pylint</i> has many highly specific rules <i>Ruff</i> might not replicate directly).<br><i>Configuration</i>: Optimal usage often requires a well-defined `<b>pyproject.toml</b>` file, which can take some initial setup effort.<br><i>Auto-fixing</i>: The `<b>--fix</b>` option is powerful but should be used carefully, and generated changes should always be reviewed before committing.


title: CONFIGURATION
content:
The primary way to configure `<b>ruff check</b>` is through a `<b>pyproject.toml</b>` file in your project's root or a parent directory. This file allows you to specify enabled/disabled rules, exclude paths, define per-file settings, and much more.


title: PERFORMANCE
content:
One of <i>Ruff</i>'s most significant advantages is its performance. Written in Rust, it can lint massive codebases in milliseconds, significantly reducing development friction and enabling faster feedback in CI/CD environments compared to Python-native alternatives.


title: PRE-COMMIT HOOKS
content:
Due to its speed, `<b>ruff check</b>` is commonly integrated into pre-commit hooks (e.g., using the `<b>pre-commit</b>` framework). This ensures that code is linted and, optionally, auto-fixed before commits are made, enforcing code quality standards consistently across a team.


title: HISTORY
content:
<i>Ruff</i>, including the `<b>check</b>` command, was created by Charlie Marsh and first publicly released in late 2022. It quickly gained significant traction within the Python community due to its unprecedented speed and comprehensive rule set, aiming to consolidate and replace a multitude of existing Python linting and formatting tools. Its development in Rust was a key factor in achieving its high performance, addressing a long-standing need for faster feedback loops in Python development workflows. The command has seen rapid evolution, continually adding new rules and features, solidifying its position as a leading tool for Python code quality.


title: SYNOPSIS
content:
ruff format [<B>OPTIONS</B>] [<B>FILES_OR_DIRECTORIES</B>...]<br>ruff format [<B>OPTIONS</B>] <I>--stdin</I>


title: PARAMETERS
content:
<b>-c, --config <PATH></b><br>&nbsp;&nbsp;&nbsp;&nbsp;<I>Specify a configuration file or directory containing a pyproject.toml.</I><br><br><b>--check</b><br>&nbsp;&nbsp;&nbsp;&nbsp;<I>Check for formatting violations without writing changes.</I><br><br><b>--diff</b><br>&nbsp;&nbsp;&nbsp;&nbsp;<I>Print a diff of formatting changes instead of applying them.</I><br><br><b>--write</b><br>&nbsp;&nbsp;&nbsp;&nbsp;<I>Write changes to disk (default behavior for files).</I><br><br><b>--line-length <LENGTH></b><br>&nbsp;&nbsp;&nbsp;&nbsp;<I>Set the preferred maximum line length for formatting.</I><br><br><b>--indent <STYLE></b><br>&nbsp;&nbsp;&nbsp;&nbsp;<I>Set the preferred indentation style (e.g., spaces, tabs).</I><br><br><b>--target-version <VERSION></b><br>&nbsp;&nbsp;&nbsp;&nbsp;<I>Specify the target Python version for compatibility.</I><br><br><b>--exclude <PATTERN></b><br>&nbsp;&nbsp;&nbsp;&nbsp;<I>Exclude files or directories matching the pattern from formatting.</I><br><br><b>--stdin-filename <FILENAME></b><br>&nbsp;&nbsp;&nbsp;&nbsp;<I>When formatting stdin, use this filename for context.</I><br><br><b>--respect-gitignore</b><br>&nbsp;&nbsp;&nbsp;&nbsp;<I>Honor .gitignore files for path exclusion during formatting.</I><br><br><b>--verbose</b><br>&nbsp;&nbsp;&nbsp;&nbsp;<I>Enable verbose output for more detailed information.</I><br><br><b>--quiet</b><br>&nbsp;&nbsp;&nbsp;&nbsp;<I>Disable all messages except for errors during execution.</I><br><br><b>--preview</b><br>&nbsp;&nbsp;&nbsp;&nbsp;<I>Enable preview mode to opt-in to experimental formatting changes.</I><br><br><b>--show-files</b><br>&nbsp;&nbsp;&nbsp;&nbsp;<I>Display the list of files that Ruff will attempt to format.</I><br><br><b>--isolated</b><br>&nbsp;&nbsp;&nbsp;&nbsp;<I>Disregard all configuration files (e.g., pyproject.toml).</I><br><br>


title: DESCRIPTION
content:
The <I>ruff format</I> command is an <I>exceptionally fast and opinionated</I> Python code formatter, part of the larger `ruff` ecosystem. Written in Rust, it aims to provide a <I>high-performance alternative</I> to traditional formatters like `Black`. It automatically re-formats Python source code to adhere to a consistent style, primarily following `PEP 8` and `Black`'s established conventions, ensuring <I>code uniformity</I> across projects. Its design emphasizes speed and correctness, making it ideal for <I>large-scale codebases and CI/CD environments</I>.<br><br>The command can process individual files, entire directories, or standard input. It offers various modes, including checking for formatting violations without applying changes (`--check`), printing diffs (`--diff`), or performing in-place modifications (`--write`, which is default for files). By integrating `ruff format` with the `ruff` linter, developers can use a <I>single, efficient tool</I> for both code quality analysis and style enforcement, significantly streamlining Python development workflows. Its configuration is typically managed through a `pyproject.toml` file, allowing for project-specific settings.


title: CAVEATS
content:
The `ruff format` command is designed to be <I>highly opinionated</I>, similar to `Black`, meaning its customization options are intentionally limited. While this promotes consistency, it may not suit projects requiring highly specific or non-standard formatting styles. Its formatting rules, particularly those in "preview" mode, are still under active development and <I>may evolve</I> in future releases, potentially leading to slight changes in output. Ensure you understand its default behavior before fully adopting it, especially for existing large codebases.


title: CONFIGURATION VIA PYPROJECT.TOML
content:
`ruff format` primarily uses a `pyproject.toml` file for configuration. Settings related to formatting (e.g., line length, indentation style, target Python version) are defined within the `[tool.ruff.format]` section, or globally in `[tool.ruff]`. This allows for project-wide consistency without relying on command-line flags for every invocation.


title: PERFORMANCE ADVANTAGES
content:
A standout feature of `ruff format` is its <I>remarkable speed</I>. Leveraging Rust, it can format Python codebases <I>orders of magnitude faster</I> than Python-based formatters like `Black`. This makes it particularly efficient for large projects, pre-commit hooks, and CI/CD pipelines, where performance is a critical factor for rapid feedback and build times.


title: HISTORY
content:
The `ruff` project, from which `ruff format` originates, was introduced by <I>Caleb Hattingh</I> in <I>late 2022</I>. It rapidly gained traction in the Python community due to its <I>unprecedented speed</I>, achieved by being written entirely in <I>Rust</I>. Initially focused solely on linting capabilities, `ruff` evolved to incorporate formatting. The `ruff format` subcommand was developed as a direct competitor to existing Python formatters like `Black` and `isort`, aiming to provide a unified, significantly faster solution for code style enforcement. Its development is ongoing, with a strong emphasis on performance and feature parity with established tools.


title: DESCRIPTION
content:
The command 'ruget' does not correspond to any widely known or standard utility found in common Linux distributions (like Debian, Ubuntu, CentOS, Fedora, or Arch Linux) or major Linux projects (like GNU Core Utilities). It is not documented in standard man pages or common online repositories for Linux commands.<br><br>It is highly probable that 'ruget' is either a typographical error for another command (e.g., 'wget', 'curl', 'get'), a highly specific internal script used within a particular organization or application, or a placeholder for a hypothetical command. As such, its functionality, usage, and options are not defined within the standard Linux command ecosystem.


title: CAVEATS
content:
Attempting to execute 'ruget' on a typical Linux system will most likely result in a 'command not found' error. This command is not bundled with common system packages, nor is it part of fundamental command sets like GNU Core Utilities or busybox. Users should verify its source or check for potential typos if they encounter this command in documentation or scripts.


title: VERIFICATION ADVICE
content:
If you encountered 'ruget' in a tutorial, script, or documentation, it is strongly recommended to:<br><i>1.</i> <b>Check for typos:</b> It might be a mistyped version of a common command such as `wget`, `curl`, `apt-get`, or `dnf get`.<br><i>2.</i> <b>Consult specific documentation:</b> If it's part of a particular application or project, refer to that project's documentation, as it could be a custom script or alias defined within that specific environment.


title: HISTORY
content:
As 'ruget' is not a standard or documented Linux command, there is no historical record of its development, evolution, or widespread usage within the open-source community or major Linux projects.


title: PARAMETERS
content:
<b><I>directory</I></b><br>&nbsp;&nbsp;&nbsp;&nbsp;The path to the directory containing the scripts to be executed. This is a mandatory argument.<br><br><b>--test</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Simulate execution. Only print the names of scripts that would be run, without actually executing them.<br><br><b>--list</b><br>&nbsp;&nbsp;&nbsp;&nbsp;List only. Similar to <B>--test</B>, but specifically implies listing for human review.<br><br><b>--report</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Report progress. Print the name of each script before and after its execution, along with its exit status.<br><br><b>--reverse</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Reverse order. Run scripts in reverse lexicographical order. By default, they are run in forward lexicographical order.<br><br><b>--regex=REGEX</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Filter by regular expression. Only run files whose names match the provided extended regular expression <I>REGEX</I>. This overrides the default filename filtering.<br><br><b>--verbose</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Enable verbose output. Print more detailed information about the execution process.<br><br><b>--exit-on-error</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Exit on script failure. If any script exits with a non-zero status, <I>run-parts</I> will immediately terminate without running subsequent scripts.<br><br><b>--return-error-on-failure</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Return non-zero if any script fails. The <I>run-parts</I> command itself will return a non-zero status if any executed script returns a non-zero status, even if it continues to run subsequent scripts.<br><br>


title: DESCRIPTION
content:
<I>run-parts</I> is a utility designed to execute all executable files found within a specified directory. It's commonly used by system daemons like <I>cron</I> to automate the execution of recurring tasks. For instance, the <I>/etc/cron.daily</I>, <I>/etc/cron.weekly</I>, and <I>/etc/cron.monthly</I> directories often contain scripts that <I>run-parts</I> iterates through and executes regularly.<br><br>A key feature of <I>run-parts</I> is its default filename filtering: it only executes files whose names consist entirely of alphanumeric characters, underscores, and hyphens. This prevents it from running temporary files, backups, or configuration files that might reside in the same directory but are not intended for execution. It also supports various options for filtering by file extension, running in reverse order, reporting errors, and more, making it a flexible tool for managing automated system tasks.


title: CAVEATS
content:
By default, <I>run-parts</I> has strict filename filtering (alphanumeric, hyphens, underscores), which can lead to unexpected omissions if not understood. Its default execution order is lexicographical. Errors in one script do not stop subsequent scripts from running unless <B>--exit-on-error</B> is specified. It runs scripts sequentially, not in parallel.


title: DEFAULT FILENAME FILTERING
content:
By default, <I>run-parts</I> will only execute files in the specified directory whose names consist entirely of alphanumeric characters, underscores, and hyphens. This strict filtering mechanism prevents the accidental execution of backup files (e.g., <I>script.bak</I>), temporary files, or other non-executable content. This default behavior can be overridden using options like <B>--regex</B> for more flexible pattern matching.


title: EXIT STATUS
content:
<I>run-parts</I> exits with status 0 if all scripts execute successfully or if no scripts are found. If any script returns a non-zero exit status, <I>run-parts</I> will typically still return 0 by default, unless the <B>--return-error-on-failure</B> or <B>--exit-on-error</B> options are specified. Understanding this default behavior is crucial for scripting robust error handling.


title: HISTORY
content:
<I>run-parts</I> has been a fundamental utility in Debian and other Unix-like systems for automating routine administrative tasks since the early days of Linux, specifically for managing the <I>/etc/cron.*</I> directories. Its design reflects the need for a simple, robust way to execute a collection of scripts, relying on <I>cron</I> for scheduling. Its core functionality has remained largely consistent, with new options added over time to enhance flexibility, such as regex filtering and improved error handling.


title: PARAMETERS
content:
<b><i>ASPELLED_OPTIONS</i></b><br>&nbsp;&nbsp;&nbsp;&nbsp;These are typically options that <b>run-with-aspell</b> passes directly to the underlying <i>aspell</i> command. Common examples include:<br>  <b>--lang=&lt;language&gt;</b>: Specifies the language dictionary to use (e.g., 'en_US', 'fr').<br>  <b>--dictionary=&lt;name&gt;</b>: Specifies a particular dictionary by name.<br>  <b>--mode=&lt;mode&gt;</b>: Sets <i>aspell</i>'s parsing mode (e.g., 'sgml', 'tex', 'html', 'url').<br>  <b>--personal=&lt;file&gt;</b>: Specifies a personal dictionary file.<br>  <b>--ignore-case</b>: Ignores capitalization differences during checking.<br>  <b>--add-extra-dicts-from=&lt;file&gt;</b>: Adds dictionaries listed in the specified file.<br>  <b>--conf-dir=&lt;directory&gt;</b>: Specifies the configuration directory.<br>  <b>--conf=&lt;file&gt;</b>: Specifies the configuration file.<br><br><b><i>COMMAND</i></b><br>&nbsp;&nbsp;&nbsp;&nbsp;The executable command or script that <b>run-with-aspell</b> will execute. Its output or designated files will then be spell-checked.<br><br><b><i>COMMAND_ARGUMENTS</i></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Any arguments or options specific to the <i>COMMAND</i> being executed. These are passed directly to the command without interpretation by <b>run-with-aspell</b>.<br><br>


title: DESCRIPTION
content:
The <b>run-with-aspell</b> command is a utility often implemented as a wrapper script designed to integrate <i>Aspell</i>, a popular spell-checker, with the execution of other Linux commands. Its primary purpose is to facilitate automatic or interactive spell-checking of text produced by, or fed into, another program.<br><br>When invoked, <b>run-with-aspell</b> typically executes a specified command and then processes its standard output (or a designated input file) through <i>Aspell</i>. This allows users to easily check documentation generated by build tools, log files, or even interactive input from other applications for spelling errors without manually piping content to <i>Aspell</i>.<br><br>While not a standard core utility with a universal manual page, its implementation varies across systems (e.g., it's common in Debian-based environments for policy checking or documentation builds). Generally, it acts as a convenient front-end, abstracting the complexities of piping and configuring <i>Aspell</i>, making it easier to maintain linguistic quality in text-heavy workflows.


title: CAVEATS
content:
The exact behavior and available options for <b>run-with-aspell</b> can vary significantly as it is often a custom script or part of a larger project (e.g., Debian build tools) rather than a universally standardized command. Users should consult system-specific documentation or the script's source code if its behavior is unclear. It fundamentally relies on <i>Aspell</i> being installed and properly configured on the system for correct operation.


title: TYPICAL USE CASES
content:
<ul><li><b>Documentation Builds</b>: Automating spell-checking of generated documentation (e.g., man pages, READMEs) during the build process to catch errors early.</li><li><b>Policy Enforcement</b>: Used in projects like Debian's policy tools to ensure package descriptions and other metadata meet spelling standards.</li><li><b>Interactive Editing Wrappers</b>: Less common, but could potentially wrap text editors or input fields to provide on-the-fly spell-checking.</li><li><b>Scripted Content Generation</b>: Checking output from scripts that generate textual content.</li></ul>


title: IMPLEMENTATION VARIATIONS
content:
Because <b>run-with-aspell</b> is typically a shell script, its specific implementation can vary. Some versions might:<ul><li>Pipe <i>stdout</i> of <i>COMMAND</i> directly to <i>aspell</i>.</li><li>Create a temporary file with <i>COMMAND</i>'s output and then run <i>aspell</i> on that file.</li><li>Support additional environment variables for configuration.</li><li>Offer custom options to control logging or error handling.</li></ul>


title: HISTORY
content:
While not a command with a long, independent development history like core Unix utilities, <b>run-with-aspell</b> (or similar scripts) emerged as a practical solution in environments requiring automated text quality control. Its usage became prominent in project build systems, particularly within open-source communities like Debian, where it's used to ensure documentation, man pages, and other text files adhere to linguistic standards as part of the build or policy-checking process. Its development is often tied to specific project needs rather than a standalone tool.


title: SYNOPSIS
content:
<i><br>run0 [options] &lt;command&gt; [arguments...]</i><br><br><i>Note: This synopsis is hypothetical.</i> As 'run0' is not a standard Linux command, its actual syntax, if it exists as a custom utility, would be entirely dependent on its specific implementation. It is presumed to follow a common pattern for privileged execution wrappers.


title: PARAMETERS
content:
<b><i>No standard parameters</i></b><br>&nbsp;&nbsp;&nbsp;&nbsp;As 'run0' is not a standard Linux command, there are <i>no predefined options or parameters</i>. Any parameters it might accept would be entirely dependent on its custom implementation. For example, a custom script could define options for user context, environment variables, or logging, similar to how <i>sudo</i> manages its options.<br><br>


title: DESCRIPTION
content:
The 'run0' command is <i>not a standard or universally recognized utility</i> within the Linux ecosystem. It does not ship with common distributions nor is it part of the GNU Core Utilities or POSIX standards. If encountered, 'run0' most likely refers to a <i>custom script</i>, an <i>alias</i> defined in a user's shell configuration (e.g., .bashrc, .zshrc), or a <i>local application-specific wrapper</i>. <br><br>Its name, combining 'run' with '0' (which commonly signifies user ID 0, the <i>root user</i>), strongly suggests its intended purpose would be to execute commands with <i>root privileges</i>. This functionality is typically handled by well-established and secure commands like <i>sudo</i> or <i>doas</i>. Without specific context or access to its source code, the exact behavior, security mechanisms, and required permissions of a custom 'run0' command remain unknown. It is crucial to verify the origin and implementation of any unknown command, especially one hinting at privileged execution.


title: CAVEATS
content:
The 'run0' command is <i>not a standard component</i> of most Linux distributions. Its appearance signifies a <i>custom script</i>, <i>alias</i>, or <i>local utility</i>. Therefore, its behavior, options, and security implications are entirely dependent on its specific implementation. <br><br>Users should <i>exercise extreme caution</i> if encountering an unknown 'run0' command and <i>thoroughly investigate its source and purpose</i> before execution, especially since its name suggests privileged operations. Executing unknown commands with root privileges can lead to <i>system compromise or instability</i>.


title: POTENTIAL PURPOSE
content:
Given its name, 'run0' would conceptually serve to execute a command with the privileges of user ID 0, which is typically the <i>root user</i>. This is analogous to the functionality provided by established commands like <i>sudo</i> or <i>doas</i>, which allow a permitted user to execute commands as another user (often root).


title: SECURITY IMPLICATIONS
content:
If 'run0' were a custom utility, its security would depend entirely on its implementation. Commands executing as root carry significant security risks if not properly designed and secured. They must rigorously validate user permissions, arguments, and environment variables to prevent privilege escalation, unauthorized access, or system compromise. A poorly implemented 'run0' could be a major security vulnerability.


title: HISTORY
content:
There is <i>no documented history</i> for a standard 'run0' command in Linux, as it does not exist as a common, pre-installed utility. Any 'run0' found would be a <i>relatively recent, localized creation</i> within a specific system or environment, often developed for particular administrative or development workflows. It is not part of any major Linux project or standard.


title: SYNOPSIS
content:
<b>runcon</b> [<I>OPTIONS</I>] <I>CONTEXT COMMAND</I> [<I>ARGS...</I>]<br><b>runcon</b> [<I>OPTIONS</I>] (<I>-u USER</I> | <I>-r ROLE</I> | <I>-t TYPE</I> | <I>-l RANGE</I> | <I>-P</I>) <I>COMMAND</I> [<I>ARGS...</I>]<br><b>runcon</b> [<I>OPTIONS</I>] <I>-c COMMAND</I> [<I>ARGS...</I>]<br><b>runcon</b> [<I>OPTIONS</I>] <I>-- COMMAND</I> [<I>ARGS...</I>]


title: PARAMETERS
content:
<b><I>CONTEXT</I></b><br>&nbsp;&nbsp;&nbsp;&nbsp;The full <I>SELinux</I> context string (e.g., <I>unconfined_u:unconfined_r:unconfined_t:s0</I>) to apply to the <I>COMMAND</I>.<br><br><b><I>-u USER, --user=USER</I></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Set the <I>SELinux</I> user part of the new security context.<br><br><b><I>-r ROLE, --role=ROLE</I></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Set the <I>SELinux</I> role part of the new security context.<br><br><b><I>-t TYPE, --type=TYPE</I></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Set the <I>SELinux</I> type (domain) part of the new security context. This is often the most significant component for access control decisions.<br><br><b><I>-l RANGE, --range=RANGE</I></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Set the <I>SELinux</I> level (sensitivity and category) part of the new security context. Typically used in multi-level security (MLS) or multi-category security (MCS) environments.<br><br><b><I>-P</I></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Use the context derived from the policy for the specified user, role, type, and range (if specified). This option is useful for precise context derivation according to policy rules.<br><br><b><I>-c, --compute</I></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Compute the context from the executable's file context as defined by the <I>SELinux</I> policy, without explicitly specifying a full context string. This is useful for running a program in its default, intended domain.<br><br><b><I>--</I></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Indicates the end of <I>runcon</I> options, allowing subsequent arguments to be treated as part of the <I>COMMAND</I> to be executed, even if they start with a hyphen. When used alone (<I>runcon -- COMMAND</I>), it executes the <I>COMMAND</I> in its default domain transition as per policy.<br><br><b><I>COMMAND</I></b><br>&nbsp;&nbsp;&nbsp;&nbsp;The executable command or program to run with the new security context.<br><br><b><I>ARGS...</I></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Any arguments to be passed to the <I>COMMAND</I>.<br><br>


title: DESCRIPTION
content:
The <b>runcon</b> command allows a user to execute a program or command with a specified <I>SELinux</I> security context. <br><br>In <I>SELinux</I>, every process and file has an associated security context, which is a label that contains information about the <I>SELinux</I> user, role, type, and optionally a sensitivity/category range. These contexts are used by the <I>SELinux</I> policy to determine what operations are allowed or denied.<br><br><b>runcon</b> is particularly useful for:<br><b>Testing:</b> Experimenting with different contexts to see their effect on a program's behavior or access permissions.<br><b>Debugging:</b> Identifying why a program is being denied access by <I>SELinux</I> by trying a more permissive context.<br><b>Privileged Operations:</b> Running specific commands with a tightly controlled, elevated context without granting broader system permissions to the user.<br><br>By changing the context of the executed command, <b>runcon</b> enables administrators and developers to precisely control and test the <I>SELinux</I> policy's impact on applications and services. It acts as an interface to the underlying <I>SELinux</I> <I>setexeccon()</I> system call.


title: CAVEATS
content:
Using <b>runcon</b> requires <I>SELinux</I> to be enabled and enforcing on the system.<br><br>The user attempting to use <b>runcon</b> must have the necessary <I>SELinux</I> permissions to transition to the specified target context. Without appropriate policy rules, context transitions will be denied, resulting in an error.<br><br>Misuse of <b>runcon</b>, such as running commands with overly permissive contexts, can bypass <I>SELinux</I> protections and introduce security vulnerabilities. It should be used with a clear understanding of the <I>SELinux</I> policy.


title: CONTEXT TRANSITION
content:
When <b>runcon</b> executes a command, it performs a context transition. This means the new process will inherit the specified <I>SELinux</I> context, not the context of the calling process. The <I>SELinux</I> policy then dictates what resources (files, sockets, other processes) the new process can access based on its new context.


title: DEFAULT BEHAVIOR
content:
If no specific context or context parts are provided (e.g., using only <I>runcon -- COMMAND</I>), <I>runcon</I> will attempt to execute <I>COMMAND</I> in its default context as defined by the <I>SELinux</I> policy. This default context is typically determined by the file context of the executable and applicable domain transition rules.


title: HISTORY
content:
<b>runcon</b> is an integral part of the <I>SELinux</I> userspace utilities, which were developed alongside the <I>SELinux</I> kernel modules to provide a comprehensive mandatory access control framework for Linux. It emerged as a crucial tool for administrators and developers to manage and debug <I>SELinux</I> policies.<br><br>Its development reflects the ongoing need for precise control over process contexts in highly secure environments. It leverages the <I>setexeccon()</I> system call, allowing for programmatic context changes, which has been a stable feature of the <I>SELinux</I> framework for many years.


title: SYNOPSIS
content:
While <i>runit</i> itself is the <i>init</i> process (PID 1) and not directly invoked by users, its primary user-facing command for service management is <b><i>sv</i></b>.<br><b><i>sv</i></b> [ -v ] &lt;command&gt; &lt;service_directory_or_name&gt; [...]


title: PARAMETERS
content:
<b>-v</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Enables verbose output, showing more details about the operation.<br><br><b>&lt;command&gt; (e.g., up, down, status)</b><br>&nbsp;&nbsp;&nbsp;&nbsp;The action to perform on the service(s). See individual commands below.<br><br><b>&lt;service_directory_or_name&gt;</b><br>&nbsp;&nbsp;&nbsp;&nbsp;The path to the service directory (e.g., /etc/service/myservice) or the service name relative to the service directory tree (e.g., myservice).<br><br><b>up</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Brings the service up (starts it if down, or signals it to restart if exited).<br><br><b>down</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Brings the service down (stops it).<br><br><b>once</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Starts the service, but does not restart it if it exits. Supervisor will exit after service does.<br><br><b>cont</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Continues a service that is paused.<br><br><b>pause</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Pauses a service by sending it a STOP signal.<br><br><b>hup</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Sends a HUP signal to the service process.<br><br><b>alrm</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Sends an ALRM signal to the service process.<br><br><b>int</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Sends an INT signal to the service process.<br><br><b>quit</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Sends a QUIT signal to the service process.<br><br><b>1-6</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Sends USR1 through USR6 signals to the service process, respectively.<br><br><b>term</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Sends a TERM signal to the service process.<br><br><b>kill</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Sends a KILL signal to the service process (forcibly terminates).<br><br><b>status</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Displays the current status of the specified service(s).<br><br><b>check</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Checks if the service is running and properly supervised.<br><br><b>exit</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Stops the service and permanently disables its supervision. The supervisor process will exit.<br><br><b>force-exit</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Immediately stops the service and permanently disables its supervision, without waiting for the service to terminate cleanly.<br><br><b>shutdown</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Attempts to stop all supervised services gracefully. Used during system shutdown.<br><br><b>reload</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Sends a HUP signal to the service. If the service exits, it will be restarted. Similar to 'hup' but with restart logic.<br><br><b>restart</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Sends a TERM signal to the service, waits for it to exit, and then restarts it. If it doesn't exit, sends KILL.<br><br><b>start</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Alias for the 'up' command. Starts the service.<br><br><b>stop</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Alias for the 'down' command. Stops the service.<br><br>


title: DESCRIPTION
content:
<i>runit</i> is a complete Unix init scheme and service supervision suite, designed for speed, reliability, and minimal resource usage. It functions as a replacement for traditional <i>init</i> systems like <i>SysVinit</i> or <i>systemd</i>, especially in environments prioritizing simplicity and robustness. The core philosophy revolves around "one process per service," where each daemon is managed by a dedicated <i>runit</i> supervisor. This modular approach enhances stability; if a service crashes, <i>runit</i> automatically restarts it, ensuring continuous operation. It typically operates in three stages: the initial boot process managed by <i>runit-init</i>, handling of login prompts (often by <i>runit-getty</i>), and continuous service supervision via the <i>sv</i> program. Services are configured within simple directories, each containing an executable <i>run</i> script that defines how the service starts. This design makes service management straightforward, enabling actions like starting, stopping, reloading, and checking status through the intuitive <i>sv</i> command. Its small footprint and predictable behavior make it a popular choice for servers, embedded systems, and users seeking a less complex alternative to modern init systems.


title: CAVEATS
content:
<i>runit</i> is an entire <i>init</i> system, not just a single command. The primary user interface for managing services is the <b><i>sv</i></b> command. It is not directly compatible with <i>SysVinit</i> or <i>systemd</i> service configurations; services must be specifically structured for <i>runit</i>. While highly reliable, it requires understanding its unique service directory structure and supervision model.


title: CORE COMPONENTS AND PHILOSOPHY
content:
<i>runit</i>'s architecture is built on a few core principles and components:<br>1. <b>One process per service</b>: Each managed service runs as a single process, supervised by a dedicated <i>supervise</i> daemon.<br>2. <b>Service Directories</b>: Services are configured in a designated directory (commonly <i>/etc/service/servicename</i>). This directory contains an executable <i>run</i> script to start the service. Optionally, it can include a <i>log/run</i> script for dedicated service logging and a <i>control</i> directory for custom signal handling scripts.<br>3. <b>Simplicity and Predictability</b>: The tools are small, perform single tasks efficiently, and interact predictably, contributing to high reliability.<br>4. <b>Automatic Service Restart</b>: The supervisor automatically restarts services that crash or exit unexpectedly, ensuring high availability.


title: HISTORY
content:
<i>runit</i> was developed by Daniel J. Bernstein (djb) in 2002. It emerged as a lightweight, robust, and fast alternative to then-dominant <i>SysVinit</i> systems. Its design philosophy emphasizes simplicity, security, and reliability through minimal, focused tools and a clear process-per-service model. It has influenced other supervision systems and remains a choice for minimal systems or those seeking alternatives to more complex modern init systems.


title: DESCRIPTION
content:
The <b>runlevel</b> command is a utility used in Linux and Unix-like operating systems to display the system's previous and current runlevel. Runlevels are distinct operating states of a system, defining which services are running. They are primarily associated with SysVinit-based systems but are often emulated or reported by systemd for backward compatibility.<br><br>The command reads information from the <i>/var/run/utmp</i> (or <i>/run/utmp</i>) file, which logs various system events, including runlevel changes. The output consists of two characters: the first indicating the previous runlevel and the second indicating the current runlevel. If there was no discernible previous runlevel (e.g., after a fresh boot), the first character will be 'N'. Understanding runlevels is crucial for system administrators to manage system states, boot processes, and service startup/shutdown.


title: CAVEATS
content:
The <b>runlevel</b> command relies on the <i>/var/run/utmp</i> file for its information. If this file is corrupt or not properly updated by the init process, the output may be inaccurate or misleading.<br><br>While still present, the concept of runlevels is less central in modern Linux distributions that use systemd as their init system. systemd primarily uses "targets" (e.g., <i>multi-user.target</i>, <i>graphical.target</i>) to define system states, mapping them to traditional runlevels for compatibility.<br><br>The exact meaning of runlevels (especially runlevels 2-5) can vary significantly between different Linux distributions.


title: OUTPUT FORMAT EXPLAINED
content:
The output of <b>runlevel</b> is always two characters: <i>&lt;previous_runlevel&gt; &lt;current_runlevel&gt;</i>.<br><ul><li><b>N</b>: No previous runlevel (e.g., after initial boot).</li><li><b>S</b> or <b>s</b>: Single-user mode.</li><li><b>0</b>: System halt (power off).</li><li><b>1</b>: Single-user mode (often same as S).</li><li><b>2</b>, <b>3</b>, <b>4</b>, <b>5</b>: Multi-user modes. Their specific configurations (e.g., network services, graphical interface) can vary between distributions.</li><li><b>6</b>: System reboot.</li></ul>


title: RUNLEVEL CONCEPT IN MODERN LINUX
content:
While <b>runlevel</b> reports traditional runlevels, systemd manages system states using "targets." These targets effectively replace runlevels, offering more granular control. systemd ensures <i>utmp</i> is updated so that <b>runlevel</b> continues to function, allowing legacy scripts and administrators to use it.<br><br>For instance, <i>multi-user.target</i> typically corresponds to runlevel 3, and <i>graphical.target</i> to runlevel 5. While you can still use <b>runlevel</b>, systemd's <b>systemctl isolate</b> command is the modern way to change system states (targets).


title: HISTORY
content:
The <b>runlevel</b> command has been a staple in Unix-like operating systems for decades, stemming from the original System V Init (SysVinit) system. It was designed to provide a quick way for administrators to ascertain the system's operational state based on the runlevel concept.<br><br>With the advent of systemd as the dominant init system in modern Linux distributions, <b>runlevel</b>'s direct importance has diminished. However, it persists as a compatibility layer, often implemented as a simple script that reads the <i>utmp</i> file, which systemd populates to maintain backward compatibility with tools expecting traditional runlevel information. Its development has largely focused on maintaining this compatibility rather than introducing new features.


title: SYNOPSIS
content:
<b>runmailcap</b> [<i>options</i>] [<i>MIME-type</i>] [<i>filename</i>] [<i>--</i>] [<i>viewer-options</i>]


title: PARAMETERS
content:
<b><b>-d</b>, <b>--debug</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Enable verbose debugging output to stderr.<br><br><b><b>-s</b>, <b>--no-stdout</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Suppress program output to stdout.<br><br><b><b>-p</b>, <b>--no-stderr</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Suppress program output to stderr.<br><br><b><b>-q</b>, <b>--query-command</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Output the command that would be run, but do not execute it.<br><br><b><b>-v</b>, <b>--view-command</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Similar to <b>-q</b>, but handles spaces in arguments correctly for shell execution.<br><br><b><b>-i</b>, <b>--interpret-command</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Output the command with all <i>mailcap</i> substitutions (%s, %t, etc.) resolved, but do not execute.<br><br><b><b>-n</b>, <b>--no-pager</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Do not use a pager even if the <i>mailcap</i> entry has 'needsterminal' set and a pager is defined.<br><br><b><b>-M</b>, <b>--mime-type</b> <i>type</i></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Force the MIME type to <i>type</i>, overriding autodetection if <i>filename</i> is provided.<br><br><b><b>-f</b>, <b>--file</b> <i>filename</i></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Specify the file to operate on. If omitted, <i>filename</i> is taken from the first non-option argument.<br><br><b><b>-F</b>, <b>--force-action</b> <i>action</i></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Force a specific action (e.g., 'view', 'compose', 'edit') instead of the default 'view'.<br><br><b><b>-k</b>, <b>--keep-extension</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Do not strip the extension from the filename before passing it to the command.<br><br><b><b>-l</b>, <b>--list-actions</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;List all possible actions for the specified MIME type.<br><br><b><b>-a</b>, <b>--action</b> <i>action-name</i></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Execute a specific action defined in the <i>mailcap</i> file for the MIME type.<br><br><b><b>-b</b>, <b>--no-block</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Execute the command in the background, not waiting for it to exit.<br><br><b><b>-e</b>, <b>--edit</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Equivalent to <b>-F edit</b>, forces the 'edit' action.<br><br><b><b>-D</b>, <b>--dump-entry</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Dump the matching <i>mailcap</i> entry that would be used.<br><br><b><b>-g</b>, <b>--show-guess</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Show the guessed MIME type for the file.<br><br><b><b>-m</b>, <b>--show-mailcap</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Show the <i>mailcap</i> entries as they are processed during lookup.<br><br><b><b>-o</b>, <b>--optional-parameters</b> <i>params</i></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Pass additional optional parameters to the <i>mailcap</i> entry.<br><br><b><b>-w</b>, <b>--ask-user</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;If multiple commands match, prompt the user to choose one interactively.<br><br><b><b>-t</b>, <b>--text-plain</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;If no specific MIME type is found, treat the file as <i>text/plain</i>.<br><br><b><b>-x</b>, <b>--execute</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Explicitly execute the command (this is the default behavior).<br><br><b><b>-L</b>, <b>--language</b> <i>lang</i></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Specify a language for localized <i>mailcap</i> entries.<br><br><b><b>--</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Separates <b>runmailcap</b> options from arguments to be passed directly to the executed command.<br><br>


title: DESCRIPTION
content:
The <b>runmailcap</b> command is a utility designed to execute external programs based on the MIME (Multipurpose Internet Mail Extensions) type of a file. It works by parsing <i>mailcap</i> files, which define how various MIME types should be handled, typically for viewing, composing, or editing. <br><br>When given a MIME type and a filename, <b>runmailcap</b> searches through a predefined list of <i>mailcap</i> files (e.g., <i>/etc/mailcap</i>, <i>~/.mailcap</i>, or those specified by the <i>MAILCAPS</i> environment variable) to find a suitable entry. Once a matching entry is found, it constructs and executes the corresponding command, passing the filename and any additional arguments. <br><br>This command is crucial in environments where applications (like email clients or web browsers) need to delegate the handling of specific file types to external viewers or editors, providing flexibility and extensibility in how different media types are managed on a Unix-like system.


title: CAVEATS
content:
<b>runmailcap</b> executes arbitrary commands defined in <i>mailcap</i> files. Maliciously crafted <i>mailcap</i> entries or files could lead to arbitrary code execution if not properly secured. Users should be cautious about <i>mailcap</i> files obtained from untrusted sources. <br><br>The behavior is highly dependent on the correct configuration of <i>mailcap</i> files and the presence of the specified external programs. If a suitable viewer/editor is not found or the <i>mailcap</i> entry is incorrect, the command may fail or produce unexpected results.


title: MAILCAP FILES
content:
<b>runmailcap</b> relies heavily on <i>mailcap</i> files, which are configuration files defining how different MIME types should be handled. These files are typically located at <i>/etc/mailcap</i> for system-wide defaults and <i>~/.mailcap</i> for user-specific overrides. The <i>MAILCAPS</i> environment variable can also specify a colon-separated list of additional <i>mailcap</i> files. Each line in a <i>mailcap</i> file specifies a MIME type, a command to execute, and optional flags or parameters.


title: MIME TYPE DETECTION
content:
While <b>runmailcap</b> can be explicitly told the MIME type, it can also attempt to guess the MIME type of a file based on its content or filename extension if not provided. This detection often relies on other system utilities like <i>file(1)</i> or internal heuristics, though the primary mechanism is to match the provided type against <i>mailcap</i> entries.


title: HISTORY
content:
The concept of <i>mailcap</i> files and utilities like <b>runmailcap</b> emerged in the early 1990s as part of the MIME standard's development to address the need for flexible handling of diverse media types in email and other applications. It provides a standardized, declarative way for Unix-like systems to associate MIME types with helper applications, predating more modern desktop-environment-specific MIME handling systems like <i>xdg-mime</i> but remaining a foundational and widely used component in many terminal-based applications and mail clients.


title: PARAMETERS
content:
<b>service_directory</b><br>&nbsp;&nbsp;&nbsp;&nbsp;The path to the service directory containing the '<b>run</b>' script and optionally '<b>log/run</b>', '<b>down</b>', etc. This directory defines the service's behavior and associated resources.<br><br>


title: DESCRIPTION
content:
runsv is a core component of the <b>daemontools</b> (and compatible systems like <b>s6</b> or <b>perp</b>) suite designed for robust process supervision. It monitors a single service, specified by a service directory. Its primary function is to <i>run</i> the service's executable script, typically named <b>run</b>, and automatically restart it if the process exits. This ensures high availability for critical applications. runsv handles various signals, allowing external tools like <b>sv</b> to control the service's state (e.g., <b>up</b>, <b>down</b>, <b>restart</b>). It also manages a <b>log</b> subdirectory, often used to pipe service output to <b>multilog</b> or similar logging tools. By providing automatic restarts and controlled shutdown, runsv simplifies the management of long-running daemon processes, making them resilient to crashes and system events. It's usually invoked by <b>svscan</b>, which continuously scans a directory for new or removed service directories and ensures <b>runsv</b> instances are running for each.


title: CAVEATS
content:
<b>runsv</b> is not a standalone init system; it requires <b>svscan(8)</b> or a similar supervisor to manage multiple service directories effectively. <br>Its configuration relies on a specific directory structure and shell scripts, which might be less intuitive for users accustomed to more declarative service definitions (e.g., systemd units). <br>Error output from the supervised <b>run</b> script might not always be immediately clear, requiring inspection of logs. <br>While <b>daemontools</b> is very stable, the original project is no longer actively developed, though many compatible alternatives exist.


title: SERVICE DIRECTORY STRUCTURE
content:
A <b>runsv</b>-managed service typically resides in a directory (e.g., <i>/etc/service/myservice</i>). Inside, a file named <b>run</b> (an executable script) defines how to start the service. Optionally, a <b>log</b> subdirectory with its own <b>run</b> script handles service logging, often piping output to <b>multilog</b>. A <b>down</b> file (empty) can prevent <b>runsv</b> from starting the service if present. Other files like <b>control</b> and <b>status</b> are used by <b>sv(8)</b>.


title: PROCESS STATES AND CONTROL
content:
<b>runsv</b> maintains the state of the supervised process (e.g., <i>up</i>, <i>down</i>). External commands like <b>sv(8)</b> interact with <b>runsv</b> via a named pipe (often in <i>/service/myservice/supervise/control</i>) to send commands like <i>start</i>, <i>stop</i>, <i>restart</i>, <i>reload</i>, or query the service's <i>status</i>. This provides a consistent and programmatic interface for service management.


title: HISTORY
content:
<b>runsv</b> is a key component of <b>daemontools</b>, a collection of programs for managing UNIX services written by Daniel J. Bernstein (D.J.B.). Released in the late 1990s, <b>daemontools</b> pioneered a robust, lightweight, and reliable approach to service supervision that significantly influenced subsequent service management systems. Its design principles, focusing on simple, single-purpose utilities and a declarative directory-based configuration, proved highly effective for maintaining service uptime. While <b>daemontools</b> itself hasn't seen recent updates from D.J.B., its concepts and implementations have inspired many modern supervision suites like <b>s6</b>, <b>perp</b>, and even aspects of <b>systemd</b>'s design regarding process supervision and logging.


title: PARAMETERS
content:
<b><i>service-directory</i></b><br>&nbsp;&nbsp;&nbsp;&nbsp;The path to the new directory that <i>runsvdir</i> should supervise. This directory must contain subdirectories, each representing a service to be supervised by <i>runsvdir</i>.<br><br>


title: DESCRIPTION
content:
<i>runsvchdir</i> is a utility from the <i>runit</i> service supervision suite. Its primary function is to instruct a running <i>runsvdir</i> process to change the directory from which it supervises services. <i>runsvdir</i> normally supervises all subdirectories within a specified <i>service-directory</i>.<br><br>By executing <b>runsvchdir &lt;new-directory&gt;</b>, it modifies a symbolic link (usually named <i>.</i> or <i>_current</i>) in the <i>runsvdir</i>'s base service directory, pointing it to <b>&lt;new-directory&gt;</b>. Subsequently, it sends a <b>SIGHUP</b> signal to the <i>runsvdir</i> process, prompting it to re-read its configuration and start/stop services based on the new active directory. This allows for dynamic switching of entire service sets without restarting the <i>runsvdir</i> supervisor itself, which is crucial for maintaining system uptime and managing different application environments.


title: CAVEATS
content:
<i>runsvdir</i> must be running and configured to use the <i>runsvchdir</i> mechanism (e.g., by supervising a <i>.</i> symlink or similar convention).<br>Permissions: The user running <i>runsvchdir</i> needs appropriate write permissions to the <i>runsvdir</i>'s base service directory (where the symlink resides) and read/execute permissions for the <i>new-service-directory</i>.<br>Services in the old directory will be stopped, and services in the new directory will be started (or their status updated) by <i>runsvdir</i>. This can cause momentary service interruptions during the switch.<br>The <i>runsvdir</i> process typically runs as root, so <i>runsvchdir</i> often needs to be run with elevated privileges or via a mechanism that allows it to send signals and modify the symlink.


title: HOW IT WORKS
content:
<i>runsvchdir</i> typically updates a symbolic link (often named <i>.</i> or <i>_current</i>) within the <i>runsvdir</i>'s root service directory to point to the <b>&lt;service-directory&gt;</b> specified. It then sends a <b>SIGHUP</b> signal to the <i>runsvdir</i> process, instructing it to re-read its configuration and adjust its supervision based on the new target of the symlink. This clever use of symlinks and signals enables efficient, on-the-fly service group switching.


title: COMMON USE CASES
content:
<b>runsvchdir</b> is particularly useful for:<br>Switching between different development, staging, or production service environments.<br>Enabling or disabling large sets of services quickly and atomically.<br>Performing A/B testing of service configurations or application versions.<br>Facilitating blue/green deployments by shifting traffic from one service group to another.


title: HISTORY
content:
<i>runit</i> was created by Gerrit Pape as a lightweight, reliable, and portable init and service supervision system, often seen as an alternative to System V init, systemd, and supervisord. <i>runsvchdir</i> is an integral part of <i>runit</i>'s design for dynamic service management without requiring restarts of the main supervisor. Its development focuses on simplicity and robustness, adhering to the Unix philosophy of doing one thing well.


title: PARAMETERS
content:
<b><b>-P</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;If <b>runsvdir</b> is run as a process group leader, this option creates a new session and process group for the <i>svscan</i> child process. This is particularly useful when <b>runsvdir</b> is started by <i>init</i> or a similar process, ensuring <i>svscan</i> operates in its own detached session.<br><br><b><i>dir</i></b><br>&nbsp;&nbsp;&nbsp;&nbsp;The path to the directory that <b>runsvdir</b> will manage. This directory must contain the subdirectories for the services to be supervised. <b>runsvdir</b> will execute <i>svscan</i> within this specified <i>dir</i>.<br><br>


title: DESCRIPTION
content:
<b>runsvdir</b> is a utility from the <i>runit</i> supervision suite, designed to manage a directory containing service supervision directories. It specifically ensures that the <i>svscan</i> process is continuously running within the specified directory.<br><br>When <i>svscan</i> is active, it monitors its designated directory (e.g., <i>/etc/service</i>) for subdirectories. Each subdirectory represents a service (e.g., <i>/etc/service/myservice</i>) and should contain a <i>run</i> script and optionally a <i>log</i> subdirectory. <i>svscan</i> then launches a <i>supervise</i> process for each service, which is responsible for keeping the service's <i>run</i> script executing and restarting it upon termination or crash.<br><br>By acting as a reliable parent for <i>svscan</i>, <b>runsvdir</b> plays a crucial role in maintaining system services robustly. It's often used as the root of the service supervision tree, ensuring continuous uptime and automated recovery of crashed services, making it a fundamental component for fault-tolerant system management.


title: CAVEATS
content:
<b>runsvdir</b> expects the <i>svscan</i> executable to be available in the system's <b>PATH</b> or at a predefined location (e.g., <i>/command/svscan</i> for <i>runit</i> systems).<br><br>It is designed to be run as a daemon, often as the direct child of the system's <i>init</i> process. If <i>svscan</i> exits, <b>runsvdir</b> will also terminate, indicating a critical failure in the service supervision tree.


title: PROCESS MANAGEMENT ROLE
content:
On systems utilizing <i>runit</i>, <b>runsvdir</b> often takes on a critical role in process management, sometimes even acting as PID 1 (the <i>init</i> process) itself, or being directly spawned by it. It serves as the primary guardian of the <i>svscan</i> process, which is essential for ensuring all other system services are kept alive and automatically restarted upon failure.


title: INTEGRATION WITH INIT SYSTEMS
content:
Many <i>runit</i>-based Linux distributions configure their <i>init</i> system to execute <b>runsvdir</b> early in the boot sequence, typically directing it to manage a central services directory (e.g., <i>/etc/service</i>). This tight integration ensures that service supervision begins as soon as the system starts, providing a robust and self-healing environment for system services.


title: HISTORY
content:
<b>runsvdir</b> is a core component of the <i>runit</i> init scheme and service supervision system, created by Gerrit Pape. <i>runit</i> emerged as a lightweight, reliable, and fast alternative to traditional <i>sysvinit</i> and the <i>daemontools</i> suite. <b>runsvdir</b> specifically addresses the need to reliably launch and monitor the main <i>svscan</i> process, which in turn manages all individual services. Its development is rooted in the principles of simplicity and robustness, ensuring that the system's service supervision remains active and functional at all times.


title: SYNOPSIS
content:
<b>runuser</b> [<i>options</i>] -u <i>user</i> [<i>command</i> [<i>argument</i>...]]<br><b>runuser</b> [<i>options</i>] -u <i>user</i> -c <i>command</i>


title: PARAMETERS
content:
<b>-u, --user <i>user</i></b><br>&nbsp;&nbsp;&nbsp;&nbsp;The target user's name or UID. This option is mandatory.<br><br><b>-c, --command <i>command</i></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Execute the specified command string instead of an interactive shell. The command is passed to the shell.<br><br><b>-l, --login</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Start the shell as a login shell. This implies changing to the target user's home directory and cleaning the environment.<br><br><b>-p, --preserve-environment</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Do not reset the environment variables, preserving them from the calling process.<br><br><b>-P, --pty</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Allocate a pseudo-terminal for the session, allowing full terminal control.<br><br><b>-s, --shell <i>shell</i></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Specify the shell to use instead of the target user's default shell.<br><br><b>-g, --group <i>group</i></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Specify the primary group for the session.<br><br><b>-G, --supp-group <i>group</i></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Specify an additional supplementary group for the session.<br><br><b>--session-command</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Equivalent to <i>-c</i>, but indicates that the command is to be executed via a session.<br><br><b>--help</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Display help information and exit.<br><br><b>--version</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Display version information and exit.<br><br><b>--</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Indicates the end of options. Any arguments following '--' are treated as command arguments, even if they start with a hyphen.<br><br>


title: DESCRIPTION
content:
<b>runuser</b> allows a user to execute a command or an interactive shell as another user. It is part of the <i>util-linux</i> package and is often a symbolic link to the <b>su</b> command, but with a crucial distinction: when executed by the root user, <b>runuser</b> does not prompt for a password. This makes it particularly useful in scripts and automated environments where interacting with a password prompt is undesirable or impossible.<br><br>The command changes the effective user ID (UID) and group ID (GID) to that of the target user. By default, it creates a new environment, discarding most of the current user's environment variables, similar to a new login. However, options exist to preserve the environment or specific variables. It's commonly used by system administrators to perform tasks under a less privileged account or to simulate a user's environment for debugging purposes. Unlike <b>sudo</b>, <b>runuser</b> typically requires <b>root</b> privileges to switch to an arbitrary user without providing the target user's password; otherwise, it requires authentication.


title: CAVEATS
content:
<b>runuser</b> is a powerful command that, when misused, can have security implications.<br><br>When executing commands as another user, be mindful of the environment variables. By default, <b>runuser</b> clears most environment variables and sets a new, minimal environment. This can sometimes lead to unexpected behavior if the executed command relies on specific environment settings. Use the <b>--preserve-environment</b> (<i>-p</i>) option with caution, as it can expose sensitive environment variables to the new user session.<br><br>Unlike <b>sudo(8)</b>, <b>runuser</b> does not inherently manage or restrict what commands a non-root user can execute as another user. It primarily changes the user ID. If a non-root user attempts to use <b>runuser</b> for a user other than themselves, it will typically require authentication, similar to <b>su</b>. Its main advantage over <b>su</b> for root is the lack of a password prompt, which is crucial for automation.


title: RUNUSER VS. SU
content:
While <b>runuser</b> is often a symlink to <b>su</b>, its primary behavioral difference is that <b>root</b> can execute <b>runuser</b> without being prompted for the target user's password. <b>su</b> will typically always prompt for a password unless configured otherwise via PAM. This makes <b>runuser</b> ideal for root-owned scripts where non-interactive user switching is required.


title: ENVIRONMENT HANDLING
content:
By default, <b>runuser</b> attempts to provide a 'clean' environment for the target user, simulating a fresh login as much as possible (e.g., setting <i>HOME</i>, <i>SHELL</i>, <i>USER</i>, <i>LOGNAME</i>, <i>PATH</i>). The <b>--preserve-environment</b> (<i>-p</i>) option explicitly prevents this cleanup, carrying over the calling user's environment. The <b>--login</b> (<i>-l</i>) option goes even further in simulating a new login, reading the target user's profile files.


title: HISTORY
content:
<b>runuser</b> is part of the <i>util-linux</i> collection of essential system utilities for Linux. It emerged as a dedicated utility to address the specific need for running commands as another user without a password prompt when invoked by root. Historically, <b>su</b> would always prompt for a password unless specific PAM configurations were in place or it was run from a trusted context. <b>runuser</b> provides a cleaner, more predictable behavior for scripting where <b>su</b>'s password prompt could cause scripts to hang. In many systems, <b>runuser</b> is implemented as a symlink to <b>su</b> with internal logic to handle the <i>--user</i> option and the no-password-for-root behavior. Its development focused on providing a reliable command for privileged automation tasks.


title: SYNOPSIS
content:
<b>rusnapshot</b> <I>action</I> [<i>options</i>]<br><b>rusnapshot</b> create [--description <I>text</I>]<br><b>rusnapshot</b> list<br><b>rusnapshot</b> delete <I>snapshot_id</I><br><b>rusnapshot</b> rollback <I>snapshot_id</I>


title: PARAMETERS
content:
<b>create</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Creates a new Btrfs snapshot of the current root filesystem state. This snapshot can later be used for rollback.<br><br><b>--description <I>text</I></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Used with <b>create</b>, this option adds a human-readable description to the new snapshot, making it easier to identify later.<br><br><b>list</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Displays a list of all existing Btrfs snapshots managed by <i>rusnapshot</i>, typically including their IDs, creation times, and descriptions.<br><br><b>delete <I>snapshot_id</I></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Removes a specified snapshot. The <i>snapshot_id</i> is obtained from the <b>list</b> command. Use with caution as this action is irreversible.<br><br><b>rollback <I>snapshot_id</I></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Reverts the root filesystem to the state of the specified snapshot. This typically involves making the chosen snapshot the active root subvolume and moving the current root to an 'old_root' subvolume. Requires careful use and understanding of Btrfs subvolumes.<br><br><b>--help</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Displays a brief help message and usage information for the command.<br><br>


title: DESCRIPTION
content:
The <i>rusnapshot</i> command is a utility designed to simplify the management of Btrfs filesystem snapshots, particularly for the root filesystem. It allows users to easily <b>create</b>, <b>list</b>, <b>delete</b>, and <b>rollback</b> to previous system states. It acts as a high-level wrapper around low-level <i>btrfs</i> commands, abstracting away much of the complexity involved in manually managing Btrfs subvolumes and snapshots. This tool is often used as a direct method for system recovery or for creating restore points before significant system changes (e.g., updates, driver installations). It's a key component in enabling robust rollback capabilities on Btrfs-based Linux installations, frequently found in distributions like openSUSE.


title: CAVEATS
content:
<i>rusnapshot</i> is designed specifically for Btrfs filesystems, particularly for managing the root subvolume. It will not work on other filesystem types.<br>Performing a <b>rollback</b> or <b>delete</b> operation can lead to data loss or an unbootable system if not used correctly. Always ensure you understand the implications and have backups.<br>While it provides a simplified interface, a basic understanding of Btrfs subvolumes is beneficial for advanced usage and troubleshooting. It often interacts with the default Btrfs subvolume structure (e.g., `@` for root, `@snapshots`).


title: USE CASES
content:
<b>System Updates:</b> Create a snapshot before a major system update to easily revert if something goes wrong.<br><b>Testing Software:</b> Snapshot your system before installing experimental software or making significant configuration changes.<br><b>Disaster Recovery:</b> If your system becomes unbootable or unstable, a quick rollback to a previous working snapshot can save time and effort.


title: INTEGRATION WITH SNAPPER
content:
While <i>rusnapshot</i> can be used manually, it often works in conjunction with <i>snapper</i>, another Btrfs snapshot management tool. <i>Snapper</i> can automatically create snapshots (e.g., before/after `zypper` or `YaST` operations), and <i>rusnapshot</i> provides a direct way to manage or rollback to these or manually created snapshots.


title: HISTORY
content:
The <i>rusnapshot</i> utility is often part of the 'rollback' package, predominantly found in openSUSE and SUSE Linux Enterprise distributions. Its development is closely tied to SUSE's early and strong adoption of Btrfs as the default root filesystem, aiming to provide robust system recovery capabilities out-of-the-box, complementing tools like <i>snapper</i>.


title: SYNOPSIS
content:
<b>rustc</b> [<i>OPTIONS</i>] <i>INPUT</i>...<br><br><i>Examples:</i><br><code>rustc main.rs</code><br><code>rustc --crate-type lib my_lib.rs</code><br><code>cargo build</code> <i>(most common usage, where Cargo invokes rustc)</i>


title: PARAMETERS
content:
<b>--help</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Display help information about the command, including all available options and their usage.<br><br><b>--version</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Print <i>rustc</i>'s version, commit hash, and host triple (e.g., <code>x86_64-unknown-linux-gnu</code>).<br><br><b>-O, --optimize</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Controls the optimization level during compilation. For example, <code>-O</code> is an alias for <code>-C opt-level=2</code> (a good balance of speed and compile time), or <code>-C opt-level=s</code> (optimize for size).<br><br><b>-C <i>FLAG</i>=<i>VALUE</i>, --codegen <i>FLAG</i>=<i>VALUE</i></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Pass an arbitrary code generation option to the backend. Common flags include <code>opt-level</code>, <code>debuginfo</code>, <code>lto</code> (Link Time Optimization), and <code>target-cpu</code>.<br><br><b>--crate-type <i>TYPE</i></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Specify the type of crate to be built. Common types are <code>bin</code> (executable), <code>lib</code> (Rust library), <code>cdylib</code> (C-compatible dynamic library), and <code>staticlib</code> (C-compatible static library).<br><br><b>--emit <i>TYPE</i></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Specify what output files to emit. Can be a comma-separated list. Examples: <code>asm</code> (assembly), <code>llvm-ir</code>, <code>obj</code> (object file), <code>link</code> (default, produces executable/library).<br><br><b>--target <i>TRIPLE</i></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Compile for a specific target triple (e.g., <code>x86_64-unknown-linux-gnu</code> for Linux, <code>x86_64-pc-windows-msvc</code> for Windows). Useful for cross-compilation.<br><br><b>--out-dir <i>DIR</i></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Write all output files (executable, libraries, intermediate files) to the specified directory instead of the current working directory.<br><br><b>-L <i>PATH</i>, --extern <i>CRATE</i>=<i>PATH</i></b><br>&nbsp;&nbsp;&nbsp;&nbsp;<code>-L</code> adds a directory to the library search path. <code>--extern</code> explicitly links an external crate by specifying its name and path to its <code>.rlib</code> or <code>.so</code> file.<br><br><b>-g, --debug</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Emit debug information for the compiled binary, making it easier to debug with tools like GDB. This is equivalent to <code>-C debuginfo=2</code>.<br><br><b>--edition <i>YEAR</i></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Specify the Rust edition to use for compilation (e.g., <code>2015</code>, <code>2018</code>, <code>2021</code>). Editions allow Rust to evolve without breaking existing code.<br><br>


title: DESCRIPTION
content:
<i>rustc</i> is the official compiler for the Rust programming language. It takes Rust source code files (typically with a <code>.rs</code> extension) and translates them into machine code, producing executable binaries, static libraries, or dynamic libraries. While direct invocation of <i>rustc</i> is possible, most Rust developers interact with it indirectly through the <b>Cargo</b> build system, which handles project management, dependency resolution, and orchestrates the compilation process.<br><br><i>rustc</i> is designed for high performance, memory safety, and concurrency, leveraging advanced optimization techniques and strict compile-time checks to prevent common programming errors like null pointer dereferences and data races. It offers a wide range of configuration options for optimization levels, code generation targets, and output formats, making it a powerful tool for low-level systems programming.


title: CAVEATS
content:
While <i>rustc</i> is the core compiler, it's generally not used directly for day-to-day development in Rust. The <b>Cargo</b> build tool is the standard way to manage Rust projects, handle dependencies, run tests, and orchestrate the compilation process. Direct <i>rustc</i> usage is typically reserved for highly specialized scenarios, debugging build issues, or understanding compilation internals.


title: INCREMENTAL COMPILATION
content:
<i>rustc</i> supports incremental compilation, which significantly speeds up re-compilations after small changes by reusing artifacts from previous builds. This feature is enabled by default when using <b>Cargo</b>, drastically reducing build times for iterative development.


title: TARGET TRIPLES
content:
<i>rustc</i> uses a "target triple" (e.g., <code>x86_64-unknown-linux-gnu</code>) to identify the target architecture, vendor, operating system, and ABI for which the code is being compiled. This precise specification enables seamless cross-compilation for various platforms, from embedded systems to different operating systems.


title: HISTORY
content:
The Rust programming language and its compiler, <i>rustc</i>, were initially developed at Mozilla Research, with the first public announcement in 2010. Rust 1.0, and thus the first stable version of <i>rustc</i>, was released in May 2015. Since then, <i>rustc</i> has been continuously developed by a large open-source community, adopting a rapid six-week release cycle. Its design reflects a strong emphasis on performance, memory safety, and concurrency, making Rust suitable for systems programming. Over time, features like incremental compilation and advanced optimization passes have been integrated into <i>rustc</i> to improve developer experience and compiled code quality.


title: SEE ALSO
content:
cargo(1): The Rust package manager and build tool., rustup(1): The Rust toolchain installer and manager., gdb(1): The GNU Debugger, often used for debugging Rust executables., ld(1): The GNU linker, used by rustc to link object files.


title: PARAMETERS
content:
<b><b>-h</b>, <b>--help</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Prints help information for <i>rustdoc</i>.<br><br><b><b>-V</b>, <b>--version</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Prints version information for <i>rustdoc</i>.<br><br><b><b>-o</b>, <b>--output</b> <i>&lt;PATH&gt;</i></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Specifies the directory where the generated documentation will be written. Defaults to <code>./doc</code>.<br><br><b><b>--test</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Instructs <i>rustdoc</i> to run all code examples found within documentation comments as tests. This is crucial for maintaining accurate documentation.<br><br><b><b>--crate-name</b> <i>&lt;NAME&gt;</i></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Explicitly sets the name of the crate being documented. Useful for overriding the default derived from the crate's root file.<br><br><b><b>--target</b> <i>&lt;TRIPLE&gt;</i></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Specifies the target triple (e.g., <code>x86_64-unknown-linux-gnu</code>) for which to build the documentation. This is important for cross-compilation scenarios.<br><br><b><b>--edition</b> <i>&lt;EDITION&gt;</i></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Sets the Rust edition (e.g., <code>2018</code>, <code>2021</code>) to use when compiling the crate and running doc tests.<br><br><b><b>--verbose</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Enables verbose output, showing more details about the documentation generation process, including warnings and build steps.<br><br><b><b>--markdown-css</b> <i>&lt;PATH&gt;</i></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Adds an additional CSS file to be used for styling the Markdown content in the generated documentation.<br><br>


title: DESCRIPTION
content:
<i>rustdoc</i> is the official documentation generator for the Rust programming language. It parses Rust source code files, specifically extracting content from special documentation comments (e.g., <code>///</code> for items, <code>//!</code> for modules/crates). These comments are written in Markdown, supporting rich text, code blocks, and links. <i>rustdoc</i> then renders this parsed information into a user-friendly format, most commonly HTML, providing a navigable website that details the API of a Rust crate, its modules, functions, structs, enums, traits, and more.<br><br>A key feature of <i>rustdoc</i> is its ability to run embedded code examples found within documentation comments as part of a "doc test" process. This ensures that the examples provided in the documentation are not only syntactically correct but also functionally accurate and up-to-date with the code, promoting high-quality, reliable documentation. While <i>rustdoc</i> can be invoked directly, it is most commonly used via the Rust package manager, <i>cargo</i>, through the <code>cargo doc</code> command, which simplifies its usage by handling dependency resolution and configuration automatically.


title: CAVEATS
content:
While <i>rustdoc</i> can be invoked directly, its full power and ease of use are typically realized when invoked via <code>cargo doc</code>, as <i>cargo</i> handles dependency resolution, compilation flags, and linking automatically. Direct invocation often requires manual management of dependencies and build flags, which can be complex for larger projects. <i>rustdoc</i> is tightly coupled with the Rust compiler and toolchain, meaning it requires a complete Rust installation to function.


title: INTEGRATION WITH CARGO
content:
The most common way to use <i>rustdoc</i> is through the <code>cargo doc</code> command provided by <i>cargo</i>, the Rust package manager. When you run <code>cargo doc</code> in a Rust project directory, <i>cargo</i> automatically finds the crate root, resolves dependencies, and passes the necessary arguments to <i>rustdoc</i>, simplifying the documentation generation process significantly. This seamless integration makes it easy to generate and view documentation for your projects and their dependencies.


title: DOC TESTS
content:
A powerful feature of <i>rustdoc</i> is its ability to execute code examples embedded within documentation comments. By enclosing Rust code within a fenced code block marked with <code>```rust</code>, these examples can be automatically compiled and run as part of your project's test suite when <i>rustdoc</i> is invoked with the <code>--test</code> flag (or when running <code>cargo test</code>). This ensures that documentation examples remain correct and functional as the codebase evolves, preventing outdated or broken examples.


title: MARKDOWN AND HTML CUSTOMIZATION
content:
Documentation comments in Rust are parsed as Markdown, allowing for rich formatting, headings, lists, links, and code blocks. <i>rustdoc</i> converts this Markdown into HTML. Furthermore, <i>rustdoc</i> provides options (e.g., <code>--html-in-header</code>, <code>--markdown-css</code>) to inject custom HTML or CSS, enabling developers to customize the appearance and behavior of their generated documentation to match project branding or specific requirements.


title: HISTORY
content:
<i>rustdoc</i> has been an integral component of the Rust programming language from its early stages, evolving alongside the language itself. Its development focused on providing high-quality, easily browsable HTML documentation directly from source code, with a strong emphasis on testable code examples. The 'doc test' feature, allowing code snippets in documentation to be compiled and run as tests, was a foundational design choice, promoting accurate and up-to-date documentation. This tight integration with the language and its tooling reflects Rust's broader philosophy of prioritizing developer experience and code quality.


title: SYNOPSIS
content:
<b>rustfmt</b> [<i>OPTIONS</i>] [<i>FILE_OR_DIR...</i>]<br><br>Common usage:<br><b>rustfmt</b> <i>main.rs</i><br><b>rustfmt</b> <i>src/</i><br><b>cargo fmt</b> (recommended for projects)


title: PARAMETERS
content:
<b>-h, --help</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Prints help information.<br><br><b>-V, --version</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Prints version information.<br><br><b>--check</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Checks if formatting is needed without writing changes. Exits with 0 if no changes, 1 if changes are needed.<br><br><b>--emit <files|stdout|diff></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Controls output. `files` (default) writes to files, `stdout` prints to standard output, `diff` prints a diff.<br><br><b>--edition <2015|2018|2021|2024></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Specify the Rust edition to format for.<br><br><b>--config-path <path></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Recursively searches for `rustfmt.toml` from this path.<br><br><b>--config <key=value></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Overrides specific configuration options inline.<br><br><b>--files-with-diff</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Prints the names of files that would be modified.<br><br><b>--files-without-diff</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Prints the names of files that would not be modified.<br><br><b>-v, --verbose</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Use verbose output.<br><br><b>-q, --quiet</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Suppress output.<br><br><b>--color <auto|always|never></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Controls colored output.<br><br>


title: DESCRIPTION
content:
<i><b>rustfmt</b></i> is a command-line tool designed to automatically format Rust source code files. It enforces a consistent and opinionated style, typically aligned with the official "Rust Style Guide," which helps improve code readability, maintainability, and reduces stylistic debates within development teams. By automatically applying a standard format, it ensures that all code in a project looks uniform, regardless of who wrote it. <i><b>rustfmt</b></i> can process individual files, entire directories, or integrate seamlessly into build systems and development workflows. It is a crucial tool for fostering collaboration and ensuring a high level of code quality in the Rust ecosystem. Its strong opinions on formatting aim to reduce cognitive load by making code predictable and familiar.


title: CAVEATS
content:
<i><b>rustfmt</b></i> can significantly change code layout, making careful `git diff` review recommended after initial application. It is opinionated; some stylistic choices are not configurable by design. Requires the Rust toolchain to be installed. Best used consistently across a project, typically via `cargo fmt` to ensure all team members adhere to the same style.


title: CONFIGURATION
content:
<i><b>rustfmt</b></i> can be configured using a `rustfmt.toml` file. This file is typically placed in the project root or a parent directory, and <i><b>rustfmt</b></i> will automatically discover it. While many core formatting rules are non-configurable by design to maintain consistency, the `rustfmt.toml` allows users to override a subset of default options to suit specific project needs.


title: INTEGRATION WITH CARGO
content:
The most common and recommended way to run <i><b>rustfmt</b></i> on a Rust project is through the <i><b>Cargo</b></i> build tool using the command `<b>cargo fmt</b>`. This command automatically identifies all Rust files within the current Cargo workspace (including crates, binaries, and tests) and formats them, simplifying the process for developers.


title: HISTORY
content:
<i><b>rustfmt</b></i> was developed as an official component of the Rust project's tooling. Its primary goal was to provide a standard, consistent code formatter to reduce stylistic bikeshedding, improve readability, and foster collaboration across the growing Rust ecosystem. It has been actively maintained and updated to align with new Rust language features and evolving community style preferences, becoming an integral part of the Rust development workflow.


title: SYNOPSIS
content:
<b>rustic</b> <I>command</I> [<I>options</I>] [<I>arguments</I>]<br><br>Common commands include:<br><b>rustic</b> <I>init</I> [<I>options</I>]<br><b>rustic</b> <I>check</I> [<I>options</I>]<br><b>rustic</b> <I>cat</I> <I>type</I> <I>id</I> [<I>options</I>]<br><b>rustic</b> <I>prune</I> [<I>options</I>]<br><b>rustic</b> <I>ls</I> [<I>options</I>]<br><b>rustic</b> <I>stats</I> [<I>options</I>]


title: PARAMETERS
content:
<b><b>--repo</b> <I>path</I></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Specifies the path to the repository, overriding environment variables.<br><br><b><b>--password-file</b> <I>file</I></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Reads the repository password from the specified file.<br><br><b><b>--password-command</b> <I>cmd</I></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Executes the specified command to get the repository password from its standard output.<br><br><b><b>--no-lock</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Disables repository locking. Use with extreme caution as it can lead to data corruption if multiple processes access the repository concurrently.<br><br><b><b>--json</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Outputs information in JSON format where applicable, suitable for programmatic parsing.<br><br><b><b>--log-level</b> <I>level</I></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Sets the logging verbosity. Possible levels include <i>error</i>, <i>warn</i>, <i>info</i>, <i>debug</i>, and <i>trace</i>.<br><br><b><b>--version</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Displays the program version and exits.<br><br><b><b>--help</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Shows a help message for the command or specified subcommand.<br><br>


title: DESCRIPTION
content:
<b>rustic</b> is a command-line utility written in Rust, designed to interact with repositories created by the <b>restic</b> backup program. It serves as an alternative backend implementation, offering <b>restic</b>-compatible functionality for managing backup data.<br><br>While <b>restic</b> handles the actual backup process (creating snapshots, saving files), <b>rustic</b> focuses on operations directly on the repository structure. This includes tasks such as initializing new repositories, listing contents, verifying data integrity, and performing maintenance tasks like pruning old snapshots.<br><br>Its development in Rust aims for memory safety and performance. It's often used by users who prefer a Rust-based toolchain or for specific use cases where its features align better. It emphasizes strong compatibility with the <b>restic</b> repository format, allowing users to interchangeably use <b>restic</b> and <b>rustic</b> for repository operations.


title: CAVEATS
content:
<b>rustic</b> is not a full replacement for <b>restic</b>; it specifically handles repository operations, not the local file system backup/restore process.<br><br>While aiming for <b>restic</b> compatibility, slight differences or new <b>restic</b> features might not be immediately supported by <b>rustic</b>.<br><br>Improper use of options like <b>--no-lock</b> can lead to repository corruption.


title: REPOSITORY FORMAT COMPATIBILITY
content:
<b>rustic</b> is designed to be fully compatible with the <b>restic</b> repository format. This means a repository initialized with <b>restic</b> can be managed by <b>rustic</b>, and vice-versa, allowing for flexible usage depending on user preference or specific needs.


title: ARCHITECTURAL FOCUS
content:
Unlike <b>restic</b>, <b>rustic</b> does not implement the client-side snapshotting logic (e.g., reading files from disk, creating new snapshots). Instead, its functionality is strictly focused on backend-side operations: storing, retrieving, and managing data chunks and metadata within the existing <b>restic</b> repository structure.


title: HISTORY
content:
<b>rustic</b> was developed as an independent project to provide a Rust-based implementation of <b>restic</b>'s backend logic. Its development began after <b>restic</b> gained popularity, with the goal of leveraging Rust's memory safety and performance guarantees. It fills a niche for users who prefer a Rust-native solution for repository maintenance, focusing on core compatibility and essential repository operations.


title: SYNOPSIS
content:
<b>rustscan</b> [<I>OPTIONS</I>] -a <I>TARGETS</I>|<I>FILE</I><br>Example: <b>rustscan</b> -a 192.168.1.1/24 --ulimit 5000 -p 1-65535 --nmap-args "-sC -sV"


title: PARAMETERS
content:
<b><b>-a</b>, <b>--targets</b> <I>TARGET</I>[,<I>TARGET</I>...]|<I>FILE</I></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Specifies the target hosts for scanning. Can be IP addresses, CIDR ranges, hostnames, or a path to a file containing targets (one per line).<br><br><b><b>-p</b>, <b>--ports</b> <I>PORTS</I></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Defines the ports to scan. Can be a comma-separated list (e.g., '80,443,8080'), a range (e.g., '1-1024'), or 'full' for all 65535 ports. 'top-ports' can also be used with '--top-ports'.<br><br><b><b>--ulimit</b> <I>NUMBER</I></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Sets the maximum number of concurrent connections (file descriptors) <i>rustscan</i> can open. A higher number means faster scans but consumes more system resources. Default is 5000.<br><br><b><b>--nmap-args</b> "<I>ARGS</I>"</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Allows passing additional arguments directly to the <i>nmap</i> command that <i>rustscan</i> invokes for deep scanning. Useful for specifying Nmap scripts (<i>-sC</i>), service version detection (<i>-sV</i>), etc.<br><br><b><b>--scan-order</b> <I>ORDER</I></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Determines the order in which targets are scanned. Options include 'random' (default) and 'sequential'.<br><br><b><b>--timeout</b> <I>MILLISECONDS</I></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Sets the connection timeout for each port probe in milliseconds. Default is 1500 (1.5 seconds).<br><br><b><b>--batch-size</b> <I>NUMBER</I></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Specifies how many IP addresses <i>rustscan</i> processes in a single batch before potentially handing them over to Nmap. Default is 10000.<br><br><b><b>--no-nmap</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Prevents <i>rustscan</i> from invoking <i>nmap</i> after identifying open ports. It will only output the discovered open ports.<br><br><b><b>--config</b> <I>PATH</I></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Specifies a path to a TOML configuration file to load default settings and Nmap arguments.<br><br><b><b>--top-ports</b> <I>NUMBER</I></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Scans the N most common ports as defined by <i>nmap</i>'s top-ports list. Can be used in conjunction with <b>-p</b>.<br><br><b><b>-v</b>, <b>--verbose</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Increases the verbosity level of <i>rustscan</i>'s output, showing more details about the scan process.<br><br><b><b>-q</b>, <b>--quiet</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Suppresses all output except for the final results, providing a clean and concise summary.<br><br>


title: DESCRIPTION
content:
<i>rustscan</i> is a modern, extremely fast port scanner written in Rust. It aims to improve upon traditional scanners like <i>nmap</i> by focusing on speed, especially when scanning a large number of hosts for open ports. It achieves this speed by using an asynchronous I/O model and intelligently piping its results directly into <i>nmap</i> for deeper, more comprehensive scanning of open ports. This unique workflow allows users to quickly identify open ports across a vast network, then leverage <i>nmap</i>'s powerful script engine and service detection capabilities only on the ports that are actually open, significantly reducing overall scan time. It's a popular tool in penetration testing, vulnerability assessment, and network discovery workflows.


title: CAVEATS
content:
For its full capabilities, <i>rustscan</i> requires <i>nmap</i> to be installed on the system (unless <b>--no-nmap</b> is used).<br>Using a very high <b>--ulimit</b> can consume significant system resources and may be detected by Intrusion Detection/Prevention Systems (IDS/IPS) due to the large number of simultaneous connections.<br>While fast, the accuracy of open port detection can still be influenced by network latency, firewalls, and target responsiveness.


title: PERFORMANCE OPTIMIZATION
content:
<i>rustscan</i>'s core strength is its speed. This is achieved through asynchronous I/O and the configurable <b>--ulimit</b> parameter. Users can fine-tune this value along with <b>--batch-size</b> to balance scan speed with system resource usage and network impact. Experimentation is often needed to find the optimal settings for a given network environment.


title: SEAMLESS NMAP INTEGRATION
content:
The ability to pass arguments directly to <i>nmap</i> using <b>--nmap-args</b> is a powerful feature. This allows users to leverage <i>nmap</i>'s extensive capabilities, such as service version detection (<i>-sV</i>), OS detection (<i>-O</i>), and script execution (<i>-sC</i> or <i>--script</i>), only on the ports identified as open by <i>rustscan</i>. This significantly reduces the overall scan time for comprehensive network assessments.


title: CONFIGURATION FILE SUPPORT
content:
<i>rustscan</i> supports loading default settings and Nmap arguments from a TOML configuration file (specified with <b>--config</b>). This is highly useful for creating reusable scan profiles, ensuring consistent scan parameters across multiple engagements, and simplifying complex Nmap argument setups.


title: HISTORY
content:
<i>rustscan</i> was developed by Brandon Randall (RustProofLabs) and first publicly released around late 2019/early 2020. It rapidly gained popularity within the cybersecurity community for its innovative approach to combining extreme scanning speed with the deep analysis capabilities of <i>nmap</i>. Its development in the Rust programming language is a key factor in its performance, offering memory safety and high concurrency, which are crucial for network scanning applications.


title: PARAMETERS
content:
<b>-h, --help</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Prints help information for the main command or a specified subcommand.<br><br><b>--version</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Prints rustup's version information.<br><br><b>-v, --verbose</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Use verbose output. May be specified multiple times for more verbosity.<br><br><b>-q, --quiet</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Silence all output. Overrides --verbose.<br><br><b>--color <WHEN></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Controls coloring of output. <WHEN> can be 'auto', 'always', or 'never'.<br><br>


title: DESCRIPTION
content:
The <b>rustup</b> command is the official Rust toolchain installer and manager. It simplifies the process of installing Rust programming language, managing multiple Rust toolchains (e.g., stable, beta, nightly), and adding various components like `rust-src`, `rustfmt`, `clippy`, and different compilation targets. <br><br>It allows developers to easily switch between different Rust versions, which is crucial for testing compatibility, working on legacy projects, or utilizing experimental features. rustup also handles updates to the Rust toolchain, ensuring that users can keep their development environment current with minimal effort. By providing a unified way to manage Rust, it significantly enhances the developer experience, making Rust adoption and ongoing development much smoother.


title: CAVEATS
content:
<b>rustup</b> requires an active internet connection for initial installation and updates, as it downloads toolchains and components from the internet. <br><br>While it manages toolchains effectively, it doesn't manage system-wide dependencies that Rust projects might need (e.g., OpenSSL, pkg-config). <br><br>Disk space can be a concern if many toolchains and targets are installed, as each can consume significant storage. <br><br>Cross-compilation setup, while aided by target installation, still requires understanding of environment variables and linker configurations.


title: KEY SUBCOMMANDS
content:
<b>rustup</b>'s primary functionality is accessed via its subcommands. Here are some of the most frequently used:<br><br><b>update</b> [<i>TOOLCHAIN</i>]: Updates installed toolchains. If no toolchain is specified, all installed toolchains are updated.<br><br><b>install</b> <<i>TOOLCHAIN</i>>: Installs a specific toolchain (e.g., `stable`, `beta`, `nightly`).<br><br><b>default</b> <<i>TOOLCHAIN</i>>: Sets the default toolchain to use when no specific toolchain is active.<br><br><b>run</b> <<i>TOOLCHAIN</i>> <<i>COMMAND</i>> [<i>ARGS</i>...]: Executes a command with a specific toolchain. Useful for testing against different Rust versions.<br><br><b>toolchain</b> [<i>SUBCOMMAND</i>]: Manages installed toolchains (list, install, link, remove).<br><br><b>component</b> [<i>SUBCOMMAND</i>]: Manages installed components (add, remove, list). Examples include `rust-src`, `rustfmt`, `clippy`.<br><br><b>target</b> [<i>SUBCOMMAND</i>]: Manages installed compilation targets (add, remove, list). Essential for cross-compilation.<br><br><b>show</b>: Shows the active and installed toolchains, along with their components and targets.<br><br><b>override</b> [<i>set</i>|<i>unset</i>|<i>list</i>]: Manages directory-specific toolchain overrides, allowing different projects to use different Rust versions automatically.


title: TOOLCHAIN OVERRIDES
content:
One of <b>rustup</b>'s powerful features is its ability to set directory-specific toolchain overrides. This means you can have multiple Rust projects on your system, each configured to use a different Rust toolchain version. When you navigate into a project directory, <b>rustup</b> automatically switches to the configured toolchain for that directory, ensuring consistent builds and dependencies without manual switching. This is typically managed using `rustup override set <toolchain>` within a project directory.


title: HISTORY
content:
Initially, installing Rust involved directly downloading and running shell scripts. As Rust gained popularity and evolved rapidly, managing different versions and components became cumbersome. The <b>rustup</b> project was created to address this, becoming the official and recommended way to install and manage Rust toolchains around 2016-2017. Its development significantly streamlined the Rust ecosystem, making it easier for new users to get started and for experienced developers to manage complex project requirements across different Rust versions.


title: PARAMETERS
content:
<b><shell></b><br>&nbsp;&nbsp;&nbsp;&nbsp;The name of the target shell for which to generate completion scripts. Possible values include: <br><b>bash</b>: Generates completions for the <i>Bash</i> shell.<br><b>zsh</b>: Generates completions for the <i>Zsh</i> shell.<br><b>fish</b>: Generates completions for the <i>Fish</i> shell.<br><b>powershell</b>: Generates completions for <i>PowerShell</i>.<br><br>


title: DESCRIPTION
content:
<i>rustup-completions</i> is a subcommand of <b>rustup</b>, the Rust toolchain installer and manager. Its primary function is to generate shell completion scripts that enhance the command-line experience for users of <i>rustup</i>. By providing these scripts, users can benefit from tab-completion for <i>rustup</i> commands, subcommands, options, and arguments, significantly improving productivity and reducing typing errors. <br><br>The command typically prints the generated script to standard output (<i>stdout</i>), which can then be directly sourced by the user's shell or saved to a designated completions directory. It supports popular shells like Bash, Zsh, Fish, and PowerShell, making <i>rustup</i> more user-friendly across various environments.


title: CAVEATS
content:
Users must manually configure their shell to source the output of <i>rustup-completions</i> for the completions to take effect. The exact method varies by shell, typically involving adding a line to the shell's configuration file (e.g., <i>.bashrc</i>, <i>.zshrc</i>, <i>config.fish</i>) or placing the generated script in a specific directory. <br><br>These completions are specifically for the <b>rustup</b> command itself and its direct subcommands, not for <i>cargo</i> or <i>rustc</i> directly (though <i>rustup</i> manages their installation).


title: INSTALLATION FOR BASH
content:
To enable Bash completions, add the following line to your <i>~/.bashrc</i> file:<br><code><i>eval "$(rustup-completions bash)"</i></code><br>After saving, reload your shell (e.g., <i>source ~/.bashrc</i>).


title: INSTALLATION FOR ZSH
content:
To enable Zsh completions, add the following to your <i>~/.zshrc</i> file (adjusting paths as necessary):<br><code><i>fpath=(~/.zsh/completion $fpath)</i></code><br><code><i>autoload -Uz compinit && compinit</i></code><br><code><i>rustup-completions zsh > ~/.zsh/completion/_rustup</i></code><br>Then reload your Zsh shell (e.g., <i>source ~/.zshrc</i>) or open a new terminal.


title: INSTALLATION FOR FISH
content:
To enable Fish completions, run the following command:<br><code><i>rustup-completions fish > ~/.config/fish/completions/rustup.fish</i></code><br>Then restart your Fish shell or open a new terminal.


title: HISTORY
content:
Shell completions are a standard and highly valued feature in modern command-line interface (CLI) tools, significantly enhancing usability. As <b>rustup</b> evolved into the de facto tool for managing Rust toolchains, integrating robust completion support became a natural progression. <i>rustup-completions</i> was developed and included as part of the <i>rustup</i> utility to provide this essential functionality, making the <i>rustup</i> ecosystem more accessible and efficient for developers.


title: SYNOPSIS
content:
<b>rustup</b> <b>component</b> <i>&lt;subcommand&gt;</i> [<i>options</i>]<br><b>rustup</b> <b>component</b> <b>add</b> <i>&lt;component&gt;</i> [<b>--toolchain</b> <i>&lt;toolchain&gt;</i>]<br><b>rustup</b> <b>component</b> <b>remove</b> <i>&lt;component&gt;</i> [<b>--toolchain</b> <i>&lt;toolchain&gt;</i>]<br><b>rustup</b> <b>component</b> <b>list</b> [<b>--toolchain</b> <i>&lt;toolchain&gt;</i>] [<b>--installed</b>]


title: PARAMETERS
content:
<b>add</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Installs a specific component to the active or specified toolchain.<br><br><b>remove</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Uninstalls a specific component from the active or specified toolchain.<br><br><b>list</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Lists all available components or those installed for a toolchain. By default, it shows all available components.<br><br><b>&lt;component&gt;</b><br>&nbsp;&nbsp;&nbsp;&nbsp;The exact name of the component to add or remove (e.g., <i>rustc</i>, <i>cargo</i>, <i>rust-docs</i>, <i>clippy</i>, <i>rustfmt</i>, <i>rust-analyzer</i>, <i>llvm-tools-preview</i>). These names are case-sensitive.<br><br><b>--toolchain &lt;toolchain&gt;</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Specifies the toolchain (e.g., <i>stable</i>, <i>beta</i>, <i>nightly-x86_64-unknown-linux-gnu</i>) to which the operation should apply. If omitted, the default toolchain is used.<br><br><b>--installed</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Used exclusively with the 'list' subcommand, this flag filters the output to show only the components that are currently installed for the specified (or default) toolchain.<br><br>


title: DESCRIPTION
content:
The <b>rustup-component</b> command is a crucial subcommand of <b>rustup</b>, the official Rust toolchain installer. It provides fine-grained control over the individual pieces that make up a Rust development environment.<br><br>Users can leverage <b>rustup component</b> to <b>add</b>, <b>remove</b>, or <b>list</b> specific components (such as <b>rustc</b>, <b>cargo</b>, <b>rust-std</b>, <b>rust-docs</b>, <b>clippy</b>, <b>rustfmt</b>, or <b>rust-analyzer</b>) for any installed Rust toolchain. This modularity is vital for managing disk space, tailoring a Rust installation to specific development needs, or ensuring particular tools are available for a given Rust version or target platform.<br><br>It enables developers to maintain a lean installation or a full-featured one, depending on their project requirements.


title: CAVEATS
content:
<ul><li>Requires <b>rustup</b> to be installed and properly configured on your system.</li><li>Operations are specific to a single toolchain. Components installed for one toolchain (e.g., <i>stable</i>) are not automatically available for others (e.g., <i>nightly</i>).</li><li>Some core components like <b>rustc</b> and <b>cargo</b> are fundamental to a toolchain's operation and might be installed by default or even be non-removable.</li><li>The availability of certain components can vary by toolchain release channel (stable, beta, nightly) and target triplet (e.g., <i>x86_64-unknown-linux-gnu</i>).</li></ul>


title: WHAT IS A RUST COMPONENT?
content:
In the context of <b>rustup</b>, a 'component' refers to a discrete, installable part of the Rust toolchain. These components are designed to be managed independently, allowing users to pick and choose which parts of the Rust development environment they need. Common examples include:<br><ul><li><b>rustc</b>: The Rust compiler.</li><li><b>cargo</b>: The Rust package manager and build tool.</li><li><b>rust-std</b>: The standard library for a specific target architecture.</li><li><b>rust-docs</b>: Offline copies of the official Rust documentation.</li><li><b>clippy</b>: A collection of lints to catch common mistakes and improve your Rust code.</li><li><b>rustfmt</b>: A tool for automatically formatting Rust code according to community style guidelines.</li><li><b>rust-analyzer</b>: The Language Server Protocol (LSP) server for Rust, often used by IDEs for features like code completion, go-to-definition, and refactoring.</li><li><b>llvm-tools-preview</b>: A collection of LLVM tools, sometimes required for advanced Rust development.</li></ul>


title: HISTORY
content:
The modular concept of managing Rust toolchain components was integral to <b>rustup</b> from its early development. As the Rust ecosystem expanded and new tools emerged (like <b>clippy</b>, <b>rustfmt</b>, and <b>rust-analyzer</b>), the <b>rustup component</b> command became increasingly vital. It empowered users to customize their Rust installations, optimizing disk space and ensuring that only the necessary development tools were present for their specific projects and toolchain versions. This design choice reflects Rust's commitment to flexibility and user control over their development environment.


title: SYNOPSIS
content:
<b>rustup default</b><br><b>rustup default</b> <i>&lt;toolchain&gt;</i><br><b>rustup default</b> <i>--help</i>


title: PARAMETERS
content:
<b><i>&lt;toolchain&gt;</i></b><br>&nbsp;&nbsp;&nbsp;&nbsp;The name of the Rust toolchain to set as the new global default. This can be <b>stable</b>, <b>beta</b>, <b>nightly</b>, or a specific version (e.g., <b>1.70.0</b>). The toolchain must already be installed or <b>rustup</b> will attempt to install it.<br><br><b><i>--help</i></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Displays help information for the <b>rustup default</b> command.<br><br>


title: DESCRIPTION
content:
<b>rustup default</b> is a subcommand of the <b>rustup</b> toolchain manager for Rust. Its primary function is to either display the currently active global default Rust toolchain or to set a new one.<br><br>When invoked without arguments, it shows which toolchain (e.g., stable, beta, nightly, or a specific version) is configured as the system-wide default. This toolchain will be used for Rust projects unless overridden by a project-specific configuration set via <b>rustup override</b>.<br><br>By specifying a toolchain name as an argument (e.g., <b>rustup default stable</b> or <b>rustup default nightly</b>), users can easily switch the default Rust compiler, standard library, and other associated tools. This is crucial for developers working on multiple projects or needing to test against different Rust versions. It ensures consistency across projects that don't have explicit overrides.


title: CAVEATS
content:
The global default set by <b>rustup default</b> can be overridden by project-specific toolchain settings configured with <b>rustup override set</b>.<br>If the specified toolchain is not already installed, <b>rustup</b> will attempt to download and install it, requiring an active internet connection.<br>Ensure your <b>PATH</b> is correctly configured to include <b>rustup</b>'s <b>bin</b> directory for commands to be accessible.


title: TOOLCHAIN SPECIFICATION
content:
A <i>&lt;toolchain&gt;</i> argument typically refers to a release channel (<b>stable</b>, <b>beta</b>, <b>nightly</b>) or a specific version (e.g., <b>1.70.0</b>, <b>1.70.0-x86_64-unknown-linux-gnu</b>). It can also refer to custom-installed toolchains.


title: INTERACTION WITH OVERRIDES
content:
While <b>rustup default</b> sets the global toolchain, local projects can specify their own toolchain using <b>rustup override set</b>. When <b>rustup</b> is invoked within such a project, the override takes precedence over the global default. To revert to the default, use <b>rustup override unset</b>.


title: HISTORY
content:
<b>rustup</b> was introduced to provide a robust and user-friendly way to manage Rust toolchains, addressing the need for developers to easily switch between stable, beta, and nightly releases, as well as specific versions. The <b>rustup default</b> command is fundamental to this system, allowing users to establish a primary, system-wide Rust environment. Its development was driven by the Rust project's rapid release cycle and the need for flexible toolchain management.


title: PARAMETERS
content:
<b>-h, --help</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Show help message and exit.<br><br><b>--host <host></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Specifies the target host triple (e.g., <i>x86_64-unknown-linux-gnu</i>) for which to open documentation.<br><br><b>--toolchain <toolchain></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Selects the specific toolchain (e.g., <i>stable</i>, <i>nightly</i>, <i>1.60.0</i>) whose documentation should be opened.<br><br><b>-V, --version</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Print version information and exit.<br><br><b>[path]</b><br>&nbsp;&nbsp;&nbsp;&nbsp;An optional argument to open a specific part of the documentation (e.g., <i>std</i>, <i>cargo</i>, <i>std::collections::HashMap</i>). If omitted, the main documentation index is opened.<br><br>


title: DESCRIPTION
content:
The <b>rustup-doc</b> command, part of the <b>rustup</b> toolchain installer, provides a convenient way to access the Rust programming language's official documentation locally on your system. When executed, it automatically opens the installed documentation in your default web browser, allowing for quick, offline access to the standard library, Cargo, and other essential Rust components' APIs. This eliminates the need for an internet connection to consult documentation, making it an indispensable tool for Rust developers. It is crucial for the <i>rust-docs</i> component to be installed for the command to function correctly.


title: CAVEATS
content:
The <i>rust-docs</i> component must be installed for the target toolchain using <b>rustup component add rust-docs</b>.<br>A web browser configured for your system is required to open the documentation.<br>Some distributions might require specific browser configuration or environment variables (like <i>BROWSER</i>) for this command to function correctly.


title: INSTALLATION REQUIREMENT
content:
For <b>rustup-doc</b> to function, the documentation component must be added to your installed toolchain. This can be done via: <br><b>rustup component add rust-docs</b>


title: USAGE EXAMPLES
content:
Open the main documentation index: <br><b>rustup doc</b><br><br>Open documentation for a specific module: <br><b>rustup doc std::collections</b><br><br>Open Cargo documentation: <br><b>rustup doc cargo</b><br><br>Open documentation for a specific toolchain (e.g., nightly): <br><b>rustup doc --toolchain nightly</b>


title: HISTORY
content:
The <b>rustup</b> tool, which includes <b>rustup-doc</b>, was created to simplify the management of Rust toolchains and components. It addressed challenges in installing and updating Rust versions, ensuring developers always have access to the correct compiler, standard library, and, crucially, its documentation. <b>rustup-doc</b> provides an invaluable service for developers, enabling quick, offline access to the extensive Rust API documentation, which is vital for productivity and learning.


title: PARAMETERS
content:
<b><I>COMMAND</I></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Specifies the <i>rustup</i> subcommand for which to display detailed help information. If omitted, general help for <i>rustup</i> itself is shown.<br><br><b><b>-h</b>, <b>--help</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Displays help information for the <i>rustup-help</i> command itself, showing its own usage and options.<br><br>


title: DESCRIPTION
content:
<i>rustup-help</i> is an internal command that powers the user-facing <i>rustup help</i> utility. Its primary function is to provide on-demand documentation and usage information for the <i>rustup</i> command and its various subcommands. When invoked as <i>rustup help</i>, it displays a general overview of <i>rustup</i>, listing all available subcommands and common options.<br><br>By specifying a subcommand, such as <i>rustup help update</i> or <i>rustup help toolchain</i>, <i>rustup-help</i> provides detailed syntax, options, and descriptions specific to that particular subcommand. This makes it an indispensable tool for users to quickly understand <i>rustup</i>'s capabilities and how to effectively manage their Rust toolchains, components, and targets directly from the command line.


title: CAVEATS
content:
Users typically interact with <i>rustup-help</i> indirectly via the <i>rustup help</i> command. Directly executing the <i>rustup-help</i> binary (if it's even globally accessible) is not the standard or recommended method.<br><br>The content displayed by <i>rustup-help</i> is dynamic and reflects the specific version and configuration of <i>rustup</i> installed on the system, which may differ from online documentation or other versions.


title: USAGE CONTEXT
content:
While <i>rustup-help</i> is the underlying executable, users interact with it via <b>rustup help</b>. This command-line pattern is common in toolchain managers where a main executable dispatches to internal helper commands.


title: DISTINCTION FROM MAN PAGES
content:
Unlike traditional <i>man</i> pages which offer static, comprehensive documentation often installed separately, <i>rustup help</i> provides concise, integrated, and often more up-to-date help directly from the installed <i>rustup</i> binary. It is designed for quick reference within the terminal.


title: HISTORY
content:
<i>rustup</i>, and consequently its integrated help functionality, emerged from the need for a robust and user-friendly toolchain management system for the Rust programming language. The <i>help</i> subcommand has been a core component of <i>rustup</i> since its inception, evolving alongside the main tool to ensure users can easily discover and understand new features and commands. Its development is part of the larger open-source <i>rustup</i> project, maintained by the Rust community.


title: SYNOPSIS
content:
<i><a href="https://sh.rustup.rs">sh.rustup.rs</a></i> | <b>sh</b> [<i>OPTIONS</i>]<br>or<br><b>rustup-init.sh</b> [<i>OPTIONS</i>]


title: PARAMETERS
content:
<b><b>--default-toolchain</b> <i>&lt;toolchain&gt;</i></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Sets the default toolchain to be installed and used. Examples: <i>stable</i>, <i>beta</i>, <i>nightly</i>, <i>1.70.0</i>.<br><br><b><b>--profile</b> <i>&lt;profile&gt;</i></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Specifies the installation profile. Options include: <i>minimal</i> (just rustc and cargo), <i>default</i> (common components), and <i>complete</i> (all components like clippy, rustfmt, etc.).<br><br><b><b>--no-modify-path</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Prevents rustup from modifying the system's PATH environment variable. Users will need to manually add `~/.cargo/bin` to their PATH.<br><br><b><b>--target</b> <i>&lt;target-triple&gt;</i></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Installs the standard library for a specific target triple (e.g., <i>x86_64-unknown-linux-gnu</i> for Linux, <i>x86_64-apple-darwin</i> for macOS). Multiple targets can be specified by repeating this option.<br><br><b><b>--no-host</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Prevents installation of the host platform's standard library. Useful when only cross-compilation targets are needed.<br><br><b><b>--verbose</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Enables verbose output during the installation process, showing more details about what rustup is doing.<br><br><b><b>--quiet</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Suppresses most output messages, showing only critical information or prompts.<br><br><b><b>--force</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Forces the installation even if rustup is already installed, overwriting existing files.<br><br><b><b>--help</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Displays a help message with available options for <b>rustup-init.sh</b>.<br><br>


title: DESCRIPTION
content:
The term <b>rustup-install</b> typically refers to the internal script or process that performs the initial installation of the Rust toolchain, including the Rust compiler (rustc), Cargo (Rust's package manager), and rustup itself. It is usually invoked by the user-facing `rustup-init.sh` script, which is the primary method for users to install Rust. Users do not generally run `rustup-install` directly.<br><br><b>rustup</b> is the official installer and version manager for Rust. It allows developers to manage multiple Rust toolchains, switch between them, and update them easily. This includes stable, beta, and nightly releases, as well as specific versions and custom builds. The installation process typically involves downloading the `rustup-init.sh` script (often via `curl | sh`), which then fetches and executes the necessary components, including the internal `rustup-install` logic, to set up the Rust environment on your system. It also manages the PATH environment variable to make `rustc`, `cargo`, and `rustup` available in the terminal.


title: CAVEATS
content:
<b>rustup-install</b> is an internal component of the <b>rustup</b> installation process; it is not intended for direct user invocation. Users should use <b>rustup-init.sh</b>.<br><br>The installation requires an active internet connection to download toolchain components. Disk space requirements vary based on the selected profile and installed targets.<br><br>Modifying the PATH environment variable requires appropriate shell configuration (e.g., `~/.bashrc`, `~/.zshrc`). Rustup attempts to do this automatically, but manual intervention might be necessary depending on the shell and system setup.


title: ENVIRONMENT VARIABLES
content:
<b>RUSTUP_HOME</b>: Specifies the directory where rustup stores toolchains and data. Defaults to `~/.rustup`.<br><b>CARGO_HOME</b>: Specifies the directory for Cargo's global cache and binaries. Defaults to `~/.cargo`.<br><b>RUSTUP_TOOLCHAIN</b>: Can be used to override the active toolchain for a specific shell session or directory.


title: POST-INSTALLATION STEPS
content:
After installation, it's common to run `source $CARGO_HOME/env` (or `source ~/.cargo/env`) in your current shell or add it to your shell's configuration file (e.g., `~/.bashrc`, `~/.zshrc`) to ensure `rustc`, `cargo`, and `rustup` are in your PATH. The installer typically prompts to do this automatically upon completion.


title: HISTORY
content:
<b>rustup</b> was created to provide a robust and flexible way to install and manage Rust toolchains, addressing the need for easy switching between stable, beta, and nightly releases, as well as managing components like `rustfmt` and `clippy`. It was initially developed by Brian Anderson and has become the de facto standard for Rust installation since its early days, evolving significantly over time to improve reliability, performance, and user experience.


title: PARAMETERS
content:
<b><I>tool</I></b><br>&nbsp;&nbsp;&nbsp;&nbsp;<i>Mandatory</i>. The specific Rust tool for which to display the manual page, e.g., <b>rustc</b>, <b>cargo</b>, or <b>rustdoc</b>.<br><br>


title: DESCRIPTION
content:
`rustup-man` is a handy subcommand of `<b>rustup</b>` that provides seamless access to the manual pages (man pages) for components of the Rust toolchain installed via `rustup`. It allows developers to quickly view official documentation for command-line tools like `<b>rustc</b>`, `<b>cargo</b>`, and `<b>rustdoc</b>` directly from their terminal. This eliminates the need to manually locate man page files or configure system `MANPATH` variables. `rustup-man` intelligently identifies the correct man page for the requested tool based on the currently active Rust toolchain, presenting comprehensive details on tool options, usage, and examples. It serves as a crucial resource for understanding the intricate functionalities of Rust's command-line ecosystem, greatly enhancing developer productivity and learning.


title: CAVEATS
content:
Man pages are typically installed as part of the `<b>rust-docs</b>` component. If this component is not installed, `rustup-man` will not be able to find and display the documentation. Use `<b>rustup component add rust-docs</b>` to install it if needed.<br>Requires a `<b>man</b>` pager (like `less`) to be available and configured on your system to display the output.<br>Only provides documentation for official Rust toolchain components, not arbitrary system commands or third-party crates.


title: AUTOMATIC MANPATH HANDLING
content:
`<b>rustup-man</b>` cleverly handles the `MANPATH` environment variable internally. This means users don't typically need to modify their system's `MANPATH` settings to ensure the Rust toolchain man pages are found. It automatically points to the correct man page directory for the currently active `<b>rustup</b>` toolchain.


title: HISTORY
content:
`<b>rustup</b>`, the official Rust toolchain installer, was initially created by Brian Anderson in 2016 to streamline the management of Rust versions and components. The `<b>man</b>` subcommand was integrated as part of `rustup`'s ongoing development, reflecting the project's commitment to providing comprehensive and easily accessible documentation for its users. Its inclusion reinforces the command-line centric nature of Rust development, ensuring that official toolchain documentation is always just a simple command away.


title: SYNOPSIS
content:
<I>rustup</I> override <B>set</B> <I>&lt;toolchain&gt;</I><br><I>rustup</I> override <B>unset</B> [<I>&lt;path&gt;</I>]<br><I>rustup</I> override <B>list</B>


title: PARAMETERS
content:
<b>set <toolchain></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Sets the active toolchain for the current directory or specified path. <B>&lt;toolchain&gt;</B> can be a channel name (e.g., 'stable', 'beta', 'nightly'), a specific version (e.g., '1.60.0'), or a custom toolchain.<br><br><b>unset [<path>]</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Removes the toolchain override for the current directory or a specified path. If <B>&lt;path&gt;</B> is not provided, the override for the current directory is removed.<br><br><b>list</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Lists all active toolchain overrides, showing the directory and the associated toolchain.<br><br>


title: DESCRIPTION
content:
The <I>rustup-override</I> command is a subcommand of <I>rustup</I>, the official Rust toolchain installer and manager. It is used to manage per-directory toolchain overrides, allowing developers to specify a particular Rust toolchain (e.g., <B>stable</B>, <B>beta</B>, <B>nightly</B>, or a specific version like <B>1.60.0</B>) that should be used when working within a specific directory and its subdirectories. This is incredibly useful for projects that require different Rust versions or build configurations, preventing conflicts and ensuring consistency. When an override is set, <I>rustup</I> creates a <B>.rustup-toolchain</B> file in the specified directory, containing the name of the overridden toolchain. When <I>rustup</I> is invoked (e.g., through <I>rustc</I>, <I>cargo</I>) within that directory, it reads this file and uses the specified toolchain instead of the globally active one or the one set via the <B>RUSTUP_TOOLCHAIN</B> environment variable. This enables seamless switching between project-specific Rust environments without manual configuration changes.


title: CAVEATS
content:
<I>rustup</I> toolchain overrides are set per directory and affect all subdirectories within that hierarchy. The override is established by creating a <B>.rustup-toolchain</B> file in the specified directory. This local override takes precedence over the globally active toolchain and any toolchain specified via the <B>RUSTUP_TOOLCHAIN</B> environment variable. Be aware that deleting this file or moving the directory will naturally remove or bypass the override.


title: HOW OVERRIDES WORK
content:
When <B>rustup override set</B> is executed, a hidden file named <B>.rustup-toolchain</B> is created in the current directory (or the specified path). This file simply contains the name of the toolchain to be used (e.g., 'nightly' or 'stable-x86_64-unknown-linux-gnu'). When <I>cargo</I> or <I>rustc</I> are invoked within this directory or any of its subdirectories, <I>rustup</I> automatically detects and uses the toolchain specified in this file.


title: TOOLCHAIN RESOLUTION PRECEDENCE
content:
Rustup resolves which toolchain to use based on the following hierarchy, from highest to lowest precedence:<br><br>1. <B>Directory Overrides</B>: The toolchain specified by <B>.rustup-toolchain</B> in the current directory or an ancestor.<br>2. <B>Environment Variable</B>: The toolchain specified by the <B>RUSTUP_TOOLCHAIN</B> environment variable.<br>3. <B>Default Toolchain</B>: The globally configured default toolchain (set via <I>rustup default</I>).


title: HISTORY
content:
The <I>rustup-override</I> command is an integral part of the <I>rustup</I> toolchain manager, which was developed to address the growing complexity of managing Rust toolchains across various platforms and release channels (stable, beta, nightly). As Rust's ecosystem matured and projects began to rely on specific compiler versions or features, the need for per-project toolchain isolation became evident. <I>rustup-override</I> was introduced to provide a robust and easy-to-use mechanism for developers to pin specific toolchains to individual project directories, significantly enhancing workflow flexibility and reproducibility for Rust developers.


title: PARAMETERS
content:
<b><toolchain></b><br>&nbsp;&nbsp;&nbsp;&nbsp;The name of the Rust toolchain to use for executing the command. This can be a channel (e.g., <i>stable</i>, <i>beta</i>, <i>nightly</i>), a specific version (e.g., <i>1.70.0</i>), or a custom toolchain. It can also be specified using the <i>--toolchain</i> option.<br><br><b><command>...</b><br>&nbsp;&nbsp;&nbsp;&nbsp;The command to be executed, followed by any arguments or options it requires. This command will run in the environment configured by the specified toolchain.<br><br><b>--toolchain <toolchain></b><br>&nbsp;&nbsp;&nbsp;&nbsp;An alternative way to specify the toolchain name. This is equivalent to providing the toolchain as a positional argument.<br><br><b>--host <host></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Specifies the host triple to use when running the command (e.g., <i>x86_64-unknown-linux-gnu</i>).<br><br><b>--target <target></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Specifies the target triple for cross-compilation (e.g., <i>armv7-unknown-linux-gnueabihf</i>). This ensures that the command uses the correct toolchain components for the specified target.<br><br><b>--path <path></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Adds an additional directory to the <i>PATH</i> environment variable for the duration of the command's execution. This can be useful for including custom binaries or scripts.<br><br><b>-h, --help</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Displays a help message for the <i>rustup-run</i> command.<br><br>


title: DESCRIPTION
content:
<i><b>rustup-run</b></i> is a subcommand of <i><b>rustup</b></i>, the official Rust toolchain installer and manager. Its primary purpose is to execute a given command within the context of a specific Rust toolchain. This allows developers to work with multiple Rust versions on the same system without conflicts, ensuring that a project compiles and runs against a precise Rust version (e.g., <i>stable</i>, <i>beta</i>, <i>nightly</i>, or a specific historical version like <i>1.70.0</i>).<br><br>When <i><b>rustup-run</b></i> is invoked, it temporarily modifies the environment variables, most notably the <i>PATH</i>, to point to the binaries (like <i>rustc</i>, <i>cargo</i>, <i>rustdoc</i>) of the specified toolchain. This creates an isolated environment for the command, preventing it from using the globally set or default Rust toolchain, which is crucial for testing compatibility across different Rust versions, managing project-specific toolchain requirements, or utilizing experimental features only available in certain toolchains.


title: CAVEATS
content:
<i><b>rustup-run</b></i> is not a standalone executable; it must be invoked as a subcommand of <i><b>rustup</b></i> (i.e., <i>rustup run ...</i>).<br><br>The specified toolchain must be installed locally using <i><b>rustup install</b></i> for <i><b>rustup-run</b></i> to function correctly. If the toolchain is not found, an error will occur.<br><br>The command temporarily alters environment variables (like <i>PATH</i>) for the child process. These changes are isolated to the command's execution and do not affect the parent shell's environment.


title: ENVIRONMENT VARIABLES
content:
<i><b>rustup-run</b></i> manipulates several environment variables to establish the correct execution context for the specified command:<br><i><b>PATH</b></i>: Prepends the bin directory of the selected toolchain to the <i>PATH</i>, ensuring that <i>rustc</i>, <i>cargo</i>, and other Rust tools from that toolchain are found first.<br><i><b>RUSTUP_TOOLCHAIN</b></i>: Set to the name of the toolchain currently being used by <i><b>rustup-run</b></i>. This can be useful for debugging or within scripts.<br><i><b>RUSTUP_HOME</b></i>: Points to the directory where <i><b>rustup</b></i> stores its data (e.g., installed toolchains, configurations).<br><i><b>RUSTUP_DIST_SERVER</b></i>: Specifies the URL of the distribution server from which <i><b>rustup</b></i> fetches toolchain components.


title: TOOLCHAIN RESOLUTION
content:
<i><b>rustup-run</b></i> resolves the target toolchain based on the provided argument in a specific order:<br>A direct toolchain name (e.g., <i>nightly</i>, <i>stable</i>, <i>1.70.0</i>).<br>If a specific toolchain is not explicitly provided, <i><b>rustup</b></i> will look for a <i>rust-toolchain.toml</i> or <i>rust-toolchain</i> file in the current directory or parent directories. This file can specify the required toolchain version for the project.<br>If no toolchain is found through the above methods, <i><b>rustup</b></i> defaults to the toolchain set as the default for the user (via <i><b>rustup default</b></i>).


title: HISTORY
content:
The Rust programming language has a rapid release cycle, with new stable versions released every six weeks. This necessitates a robust tool for managing different toolchain versions. <i><b>rustup</b></i> was created to fulfill this need, providing seamless installation, updates, and switching between various Rust toolchains.<br><br><i><b>rustup-run</b></i> emerged as a critical component of <i><b>rustup</b></i>'s functionality, enabling developers to execute commands against specific toolchains without modifying the global default. This capability became increasingly vital for projects requiring specific Rust versions, for testing code against different release channels (<i>stable</i>, <i>beta</i>, <i>nightly</i>), and for facilitating cross-compilation workflows. Its development has mirrored the growing complexity and versatility of the Rust ecosystem, solidifying its role as an indispensable utility for Rust developers.


title: SYNOPSIS
content:
<b>rustup self</b> &lt;<i>SUBCOMMAND</i>&gt;<br><b>rustup self install</b><br><b>rustup self uninstall</b><br><b>rustup self update</b> (deprecated)<br><b>rustup self --help</b>


title: PARAMETERS
content:
<b><b>install</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Installs <i>rustup</i> if not present, or updates an existing <i>rustup</i> installation to the latest version. This is the recommended way to update <i>rustup</i> itself.<br><br><b><b>uninstall</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Completely removes <i>rustup</i> and all installed Rust toolchains and components from the system. This action is irreversible and should be used with caution.<br><br><b><b>update</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Deprecated. Use <b>rustup self install</b> instead to update <i>rustup</i>.<br><br><b><b>-h</b>, <b>--help</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Displays help information for <i>rustup-self</i> or its subcommands.<br><br>


title: DESCRIPTION
content:
<i>rustup-self</i> is a specialized subcommand of <i>rustup</i>, the official Rust toolchain installer and manager. Its primary purpose is to manage the <i>rustup</i> installation itself, distinct from managing Rust toolchains or individual components. This command handles the lifecycle of the <i>rustup</i> utility, allowing users to perform critical maintenance operations. These operations include updating <i>rustup</i> to its latest stable version, installing <i>rustup</i> for the first time on a new system, or completely uninstalling <i>rustup</i> along with all its managed Rust toolchains and components. By focusing on <i>rustup</i>'s own maintenance, it ensures that the core utility remains current and functional, operating independently of the specific Rust compiler (<b>rustc</b>) or package manager (<b>cargo</b>) versions it orchestrates for development.


title: CAVEATS
content:
<b>Caveats:</b><br>1. The <b>update</b> subcommand is deprecated; users should prefer <b>rustup self install</b> for updating <i>rustup</i>.<br>2. The <b>uninstall</b> command is destructive and removes all Rust-related files managed by <i>rustup</i>. Use with extreme caution.<br>3. <i>rustup-self</i> manages <i>rustup</i> itself, not the Rust toolchains (e.g., stable, beta, nightly) or components (e.g., <b>rust-src</b>, <b>clippy</b>). Use <b>rustup update</b> or <b>rustup component add</b> for those tasks.


title: PURPOSE
content:
<i>rustup-self</i> specifically handles the <i>rustup</i> program itself, not the Rust toolchains. This distinction is crucial for understanding its role in the Rust ecosystem.


title: UPDATING RUSTUP
content:
To update <i>rustup</i> to its latest version, the recommended command is <b>rustup self install</b>. This command intelligently detects if <i>rustup</i> is already installed and performs an update if necessary.


title: HISTORY
content:
<i>rustup</i> was introduced to provide a robust and easy way to manage multiple Rust toolchains. <i>rustup-self</i> functionality was built-in from early versions to ensure <i>rustup</i> could maintain and update itself, separating its own lifecycle management from the toolchains it orchestrates. The deprecation of <b>rustup self update</b> in favor of <b>rustup self install</b> simplifies the update process by consolidating it with the initial installation command.


title: PARAMETERS
content:
<b><i>&lt;toolchain&gt;</i></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Specifies the Rust toolchain to set as the default. This can be a release channel (e.g., <i>stable</i>, <i>beta</i>, <i>nightly</i>), a precise version string (e.g., <i>1.70.0</i>), or the name of a custom-installed toolchain.<br><br>


title: DESCRIPTION
content:
The command <i>rustup-set</i> refers to the core functionality of setting the default Rust toolchain managed by <i>rustup</i>, the official Rust toolchain installer and manager. While <i>rustup-set</i> itself is not a standard user-facing command in current <i>rustup</i> versions (its role is fulfilled by the <i><b>rustup default</b></i> subcommand), its purpose is to define which Rust toolchain will be used system-wide.<br><br>This allows developers to specify a preferred Rust version (e.g., <i>stable</i>, <i>beta</i>, <i>nightly</i>, or a specific point release like <i>1.70.0</i>) that <i>rustup</i> will automatically use for all new shell sessions and projects, unless a local override is set. It streamlines the management of different Rust toolchains, ensuring consistency and making it easy to switch between versions as needed for various development tasks.


title: CAVEATS
content:
The exact command <i>rustup-set</i> is not a direct executable or commonly invoked subcommand of <i>rustup</i>. Its intended functionality is performed by <i><b>rustup default</b></i>. This command sets the <b>global</b> default toolchain. For setting a toolchain specific to a particular project directory, use <i><b>rustup override set</b></i>. Ensure <i>rustup</i> is properly installed and initialized for this command to function.


title: EXAMPLE USAGE
content:
To set the <i>stable</i> Rust toolchain as default:<br><i>rustup default stable</i><br><br>To set the <i>nightly</i> Rust toolchain as default:<br><i>rustup default nightly</i><br><br>To set a specific Rust version as default (if installed):<br><i>rustup default 1.70.0</i>


title: HISTORY
content:
<i>rustup</i> was created to address the complexity of managing multiple Rust toolchains and targets. The ability to set a 'default' toolchain has been a fundamental feature since <i>rustup</i>'s inception. While the specific internal implementation or naming might have varied (leading to references like <i>rustup-set</i>), the user-facing command for this core functionality consolidated into <i><b>rustup default</b></i>, providing a clear and consistent way for developers to manage their preferred Rust version.


title: DESCRIPTION
content:
The `rustup-show` command, commonly invoked as `rustup show`, provides a concise summary of the currently active Rust toolchain and its installed components. It's a fundamental diagnostic tool for understanding your Rust development environment. The output typically includes the `rustup` home directory, the actively used toolchain (e.g., <i>stable-x86_64-unknown-linux-gnu</i>), and a list of installed components such as `rustc`, `cargo`, `rust-std`, `rust-docs`, and `rust-src`. This command is invaluable for verifying which Rust version you are using, troubleshooting environment issues, or simply getting an overview of your setup without needing to remember detailed configuration paths. It helps confirm that `rustup` is correctly managing your installations and that the expected toolchain is active for your current project or session.


title: CAVEATS
content:
The output reflects the active toolchain for the current shell session or directory. If you have toolchain overrides set via a `rust-toolchain.toml` file in the current directory or an `RUSTUP_TOOLCHAIN` environment variable, `rustup show` will display that specific overridden toolchain, not necessarily the global default. This is by design to accurately show the active environment, but it's important to be aware of how overrides can affect the displayed information.


title: COMMON USE CASES
content:
The `rustup show` command is frequently used for:<br> <b>Verifying Current Toolchain:</b> Quickly confirm which Rust toolchain is active.<br> <b>Troubleshooting:</b> Diagnose issues related to incorrect Rust versions or missing components.<br> <b>Environment Overview:</b> Get a snapshot of your `rustup` configuration, home directory, and installed components.


title: OUTPUT STRUCTURE
content:
A typical output from `rustup show` includes:<br> <i>rustup home:</i> /path/to/rustup/home<br> <i>toolchain:</i> <toolchain_name> (default) or (override)<br> <i>host:</i> <host_triple><br> <i>release:</i> <rustup_version><br> <i>installed components:</i><br> - <component_name> (<version>)<br> ...


title: HISTORY
content:
The `rustup` tool, which encapsulates the `show` subcommand, was developed to streamline the management of Rust toolchains across different platforms. It emerged as a successor to earlier, less comprehensive toolchain managers like `multirust`. The `show` command has been an integral part of `rustup` since its initial public releases, providing an immediate and essential overview of the installed Rust environment. Its straightforward utility for confirming the active toolchain and installed components has made it a foundational command for all Rust developers, consistently serving as a first point of inquiry for understanding their Rust setup.


title: SYNOPSIS
content:
<b>rustup target <SUBCOMMAND> [OPTIONS]</b><br><br>Examples:<br><b>rustup target add <i>target_triple</i></b><br><b>rustup target remove <i>target_triple</i></b><br><b>rustup target list</b><br><b>rustup target list --installed</b>


title: PARAMETERS
content:
<b>add <i>&lt;target_triple&gt;</i></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Adds a new compilation target to the Rust toolchain, installing necessary standard library components for that target. The <i>target_triple</i> specifies the architecture, vendor, OS, and ABI (e.g., <i>aarch64-unknown-linux-gnu</i>).<br><br><b>remove <i>&lt;target_triple&gt;</i></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Removes an installed compilation target and its associated standard library components, freeing up disk space. This reverses the effect of the <i>add</i> subcommand.<br><br><b>list</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Lists all available Rust compilation targets supported by <i>rustup</i>. It indicates which targets are already installed on the system.<br><br><b>list --installed</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Specifically lists only the compilation targets that are currently installed on the system, providing a concise view of your cross-compilation setup.<br><br><b>--toolchain <i>&lt;toolchain&gt;</i></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Applies the <i>rustup target</i> command to a specific Rust toolchain (e.g., 'stable', 'nightly', or a custom toolchain name). This allows managing targets for different Rust versions independently.<br><br>


title: DESCRIPTION
content:
<i>rustup target</i> is a subcommand of the <i>rustup</i> toolchain manager. It allows users to manage different compilation targets (architectures and operating systems) for their Rust projects. This is crucial for cross-compilation, enabling Rust code to be compiled for platforms other than the host system. It facilitates adding, removing, and listing available and installed targets, ensuring the necessary standard library components are present for a given target. Using this command, developers can easily prepare their Rust environment for building applications for a wide range of platforms, from embedded devices to web browsers (via WebAssembly).


title: CAVEATS
content:
<i>rustup-target</i> is not a standalone executable; it must be invoked via the <i>rustup</i> command (i.e., <b>rustup target</b>).<br>While <i>rustup target</i> installs Rust's standard library for a given target, cross-compilation often requires additional system-level tools like appropriate linkers (e.g., `gcc` for ARM on Linux) and C toolchains, which must be installed separately by the user.<br>Target triples must be specified precisely according to Rust's conventions (e.g., <i>x86_64-pc-windows-msvc</i>, <i>armv7-unknown-linux-gnueabihf</i>).


title: TARGET TRIPLES
content:
Rust compilation targets are identified by a 'target triple', a string that uniquely describes the target system's architecture, vendor, operating system, and optionally the ABI. Common examples include:<br><ul><li><i>aarch64-unknown-linux-gnu</i> (64-bit ARM Linux using GNU toolchain)</li><li><i>x86_64-pc-windows-msvc</i> (64-bit Windows using MSVC toolchain)</li><li><i>armv7-unknown-linux-gnueabihf</i> (ARMv7 Linux with hard-float ABI)</li><li><i>wasm32-unknown-unknown</i> (32-bit WebAssembly)</li></ul>These triples are essential for specifying the exact platform for which Rust code is to be compiled, especially when building for platforms different from the development machine.


title: HISTORY
content:
<i>rustup target</i> is an integral part of the <i>rustup</i> project, which was developed to simplify the installation and management of Rust toolchains and components. It has been available since the early versions of <i>rustup</i>, becoming a fundamental component for Rust developers engaging in cross-platform development. Its functionality has evolved alongside <i>rustup</i> to support new architectures and platforms as Rust's ecosystem expanded, making cross-compilation more accessible for embedded systems, mobile development, and WebAssembly targets.


title: SEE ALSO
content:
rustup(1): The primary Rust toolchain installer and manager., rustc(1): The Rust compiler, which utilizes the installed targets to produce executables., cargo(1): The Rust package manager, which can be configured to build for specific targets using the `--target` option.


title: PARAMETERS
content:
<b><b>list</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Lists all installed Rust toolchains on your system, indicating the active and default ones.<br><br><b><b>install</b> <I>toolchain</I></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Installs a specified Rust toolchain (e.g., <i>stable</i>, <i>beta</i>, <i>nightly</i>, <i>1.70.0</i>). This command downloads and sets up the compiler, standard library, and common components for the chosen toolchain.<br><br><b>&emsp;<b>--component</b> <I>component</I></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Used with <b>install</b> to add an additional component (e.g., <i>rust-src</i>, <i>rust-docs</i>, <i>clippy</i>) to the toolchain during installation or later.<br><br><b>&emsp;<b>--target</b> <I>target-triple</I></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Used with <b>install</b> to install a toolchain for a specific cross-compilation target (e.g., <i>x86_64-unknown-linux-gnu</i>, <i>armv7-unknown-linux-gnueabihf</i>), enabling cross-platform development.<br><br><b><b>uninstall</b> <I>toolchain</I></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Removes a previously installed Rust toolchain from your system, freeing up disk space.<br><br><b><b>link</b> <I>name</I> <I>path</I></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Links a local directory as a custom toolchain under a given name. This is useful for testing custom builds of <i>rustc</i> or integrating toolchains not installed by <i>rustup</i> itself.<br><br><b><b>default</b> <I>toolchain</I></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Sets the specified toolchain as the default for your system. This toolchain will be used when you invoke <i>rustc</i> or <i>cargo</i> without explicitly selecting a toolchain.<br><br><b><b>show</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Displays information about the currently active toolchain in the current directory or globally, along with any overrides.<br><br>


title: DESCRIPTION
content:
<i>rustup toolchain</i> is the primary subcommand within <i>rustup</i> used for managing different Rust toolchains. Rust toolchains are specific versions of the Rust compiler (<i>rustc</i>), standard library, and associated tools (like <i>cargo</i>, <i>rustfmt</i>, <i>clippy</i>). Users often need multiple toolchains for various reasons: <b>stable</b> for general development, <b>beta</b> for trying upcoming features, <b>nightly</b> for cutting-edge experimental features, or specific older versions for compatibility.<br><br>This command allows users to install new toolchains, uninstall existing ones, list all installed toolchains, set a default toolchain for the system, and link custom-built toolchains or those installed from other sources. It provides a flexible way to switch between different Rust development environments seamlessly, which is crucial for modern Rust development practices, enabling testing against various compiler versions or supporting projects requiring specific toolchains.


title: CAVEATS
content:
Internet access is required for <b>install</b> and <b>update</b> operations, as toolchains are downloaded from the internet.<br>Linking custom toolchains with <b>link</b> requires careful path management to ensure the linked binaries are correctly found and used.<br>Installing multiple toolchains or various components can consume significant disk space over time.


title: TOOLCHAIN OVERRIDES
content:
Beyond setting a global default, <i>rustup</i> allows setting directory-specific toolchain overrides. By navigating to a directory and running <code>rustup override set &lt;toolchain&gt;</code>, you can ensure that a specific toolchain is used automatically whenever you are in that directory or any of its subdirectories. This is particularly useful for projects that require a specific Rust version for compilation.


title: COMPONENT MANAGEMENT
content:
Rust toolchains are modular. Commands like <code>rustup component add &lt;component&gt;</code> (which targets the currently active toolchain) allow adding specific functionalities like <i>rust-analyzer</i> (LSP server), <i>clippy</i> (linter), or <i>rustfmt</i> (formatter) to an installed toolchain, ensuring a tailored development environment without reinstalling the entire toolchain.


title: HISTORY
content:
Before the advent of <i>rustup</i>, managing different Rust compiler versions was a largely manual process, often involving uninstalling and reinstalling Rust, or using custom scripts. This made experimenting with new features or maintaining projects reliant on older Rust versions cumbersome.<br><br><i>rustup</i> was developed to streamline this process, becoming the official Rust toolchain installer and manager. The <i>toolchain</i> subcommand is central to its functionality, providing a robust, consistent interface for developers to switch between <b>stable</b>, <b>beta</b>, and <b>nightly</b> releases, as well as specific historical versions. Its design emphasizes flexibility and ease of use, making it a cornerstone of the modern Rust development workflow.


title: SYNOPSIS
content:
<code>rustup uninstall [toolchain...]</code> <br><i>Uninstalls one or more specific Rust toolchains.</i><br><br><code>rustup self uninstall</code> <br><i>Uninstalls rustup itself and all associated toolchains and data.</i>


title: PARAMETERS
content:
<b>toolchain...</b><br>&nbsp;&nbsp;&nbsp;&nbsp;One or more names of the Rust toolchains to be uninstalled (e.g., <b>stable</b>, <b>nightly</b>, <b>1.60.0</b>).<br><br><b>self</b><br>&nbsp;&nbsp;&nbsp;&nbsp;A special keyword used with `rustup uninstall` to indicate that <i>rustup</i> itself should be uninstalled, not just a specific toolchain.<br><br><b>--no-prompt</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Proceed with uninstallation without asking for confirmation. Useful for scripting.<br><br><b>--force</b><br>&nbsp;&nbsp;&nbsp;&nbsp;An alias for <b>--no-prompt</b>, forcing the uninstallation process.<br><br>


title: DESCRIPTION
content:
The <b>rustup-uninstall</b> command, typically invoked as `rustup uninstall`, is a crucial subcommand of the `rustup` toolchain manager for the Rust programming language. Its primary function is to remove installed Rust toolchains from your system. This includes specific versions like <b>stable</b>, <b>beta</b>, <b>nightly</b>, or any custom toolchains you may have installed. More significantly, it also provides the capability to completely uninstall <i>rustup</i> itself, along with all associated Rust installations.<br><br>When uninstalling `rustup`, the command performs a thorough cleanup, removing `rustup`'s home directory (usually `~/.rustup`), all downloaded toolchains, and `cargo`'s home directory (usually `~/.cargo`). It also attempts to revert modifications made to your shell's environment variables (like `PATH`) during the initial `rustup` installation. By default, `rustup-uninstall` will prompt for confirmation before performing any destructive actions, acting as a safeguard against accidental data loss. This command is essential for managing disk space or completely removing Rust development environments.


title: CAVEATS
content:
<ul><li><b>Destructive Operation:</b> Running `rustup self uninstall` will permanently remove all Rust toolchains, `rustup` configuration, and `cargo` caches from your system.</li><li><b>Environment Variables:</b> While `rustup` attempts to clean up `PATH` modifications, manual intervention might be required if you have custom shell configurations.</li><li><b>Confirmation:</b> By default, the command asks for confirmation. Always review the prompt before proceeding, especially for `self uninstall`.</li><li><b>Active Processes:</b> Ensure no Rust-related processes or editors are actively using files within the `~/.rustup` or `~/.cargo` directories during uninstallation to avoid errors.</li></ul>


title: VERIFYING UNINSTALLATION
content:
After running <b>rustup self uninstall</b>, you can verify its success by opening a new terminal session and trying to execute <b>rustc --version</b> or <b>cargo --version</b>. If the uninstallation was successful, these commands should report 'command not found'.


title: WHAT GETS REMOVED
content:
When <b>rustup self uninstall</b> is executed, it targets and removes: <br> - The <b>~/.rustup</b> directory, which contains all downloaded toolchains and `rustup`'s metadata. <br> - The <b>~/.cargo</b> directory, containing `cargo`'s executable, registries, and build caches. <br> - Entries related to `rustup` and `cargo` from common shell configuration files (e.g., `~/.bashrc`, `~/.zshrc`, `~/.profile`).


title: HISTORY
content:
`rustup` was created by Alex Crichton and first released in 2016, quickly becoming the official and recommended way to install and manage Rust toolchains across various platforms. The `uninstall` functionality has been a core component since its early development, providing users with a robust method to clean up or remove Rust environments, reflecting `rustup`'s commitment to manageability and user control over their development setup.


title: PARAMETERS
content:
<b><I>COMMAND</I></b><br>&nbsp;&nbsp;&nbsp;&nbsp;The name of the Rust executable to locate (e.g., <i>rustc</i>, <i>cargo</i>, <i>rustdoc</i>). The command must be part of a Rust toolchain managed by <i>rustup</i>.<br><br><b>--toolchain <I>TOOLCHAIN</I></b><br>&nbsp;&nbsp;&nbsp;&nbsp;(Optional, global <i>rustup</i> option) Specifies the Rust toolchain to search within, overriding the currently active or default toolchain. Examples include <i>stable</i>, <i>beta</i>, <i>nightly</i>, or specific version strings like <i>1.70.0</i>.<br><br>


title: DESCRIPTION
content:
<i>rustup-which</i> is a subcommand of the <i>rustup</i> toolchain manager. It serves to identify the exact absolute path to a Rust-related executable (such as <i>rustc</i>, <i>cargo</i>, <i>rustdoc</i>, etc.) that <i>rustup</i> would execute based on the currently active or specified toolchain.<br><br>This command is invaluable for debugging environment <i>PATH</i> issues, verifying which version of a Rust command is being used, or scripting operations that require direct access to toolchain binaries.<br><br>When invoked, <i>rustup-which</i> searches within the directories managed by <i>rustup</i> for the specified command. If found, it prints the absolute path to standard output. It is particularly useful in environments where multiple Rust toolchains (e.g., stable, beta, nightly, or specific versions) are installed, helping users understand which specific binary will be invoked by <i>rustup</i>'s shim system. It ensures that the correct toolchain binary is identified, especially when dealing with projects that require a specific Rust version or when trying to isolate issues related to toolchain discrepancies.


title: CAVEATS
content:
The command only finds executables managed by the <i>rustup</i> toolchain system. It will not locate Rust binaries installed manually or through other package managers if they are not integrated with <i>rustup</i>.<br><br>The path returned by <i>rustup-which</i> typically points to a <i>rustup</i> 'shim' executable, which then redirects to the actual binary within the toolchain directory. For most purposes, this shim path is the correct and intended execution path.


title: EXIT STATUS
content:
<i>rustup-which</i> exits with status 0 if the specified command is found and its path is successfully printed. It exits with a non-zero status (typically 1) if the command is not found within the active or specified toolchain, or if an error occurs.


title: OUTPUT
content:
The command prints the absolute path of the located executable to standard output (<i>stdout</i>), followed by a newline character. No output is produced on <i>stdout</i> if the command is not found, although an error message might be printed to standard error (<i>stderr</i>).


title: HISTORY
content:
<i>rustup-which</i> is an integral part of the <i>rustup</i> toolchain installer, which was initially released in 2016 to standardize the management of Rust versions and targets. It has been a stable and fundamental utility within the <i>rustup</i> ecosystem since its early development, providing a consistent way to query the location of Rust toolchain components.


title: SYNOPSIS
content:
<b>rvm</b> [<i>options</i>] [<i>command</i>] [<i>arguments</i>]<br>Example: <b>rvm</b> <i>install</i> ruby-3.1.2<br>Example: <b>rvm</b> <i>use</i> 2.7.5@my_project --default


title: PARAMETERS
content:
<b>install <version></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Installs a specific Ruby version (e.g., `ruby-3.1.2`, `jruby`).<br><br><b>use <version>[@<gemset>]</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Switches to a specific Ruby version and optionally a gemset for the current shell session.<br><br><b>list | ls</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Lists all installed Ruby versions and available gemsets.<br><br><b>gemset <subcommand> [args]</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Manages gemsets. Common subcommands include `create`, `list`, `delete`, `use`, `empty`.<br><br><b>remove <version></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Removes an installed Ruby version and its associated gemsets.<br><br><b>info</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Displays detailed information about the current RVM, Ruby, and gemset environment.<br><br><b>--default</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Used with `use` to set the specified Ruby/gemset as the default for new shells.<br><br><b>cleanup</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Performs various cleanup operations, such as removing old logs or source files.<br><br><b>unuse</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Reverts to the system Ruby or the default RVM Ruby.<br><br>


title: DESCRIPTION
content:
RVM, or <i>Ruby Version Manager</i>, is a powerful command-line tool designed to help developers install, manage, and work with multiple Ruby environments on a single machine. It allows for the installation, use, and management of various Ruby interpreters (e.g., MRI, JRuby, Rubinius) and their associated gemsets, which are isolated collections of gems. This solves common dependency conflicts between different projects that might require different Ruby versions or specific gem versions. <br><br>RVM integrates deeply with the user's shell, typically installing Rubies into the user's home directory, thus avoiding the need for system-wide installations and `sudo` permissions for most operations. It enables developers to easily switch between different Ruby versions and gemsets on a per-project basis, ensuring that each project's dependencies are precisely met without affecting others.


title: CAVEATS
content:
RVM can be complex for beginners due to its extensive feature set and deep shell integration. It modifies shell startup files, which can sometimes lead to slower shell loading times or conflicts if not managed carefully. While powerful, some users prefer simpler alternatives like `rbenv` or `chruby` for their less intrusive nature. Ensuring proper RVM initialization in the shell environment is crucial for its functionality.


title: GEMSETS
content:
RVM's gemsets are isolated collections of gems associated with a specific Ruby version. They allow developers to maintain distinct sets of project dependencies, preventing conflicts between different projects using the same Ruby version but different gem requirements. For example, a project using Rails 5 and another using Rails 6 could both use Ruby 2.7 by having separate gemsets.


title: SHELL INTEGRATION
content:
RVM works by sourcing its initialization script in your shell's configuration file (e.g., `.bashrc`, `.zshrc`). This modifies your shell's `PATH` and other environment variables, enabling RVM to intercept commands like `ruby` and `gem` and direct them to the correct version and gemset. This deep integration is fundamental to its ability to manage multiple Ruby environments seamlessly.


title: HISTORY
content:
RVM was created by Michal Papis and first released around 2009. It quickly gained widespread adoption in the Ruby community as one of the pioneering and most comprehensive solutions for managing multiple Ruby installations and their dependencies. Prior to RVM, managing different Ruby versions for various projects was a significant challenge, often leading to 'dependency hell.' RVM addressed this by providing robust isolation and easy switching capabilities. While newer, often simpler, alternatives have emerged (like `rbenv`), RVM continues to be actively maintained and used by many developers who appreciate its comprehensive features, particularly its powerful gemset management.


title: PARAMETERS
content:
<b><b>-a</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Convert received files to text (strip eighth bit).<br><br><b><b>-b</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Perform binary transfer (default).<br><br><b><b>-B</b> <i>NUM</i></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Set buffer size to <i>NUM</i> Kbytes.<br><br><b><b>-c</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Enable crash recovery, allowing resumption of interrupted transfers.<br><br><b><b>-C</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Don't escape control characters (raw data output).<br><br><b><b>-D</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Output debugging information.<br><br><b><b>-E</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Escape all control characters except CR, LF, XON, XOFF.<br><br><b><b>-e</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Escape all control characters.<br><br><b><b>-i</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Ignore CRC errors during transfer.<br><br><b><b>-k</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Kill (remove) any existing file with the same name before transfer.<br><br><b><b>-L</b> <i>NUM</i></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Limit length of received pathnames to <i>NUM</i> characters.<br><br><b><b>-m</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Don't clobber existing files (skip if file with same name exists).<br><br><b><b>-o</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Use old Zmodem protocol (for compatibility with older systems).<br><br><b><b>-p</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Preserve file attributes (modification time, access time, mode) of received files.<br><br><b><b>-q</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Run in quiet mode (suppress verbose output).<br><br><b><b>-r</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Use raw mode (no escape for any characters).<br><br><b><b>-R</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Receive files and write their content to standard output.<br><br><b><b>-s</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Receive Zmodem data from standard input and write the reconstructed file to standard output (stream transfer).<br><br><b><b>-S</b> <i>NUM</i></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Set a general timeout in seconds for certain operations.<br><br><b><b>-t</b> <i>NUM</i></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Set a timeout in tenths of seconds for block reception.<br><br><b><b>-T</b> <i>NUM</i></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Set timeout in seconds for initial handshake.<br><br><b><b>-U</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Do not unlink (remove) partially received files upon failure.<br><br><b><b>-v</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Enable verbose output, showing transfer progress and details.<br><br><b><b>-V</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Display version information and exit.<br><br><b><b>-w</b> <i>NUM</i></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Wait for <i>NUM</i> seconds for the first character from the sender.<br><br><b><b>-X</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Use Xmodem protocol instead of Zmodem.<br><br><b><b>-y</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Clobber (overwrite) existing files without asking.<br><br><b><b>-Y</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Clobber existing files without asking, similar to <b>-y</b>.<br><br><b><b>-Z</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Use Zmodem protocol (this is the default).<br><br>


title: DESCRIPTION
content:
<i>rz</i> (receive Zmodem) is a command-line utility used for receiving files from a remote system over a serial connection or terminal emulator using the Zmodem file transfer protocol.<br><br>It is part of the <i>lrzsz</i> package, which provides implementations of the Zmodem, Ymodem, and Xmodem protocols for Linux/Unix-like systems. <i>rz</i> is particularly useful when transferring files over slow or unreliable links, or when interacting with embedded systems, modems, or old serial consoles, as Zmodem offers features like error checking, crash recovery, and efficient block transfers.<br><br>When <i>rz</i> is executed, it typically waits for a Zmodem sending program (like <i>sz</i> on the remote end) to initiate a transfer. Upon successful reception, the files are saved in the current working directory. The command supports various options to control behavior, such as overwriting existing files, preserving timestamps, verbose output, and more.


