.\" -*- mode: troff; coding: utf-8 -*- .\" Automatically generated by Pod::Man v6.0.2 (Pod::Simple 3.48) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>. .ie n \{\ . ds C` "" . ds C' "" 'br\} .el\{\ . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" .\" Required to disable full justification in groff 1.23.0. .if n .ds AD l .\" ======================================================================== .\" .IX Title "AUGTOOL 1" .TH AUGTOOL 1 2026-10-25 "Augeas 1.15.0" Augeas .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH NAME augtool \- inspect and modify configuration files .SH SYNOPSIS .IX Header "SYNOPSIS" augtool [OPTIONS] [COMMAND] .SH DESCRIPTION .IX Header "DESCRIPTION" Augeas is a configuration editing tool. It parses configuration files in their native formats and transforms them into a tree. Configuration changes are made by manipulating this tree and saving it back into native config files. .PP augtool provides a command line interface to the generated tree. COMMAND can be a single command as described under "COMMANDS". When called with no COMMAND, it reads commands from standard input until an end\-of\-file is encountered. .SH OPTIONS .IX Header "OPTIONS" .IP "\fB\-c\fR, \fB\-\-typecheck\fR" 4 .IX Item "-c, --typecheck" Typecheck lenses. This can be very slow, and is therefore not done by default, but is highly recommended during development. .IP "\fB\-b\fR, \fB\-\-backup\fR" 4 .IX Item "-b, --backup" When files are changed, preserve the originals in a file with extension \&\*(Aq.augsave\*(Aq .IP "\fB\-n\fR, \fB\-\-new\fR" 4 .IX Item "-n, --new" Save changes in files with extension \*(Aq.augnew\*(Aq, do not modify the original files .IP "\fB\-r\fR, \fB\-\-root\fR=\fIROOT\fR" 4 .IX Item "-r, --root=ROOT" Use directory ROOT as the root of the filesystem. Takes precedence over a root set with the AUGEAS_ROOT environment variable. .IP "\fB\-I\fR, \fB\-\-include\fR=\fIDIR\fR" 4 .IX Item "-I, --include=DIR" Add DIR to the module loadpath. Can be given multiple times. The directories set here are searched before any directories specified in the AUGEAS_LENS_LIB environment variable, and before the default directories \&\fI/usr/share/augeas/lenses\fR and \fI/usr/share/augeas/lenses/dist\fR. .IP "\fB\-t\fR, \fB\-\-transform\fR=\fIXFM\fR" 4 .IX Item "-t, --transform=XFM" Add a file transform; uses the \*(Aqtransform\*(Aq command syntax, e.g. \f(CW\*(C`\-t \*(AqFstab incl /etc/fstab.bak\*(Aq\*(C'\fR. .IP "\fB\-l\fR, \fB\-\-load\-file\fR=\fIFILE\fR" 4 .IX Item "-l, --load-file=FILE" Load an individual FILE into the tree. The lens to use is determined automatically (based on autoload information in the lenses) and will be the same that is used for this file when the entire tree is loaded. The option can be specified multiple times to load several files, e.g. \f(CW\*(C`\-l /etc/fstab \&\-l /etc/hosts\*(C'\fR. This lens implies \f(CW\*(C`\-\-noload\*(C'\fR so that only the files specified with this option will be loaded. .IP "\fB\-f\fR, \fB\-\-file\fR=\fIFILE\fR" 4 .IX Item "-f, --file=FILE" Read commands from FILE. .IP "\fB\-i\fR, \fB\-\-interactive\fR" 4 .IX Item "-i, --interactive" Read commands from the terminal. When combined with \fB\-f\fR or redirection of stdin, drop into an interactive session after executing the commands from the file. .IP "\fB\-e\fR, \fB\-\-echo\fR" 4 .IX Item "-e, --echo" When reading commands from a file via stdin, echo the commands before printing their output. .IP "\fB\-s\fR, \fB\-\-autosave\fR" 4 .IX Item "-s, --autosave" Automatically save all changes at the end of the session. .IP "\fB\-S\fR, \fB\-\-nostdinc\fR" 4 .IX Item "-S, --nostdinc" Do not search any of the default directories for modules. When this option is set, only directories specified explicitly with \fB\-I\fR or specified in \&\fBAUGEAS_LENS_LIB\fR will be searched for modules. .IP "\fB\-L\fR, \fB\-\-noload\fR" 4 .IX Item "-L, --noload" Do not load any files on startup. This is generally used to fine\-tune which files to load by modifying the entries in \f(CW\*(C`/augeas/load\*(C'\fR and then issuing a \f(CW\*(C`load\*(C'\fR command. .IP "\fB\-A\fR, \fB\-\-noautoload\fR" 4 .IX Item "-A, --noautoload" Do not load any lens modules, and therefore no files, on startup. This creates no entries under \f(CW\*(C`/augeas/load\*(C'\fR whatsoever; to read any files, they need to be set up manually and loading must be initiated with a \&\f(CW\*(C`load\*(C'\fR command. Using this option gives the fastest startup. .IP \fB\-\-span\fR 4 .IX Item "--span" Load span positions for nodes in the tree, as they relate to the original file. Enables the use of the \fBspan\fR command to retrieve position data. .IP \fB\-\-timing\fR 4 .IX Item "--timing" After executing each command, print how long, in milliseconds, executing the command took. This makes it easier to spot slow queries, usually through \fBmatch\fR commands, and allows exploring alternative queries that yield the same result but might be faster. .IP \fB\-\-version\fR 4 .IX Item "--version" Print version information and exit. The version is also in the tree under \&\f(CW\*(C`/augeas/version\*(C'\fR. .SH COMMANDS .IX Header "COMMANDS" In interactive mode, commands and paths can be completed by pressing \f(CW\*(C`TAB\*(C'\fR. .PP The paths accepted as arguments by commands use a small subset of XPath path expressions. A path expression consists of a number of segments, separated by \f(CW\*(C`/\*(C'\fR. In each segment, the character \f(CW\*(C`*\*(C'\fR can be used to match every node regardless of its label. Sibling nodes with identical labels can be distinguished by appending \f(CW\*(C`[N]\*(C'\fR to their label to match the N\-th sibling with such a label. The last sibling with a specific label can be reached as \f(CW\*(C`[last()]\*(C'\fR. See "EXAMPLES" for some examples of this. .SS "ADMIN COMMANDS" .IX Subsection "ADMIN COMMANDS" The following commands control the behavior of Augeas and augtool itself. .IP \fBhelp\fR 4 .IX Item "help" Print this help text .IP \fBload\fR 4 .IX Item "load" Load files according to the transforms in \f(CW\*(C`/augeas/load\*(C'\fR. .IP \fBquit\fR 4 .IX Item "quit" Exit the program .IP "\fBretrieve\fR " 4 .IX Item "retrieve " Transform tree at PATH back into text using lens LENS and store the resulting string at NODE_OUT. Assume that the tree was initially read in with the same lens and the string stored at NODE_IN as input. .IP \fBsave\fR 4 .IX Item "save" Save all pending changes to disk. Unless either the \fB\-b\fR or \fB\-n\fR command line options are given, files are changed in place. .IP "\fBstore\fR " 4 .IX Item "store " Parse NODE using LENS and store the resulting tree at PATH. .IP "\fBtransform\fR " 4 .IX Item "transform " Add a transform for FILE using LENS. The LENS may be a module name or a full lens name. If a module name is given, then "lns" will be the lens assumed. The FILTER must be either "incl" or "excl". If the filter is "incl", the FILE will be parsed by the LENS. If the filter is "excl", the FILE will be excluded from the LENS. FILE may contain wildcards. .IP "\fBload\-file\fR " 4 .IX Item "load-file " Load a specific FILE, automatically determining the proper lens from the information in \fI/augeas/load\fR; without further intervention, the lens that would oridnarily be used for this file will be used. .SS "READ COMMANDS" .IX Subsection "READ COMMANDS" The following commands are used to retrieve data from the Augeas tree. .IP "\fBdump\-xml\fR \fI[]\fR" 4 .IX Item "dump-xml []" Print entries in the tree as XML. If PATH is given, printing starts there, otherwise the whole tree is printed. .IP "\fBget\fR " 4 .IX Item "get " Print the value associated with PATH .IP "\fBlabel\fR " 4 .IX Item "label " Get and print the label associated with PATH .IP "\fBls\fR " 4 .IX Item "ls " List the direct children of PATH .IP "\fBmatch\fR []" 4 .IX Item "match []" Find all paths that match PATTERN. If VALUE is given, only the matching paths whose value equals VALUE are printed .IP "\fBprint\fR \fI[]\fR" 4 .IX Item "print []" Print entries in the tree. If PATH is given, printing starts there, otherwise the whole tree is printed .IP "\fBspan\fR " 4 .IX Item "span " Print the name of the file from which the node PATH was generated, as well as information about the positions in the file corresponding to the label, the value, and the entire node. PATH must match exactly one node. .Sp You need to run \*(Aqset /augeas/span enable\*(Aq prior to loading files to enable recording of span information. It is disabled by default. .SS "WRITE COMMANDS" .IX Subsection "WRITE COMMANDS" The following commands are used to modify the Augeas tree. .IP "\fBclear\fR " 4 .IX Item "clear " Set the value for PATH to NULL. If PATH is not in the tree yet, it and all its ancestors will be created. .IP "\fBclearm\fR " 4 .IX Item "clearm " Clear multiple nodes values in one operation. Find or create a node matching SUB by interpreting SUB as a path expression relative to each node matching BASE. If SUB is \*(Aq.\*(Aq, the nodes matching BASE will be modified. .IP "\fBins\fR \fI