# Peiosutils

> The Peios core utilities — the everyday commands, reworked for the Peios security model.

All of Peiosutils as one markdown file: [/peios/using-peios/peiosutils/print.md](/peios/using-peios/peiosutils/print.md)

## Files and directories

- [Files and directories](/peios/using-peios/peiosutils/files-and-directories/overview.md): The commands that create, copy, move, remove, and resize files and directories — and how each one handles a file's security descriptor.
- [cp](/peios/using-peios/peiosutils/files-and-directories/cp.md): Copy files and directories — including how a copy gets its security descriptor and the --preserve family that carries attributes from the source.
- [mv](/peios/using-peios/peiosutils/files-and-directories/mv.md): Move or rename files and directories — including how a move handles a file's security descriptor depending on whether it crosses a file system.
- [rm](/peios/using-peios/peiosutils/files-and-directories/rm.md): Remove files and directories — including how rm decides a file is write-protected and worth prompting about.
- [rmdir](/peios/using-peios/peiosutils/files-and-directories/rmdir.md): Remove directories, but only when they are already empty.
- [mkdir](/peios/using-peios/peiosutils/files-and-directories/mkdir.md): Create directories — and the shared creation flags that set a new object's security descriptor, used by mkdir, mkfifo, mknod, and touch.
- [mkfifo](/peios/using-peios/peiosutils/files-and-directories/mkfifo.md): Create named pipes (FIFOs).
- [mknod](/peios/using-peios/peiosutils/files-and-directories/mknod.md): Create special files — device nodes and named pipes.
- [touch](/peios/using-peios/peiosutils/files-and-directories/touch.md): Create empty files, or update the timestamps of existing ones.
- [ln](/peios/using-peios/peiosutils/files-and-directories/ln.md): Create hard links and symbolic links between files.
- [link and unlink](/peios/using-peios/peiosutils/files-and-directories/link-and-unlink.md): The single-purpose, low-level commands for creating one hard link and for removing one file.
- [shred](/peios/using-peios/peiosutils/files-and-directories/shred.md): Destroy a file's contents by overwriting them repeatedly, so they cannot be recovered — including how --force overrides a file's protection.
- [dd](/peios/using-peios/peiosutils/files-and-directories/dd.md): Copy data block by block between files, optionally converting and reshaping it on the way.
- [df](/peios/using-peios/peiosutils/files-and-directories/df.md): Report how much space each file system has and how much of it is free.
- [du](/peios/using-peios/peiosutils/files-and-directories/du.md): Report how much disk space files and directories use.
- [truncate](/peios/using-peios/peiosutils/files-and-directories/truncate.md): Shrink or extend a file to an exact size.
- [mktemp](/peios/using-peios/peiosutils/files-and-directories/mktemp.md): Create a temporary file or directory with a safely unique name.
- [sd](/peios/using-peios/peiosutils/files-and-directories/sd.md): The sd command reads and changes a file's security descriptor — owner, access rules, audit rules, integrity label, and inheritance.

## Listing and paths

- [Listing and paths](/peios/using-peios/peiosutils/listing-and-paths/overview.md): The commands that show you what a directory contains and that inspect, resolve, and manipulate path names — ls, stat, pwd, readlink, realpath, and the rest.
- [ls](/peios/using-peios/peiosutils/listing-and-paths/ls.md): List the contents of a directory — the default listing, the Peios long format and its security-descriptor columns, and the sorting and formatting options.
- [dir and vdir](/peios/using-peios/peiosutils/listing-and-paths/dir-and-vdir.md): Two commands that list directory contents with a fixed output style — dir always lists in columns, vdir always lists in long format.
- [stat](/peios/using-peios/peiosutils/listing-and-paths/stat.md): Display the detailed status of a file or a file system — type, size, timestamps, and raw inode metadata — with an optional custom output format.
- [pwd](/peios/using-peios/peiosutils/listing-and-paths/pwd.md): Print the absolute path of the directory you are currently working in.
- [readlink](/peios/using-peios/peiosutils/listing-and-paths/readlink.md): Print the target of a symbolic link, or canonicalise a path by resolving every link in it.
- [realpath](/peios/using-peios/peiosutils/listing-and-paths/realpath.md): Resolve a path to its canonical, absolute form — every symbolic link followed and every . and .. component removed.
- [basename](/peios/using-peios/peiosutils/listing-and-paths/basename.md): Strip the directory part off a path, leaving just the final name — and optionally remove a trailing suffix.
- [dirname](/peios/using-peios/peiosutils/listing-and-paths/dirname.md): Strip the final component off a path, leaving the directory part.
- [pathchk](/peios/using-peios/peiosutils/listing-and-paths/pathchk.md): Check whether path names are valid and usable before you try to create the files they name.
- [dircolors](/peios/using-peios/peiosutils/listing-and-paths/dircolors.md): Produce the shell commands that set LS_COLORS — the variable that controls how ls colours its output.

## Viewing and joining text

- [Viewing and joining text](/peios/using-peios/peiosutils/viewing-and-joining-text/overview.md): The commands that print files to the screen, show parts of them, and combine or split text by line and by column.
- [cat](/peios/using-peios/peiosutils/viewing-and-joining-text/cat.md): Print files to standard output, and concatenate several files into one stream.
- [tac](/peios/using-peios/peiosutils/viewing-and-joining-text/tac.md): Print files with their lines in reverse order — last line first.
- [head](/peios/using-peios/peiosutils/viewing-and-joining-text/head.md): Print the first lines or bytes of a file.
- [tail](/peios/using-peios/peiosutils/viewing-and-joining-text/tail.md): Print the last lines of a file — and keep printing as the file grows.
- [more](/peios/using-peios/peiosutils/viewing-and-joining-text/more.md): View a file one screen at a time, pausing between screens.
- [nl](/peios/using-peios/peiosutils/viewing-and-joining-text/nl.md): Print files with their lines numbered, with control over which lines are counted and how the number is formatted.
- [cut](/peios/using-peios/peiosutils/viewing-and-joining-text/cut.md): Pull selected columns — byte ranges or delimited fields — out of each line of input.
- [paste](/peios/using-peios/peiosutils/viewing-and-joining-text/paste.md): Join files side by side, line for line.
- [join](/peios/using-peios/peiosutils/viewing-and-joining-text/join.md): Join two files on a shared field, pairing lines that have the same key.
- [comm](/peios/using-peios/peiosutils/viewing-and-joining-text/comm.md): Compare two sorted files line by line and report which lines they share.
- [split](/peios/using-peios/peiosutils/viewing-and-joining-text/split.md): Break a file into equal-sized pieces, each written to its own output file.
- [csplit](/peios/using-peios/peiosutils/viewing-and-joining-text/csplit.md): Break a file into pieces at lines chosen by line number or by a matching pattern.
- [od](/peios/using-peios/peiosutils/viewing-and-joining-text/od.md): Dump the raw bytes of a file in octal, hexadecimal, decimal, floating-point, or character form — a low-level view of exactly what a file contains.

## Transforming text

- [Transforming text](/peios/using-peios/peiosutils/transforming-text/overview.md): The commands that reshape text — reordering lines, removing duplicates, substituting characters, reflowing paragraphs, and counting.
- [sort](/peios/using-peios/peiosutils/transforming-text/sort.md): Sort the lines of files — alphabetically, numerically, by field, and many other ways.
- [uniq](/peios/using-peios/peiosutils/transforming-text/uniq.md): Collapse or report adjacent repeated lines in a file.
- [tr](/peios/using-peios/peiosutils/transforming-text/tr.md): Translate, squeeze, or delete individual characters in a stream of text.
- [expand](/peios/using-peios/peiosutils/transforming-text/expand.md): Convert tab characters in a file into spaces.
- [unexpand](/peios/using-peios/peiosutils/transforming-text/unexpand.md): Convert runs of spaces in a file back into tab characters.
- [fmt](/peios/using-peios/peiosutils/transforming-text/fmt.md): Reflow paragraphs of text to a target line width.
- [fold](/peios/using-peios/peiosutils/transforming-text/fold.md): Hard-wrap long lines at a fixed width.
- [pr](/peios/using-peios/peiosutils/transforming-text/pr.md): Paginate and columnate text for printing.
- [ptx](/peios/using-peios/peiosutils/transforming-text/ptx.md): Produce a permuted index of the words in a file.
- [tsort](/peios/using-peios/peiosutils/transforming-text/tsort.md): Topologically sort items so that each comes after the things it depends on.
- [wc](/peios/using-peios/peiosutils/transforming-text/wc.md): Count the lines, words, and bytes in files.
- [shuf](/peios/using-peios/peiosutils/transforming-text/shuf.md): Output the input lines in a random order.

## Output and evaluation

- [Output and evaluation](/peios/using-peios/peiosutils/output-and-evaluation/overview.md): The commands that produce text, work with the environment, convert numbers, and evaluate expressions and conditions.
- [echo](/peios/using-peios/peiosutils/output-and-evaluation/echo.md): Print arguments as a line of text to standard output.
- [printf](/peios/using-peios/peiosutils/output-and-evaluation/printf.md): Print formatted text from a format string and a list of arguments.
- [yes](/peios/using-peios/peiosutils/output-and-evaluation/yes.md): Print a line repeatedly until stopped.
- [seq](/peios/using-peios/peiosutils/output-and-evaluation/seq.md): Print a sequence of numbers from a start to an end.
- [env](/peios/using-peios/peiosutils/output-and-evaluation/env.md): Run a command with a modified environment, or print the current environment.
- [printenv](/peios/using-peios/peiosutils/output-and-evaluation/printenv.md): Print the values of environment variables.
- [numfmt](/peios/using-peios/peiosutils/output-and-evaluation/numfmt.md): Convert numbers between plain digits and human-readable forms.
- [expr](/peios/using-peios/peiosutils/output-and-evaluation/expr.md): Evaluate an arithmetic, string, or comparison expression and print the result.
- [factor](/peios/using-peios/peiosutils/output-and-evaluation/factor.md): Print the prime factors of numbers.
- [test](/peios/using-peios/peiosutils/output-and-evaluation/test.md): Evaluate a condition — a file check or a comparison — and report the result as an exit status.
- [true and false](/peios/using-peios/peiosutils/output-and-evaluation/true-and-false.md): Two commands that do nothing — one always succeeds, the other always fails.
- [tee](/peios/using-peios/peiosutils/output-and-evaluation/tee.md): Copy standard input to standard output and to each named file at once.

## Hashing and encoding

- [Hashing and encoding](/peios/using-peios/peiosutils/hashing-and-encoding/overview.md): The commands that compute checksums and hashes to verify data integrity, and that encode binary data into text and back.
- [Checksum commands](/peios/using-peios/peiosutils/hashing-and-encoding/checksum-commands.md): md5sum, sha1sum, sha256sum and the rest — the family of commands that each compute and verify one fixed hash algorithm.
- [cksum](/peios/using-peios/peiosutils/hashing-and-encoding/cksum.md): The general checksum tool — compute or verify a digest with any of the supported algorithms.
- [sum](/peios/using-peios/peiosutils/hashing-and-encoding/sum.md): Compute a small, legacy block checksum of a file.
- [base32 and base64](/peios/using-peios/peiosutils/hashing-and-encoding/base32-and-base64.md): Encode binary data as text using the base32 or base64 alphabet, and decode it back.
- [basenc](/peios/using-peios/peiosutils/hashing-and-encoding/basenc.md): The general encoder — encode and decode data in base64, base32, base16, and several other encodings.

## System and processes

- [System and processes](/peios/using-peios/peiosutils/system-and-processes/overview.md): The commands that report on the system, run other commands in a managed way, signal processes, and work with time, terminals, and storage.
- [date](/peios/using-peios/peiosutils/system-and-processes/date.md): Print or set the system date and time, with a flexible output format.
- [sleep](/peios/using-peios/peiosutils/system-and-processes/sleep.md): Pause for a given length of time.
- [timeout](/peios/using-peios/peiosutils/system-and-processes/timeout.md): Run a command and kill it if it is still running after a time limit.
- [nohup](/peios/using-peios/peiosutils/system-and-processes/nohup.md): Run a command so it keeps running after the terminal closes — and how the nohup.out it creates is secured.
- [nice](/peios/using-peios/peiosutils/system-and-processes/nice.md): Run a command at an adjusted scheduling priority.
- [kill](/peios/using-peios/peiosutils/system-and-processes/kill.md): Send a signal to a process.
- [uname](/peios/using-peios/peiosutils/system-and-processes/uname.md): Print system information — the operating system, the kernel, and the machine.
- [arch](/peios/using-peios/peiosutils/system-and-processes/arch.md): Print the machine's hardware architecture.
- [hostname](/peios/using-peios/peiosutils/system-and-processes/hostname.md): Display or set the system's host name.
- [hostid](/peios/using-peios/peiosutils/system-and-processes/hostid.md): Print the host's numeric identifier.
- [nproc](/peios/using-peios/peiosutils/system-and-processes/nproc.md): Print how many processor cores are available.
- [uptime](/peios/using-peios/peiosutils/system-and-processes/uptime.md): Show how long the system has been running.
- [sync](/peios/using-peios/peiosutils/system-and-processes/sync.md): Flush cached writes out to persistent storage.
- [tty](/peios/using-peios/peiosutils/system-and-processes/tty.md): Print the name of the terminal connected to standard input.
- [stty](/peios/using-peios/peiosutils/system-and-processes/stty.md): Display or change terminal settings.
- [stdbuf](/peios/using-peios/peiosutils/system-and-processes/stdbuf.md): Run a command with altered buffering on its standard streams.
- [chroot](/peios/using-peios/peiosutils/system-and-processes/chroot.md): Run a command with a different directory as its root.
- [whoami](/peios/using-peios/peiosutils/system-and-processes/whoami.md): Print the name of the user a process is running as.
- [id](/peios/using-peios/peiosutils/system-and-processes/id.md): Print the user and group identity of a process, or of a named user.
- [groups](/peios/using-peios/peiosutils/system-and-processes/groups.md): Print the groups a user belongs to.
- [logname](/peios/using-peios/peiosutils/system-and-processes/logname.md): Print the login name of the user a process is running as.
- [token](/peios/using-peios/peiosutils/system-and-processes/token.md): The token command inspects and manipulates tokens — reading a token's contents, adjusting it, duplicating and restricting it, and driving impersonation.
- [logonse](/peios/using-peios/peiosutils/system-and-processes/logonse.md): The logonse command lists logon sessions and their processes, creates and destroys them, and sets a process's mitigation flags.

## Disks and mounts

- [mount](/peios/using-peios/peiosutils/disks-and-mounts/mount.md): Attach a filesystem to the Peios mount tree — new mounts, binds, moves, remounts and propagation changes — and apply a KACS mount policy at mount time.
- [umount](/peios/using-peios/peiosutils/disks-and-mounts/umount.md): Detach a filesystem from the Peios mount tree by mount point or by source, with lazy, forced, recursive and all-targets variants.
- [lsblk](/peios/using-peios/peiosutils/disks-and-mounts/lsblk.md): List block devices as a tree, flat list, JSON or key=value pairs — with filesystem identity, topology, and SD-derived owner and mode columns.

## Boot images

- [mkirf](/peios/using-peios/peiosutils/boot-images/mkirf.md): Compile the /boot/initramfs/ source tree into a deterministic cpio initramfs image, resolving hook order and validating the layout. Has a watch mode.
- [mkuki](/peios/using-peios/peiosutils/boot-images/mkuki.md): Build a UEFI unified kernel image — kernel, initramfs, and command line appended as PE sections onto an EFI stub. Has a watch mode.

## Registry tools

- [reg](/peios/using-peios/peiosutils/registry-tools/reg.md): The reg command reads and writes the live registry — values, keys, layers, links, security descriptors, watches, and atomic batches.
- [regman](/peios/using-peios/peiosutils/registry-tools/regman.md): regman documents what a registry key or value means — type, default, valid range, and when a change applies — from shipped docs, never the live registry.
