blockdev

title: blockdev(8)

text:
# blockdev(8)

## NAME
blockdev - call block device ioctls from the command line

## SYNOPSIS
blockdev [-q] [-v] command [command...] device [device...]

blockdev --report [device...]

blockdev -h|-V

## DESCRIPTION
The utility blockdev allows one to call block device ioctls from the command line.

## OPTIONS
-q

Be quiet.

-v

Be verbose.

--report

Print a report for the specified device. It is possible to give multiple devices. If none is given, all devices which appear in /proc/partitions are shown. Note that the partition StartSec is in 512-byte sectors.

-h, --help

Display help text and exit.

-V, --version

Print version and exit.

## COMMANDS
It is possible to give multiple devices and multiple commands.

--flushbufs

Flush buffers.

--getalignoff

Get alignment offset.

--getbsz

Print the blocksize in bytes. This size does not describe device topology. It’s the size used internally by the kernel and it may be modified (for example) by filesystem driver on mount.

--getdiscardzeroes

Get discard zeroes support status.

--getdiskseq

Get disk sequence number.

--getfra

Get filesystem readahead in 512-byte sectors.

--getiomin

Get minimum I/O size.

--getioopt

Get optimal I/O size.

--getmaxsect

Get max sectors per request.

--getpbsz

Get physical block (sector) size.

--getra

Print readahead (in 512-byte sectors).

--getro

Get read-only. Print 1 if the device is read-only, 0 otherwise.

--getsize64

Print device size in bytes.

--getsize

Print device size (32-bit!) in sectors. Deprecated in favor of the --getsz option.

--getss

Print logical sector size in bytes - usually 512.

--getsz

Get size in 512-byte sectors.

--rereadpt

Reread partition table

--setbsz bytes

Set blocksize. Note that the block size is specific to the current file descriptor opening the block device, so the change of block size only persists for as long as blockdev has the device open, and is lost once blockdev exits.

--setfra sectors

Set filesystem readahead (same as --setra on 2.6 kernels).

--setra sectors

Set readahead (in 512-byte sectors).

--setro

Set read-only. The currently active access to the device may not be affected by the change. For example, a filesystem already mounted in read-write mode will not be affected. The change applies after remount.

--setrw

Set read-write.

## AUTHORS
blockdev was written by Andries E. Brouwer and rewritten by Karel Zak.

## REPORTING BUGS
For bug reports, use the issue tracker at <https://github.com/util-linux/util-linux/issues>.

## AVAILABILITY
The blockdev command is part of the util-linux package which can be downloaded from Linux Kernel Archive <https://www.kernel.org/pub/linux/utils/util-linux/>.


chcpu

package: util-linux

title: chcpu(8)

summary: configure CPUs

text:
# chcpu(8)

## NAME
chcpu - configure CPUs

## SYNOPSIS
chcpu -c|-d|-e|-g cpu-list

chcpu -p mode

chcpu -r|-h|-V

## DESCRIPTION
chcpu can modify the state of CPUs. It can enable or disable CPUs, scan for new CPUs, change the CPU dispatching mode of the underlying hypervisor, and request CPUs from the hypervisor (configure) or return CPUs to the hypervisor (deconfigure).

Some options have a cpu-list argument. Use this argument to specify a comma-separated list of CPUs. The list can contain individual CPU addresses or ranges of addresses. For example, 0,5,7,9-11 makes the command applicable to the CPUs with the addresses 0, 5, 7, 9, 10, and 11.

## OPTIONS
-c, --configure cpu-list

Configure the specified CPUs. Configuring a CPU means that the hypervisor takes a CPU from the CPU pool and assigns it to the virtual hardware on which your kernel runs.

-d, --disable cpu-list

Disable the specified CPUs. Disabling a CPU means that the kernel sets it offline.

-e, --enable cpu-list

Enable the specified CPUs. Enabling a CPU means that the kernel sets it online. A CPU must be configured, see -c, before it can be enabled.

-g, --deconfigure cpu-list

Deconfigure the specified CPUs. Deconfiguring a CPU means that the hypervisor removes the CPU from the virtual hardware on which the Linux instance runs and returns it to the CPU pool. A CPU must be offline, see -d, before it can be deconfigured.

-p, --dispatch mode

Set the CPU dispatching mode (polarization). This option has an effect only if your hardware architecture and hypervisor support CPU polarization. Available modes are: horizontal

The workload is spread across all available CPUs.

vertical

The workload is concentrated on few CPUs.

-r, --rescan

Trigger a rescan of CPUs. After a rescan, the Linux kernel recognizes the new CPUs. Use this option on systems that do not automatically detect newly attached CPUs.

-h, --help

Display help text and exit.

-V, --version

Print version and exit.

## EXIT STATUS
chcpu has the following exit status values:

0

success

1

failure

64

partial success

## AUTHORS
Heiko Carstens <heiko.carstens@de.ibm.com>

## COPYRIGHT
Copyright IBM Corp. 2011

## SEE ALSO
lscpu(1)

## REPORTING BUGS
For bug reports, use the issue tracker at <https://github.com/util-linux/util-linux/issues>.

## AVAILABILITY
The chcpu command is part of the util-linux package which can be downloaded from Linux Kernel Archive <https://www.kernel.org/pub/linux/utils/util-linux/>.

branch: sisyphus


chmem

title: chmem(8)

summary: configure memory

text:
# chmem(8)

## NAME
chmem - configure memory

## SYNOPSIS
chmem [-h] [-V*] [-v] [-e|-d] [SIZE|RANGE -b BLOCKRANGE] [-z ZONE]

## DESCRIPTION
The chmem command sets a particular size or range of memory online or offline.

•Specify SIZE as <size>[m|M|g|G]. With m or M, <size> specifies the memory size in MiB (1024 x 1024 bytes). With g or G, <size> specifies the memory size in GiB (1024 x 1024 x 1024 bytes). The default unit is MiB.

•Specify RANGE in the form 0x<start>-0x<end> as shown in the output of the lsmem(1) command. <start> is the hexadecimal address of the first byte and <end> is the hexadecimal address of the last byte in the memory range.

•Specify BLOCKRANGE in the form <first>-<last> or <block> as shown in the output of the lsmem(1) command. <first> is the number of the first memory block and <last> is the number of the last memory block in the memory range. Alternatively a single block can be specified. BLOCKRANGE requires the --blocks option.

•Specify ZONE as the name of a memory zone, as shown in the output of the lsmem -o +ZONES command. The output shows one or more valid memory zones for each memory range. If multiple zones are shown, then the memory range currently belongs to the first zone. By default, chmem will set memory online to the zone Movable, if this is among the valid zones. This default can be changed by specifying the --zone option with another valid zone. For memory ballooning, it is recommended to select the zone Movable for memory online and offline, if possible. Memory in this zone is much more likely to be able to be offlined again, but it cannot be used for arbitrary kernel allocations, only for migratable pages (e.g., anonymous and page cache pages). Use the --help option to see all available zones.

SIZE and RANGE must be aligned to the Linux memory block size, as shown in the output of the lsmem(1) command.

Setting memory online can fail for various reasons. On virtualized systems it can fail if the hypervisor does not have enough memory left, for example because memory was overcommitted. Setting memory offline can fail if Linux cannot free the memory. If only part of the requested memory can be set online or offline, a message tells you how much memory was set online or offline instead of the requested amount.

When setting memory online chmem starts with the lowest memory block numbers. When setting memory offline chmem starts with the highest memory block numbers.

## OPTIONS
-b, --blocks

Use a BLOCKRANGE parameter instead of RANGE or SIZE for the --enable and --disable options.

-d, --disable

Set the specified RANGE, SIZE, or BLOCKRANGE of memory offline.

-e, --enable

Set the specified RANGE, SIZE, or BLOCKRANGE of memory online.

-z, --zone

Select the memory ZONE where to set the specified RANGE, SIZE, or BLOCKRANGE of memory online or offline. By default, memory will be set online to the zone Movable, if possible.

-v, --verbose

Verbose mode. Causes chmem to print debugging messages about it’s progress.

-h, --help

Display help text and exit.

-V, --version

Print version and exit.

## EXIT STATUS
chmem has the following exit status values:

0

success

1

failure

64

partial success

## EXAMPLE
chmem --enable 1024

This command requests 1024 MiB of memory to be set online.

chmem -e 2g

This command requests 2 GiB of memory to be set online.

chmem --disable 0x00000000e4000000-0x00000000f3ffffff

This command requests the memory range starting with 0x00000000e4000000 and ending with 0x00000000f3ffffff to be set offline.

chmem -b -d 10

This command requests the memory block number 10 to be set offline.

## SEE ALSO
lsmem(1)

## REPORTING BUGS
For bug reports, use the issue tracker at <https://github.com/util-linux/util-linux/issues>.

## AVAILABILITY
The chmem command is part of the util-linux package which can be downloaded from Linux Kernel Archive <https://www.kernel.org/pub/linux/utils/util-linux/>.


ctrlaltdel

title: ctrlaltdel(8)

summary: set the function of the Ctrl\-Alt\-Del combination

text:
# ctrlaltdel(8)

## NAME
ctrlaltdel - set the function of the Ctrl-Alt-Del combination

## SYNOPSIS
ctrlaltdel hard|soft

## DESCRIPTION
Based on examination of the linux/kernel/reboot.c code, it is clear that there are two supported functions that the <Ctrl-Alt-Del> sequence can perform.

hard

Immediately reboot the computer without calling sync(2) and without any other preparation. This is the default.

soft

Make the kernel send the SIGINT (interrupt) signal to the init process (this is always the process with PID 1). If this option is used, the init(8) program must support this feature. Since there are now several init(8) programs in the Linux community, please consult the documentation for the version that you are currently using.

When the command is run without any argument, it will display the current setting.

The function of ctrlaltdel is usually set in the /etc/rc.local file.

## OPTIONS
-h, --help

Display help text and exit.

-V, --version

Print version and exit.

## FILES
/etc/rc.local

## AUTHORS
Peter Orbaek <poe@daimi.aau.dk>

## SEE ALSO
init(8), systemd(1)

## REPORTING BUGS
For bug reports, use the issue tracker at <https://github.com/util-linux/util-linux/issues>.

## AVAILABILITY
The ctrlaltdel command is part of the util-linux package which can be downloaded from Linux Kernel Archive <https://www.kernel.org/pub/linux/utils/util-linux/>.


findfs

title: findfs(8)

summary: find a filesystem by label or UUID

text:
# findfs(8)

## NAME
findfs - find a filesystem by label or UUID

## SYNOPSIS
findfs NAME=value

## DESCRIPTION
findfs will search the block devices in the system looking for a filesystem or partition with specified tag. The currently supported tags are:

LABEL=<label>

Specifies filesystem label.

UUID=<uuid>

Specifies filesystem UUID.

PARTUUID=<uuid>

Specifies partition UUID. This partition identifier is supported for example for GUID Partition Table (GPT) partition tables.

PARTLABEL=<label>

Specifies partition label (name). The partition labels are supported for example for GUID Partition Table (GPT) or MAC partition tables.

If the filesystem or partition is found, the device name will be printed on stdout.

The complete overview about filesystems and partitions you can get for example by

lsblk --fs

partx --show <disk>

blkid

-h, --help

Display help text and exit.

-V, --version

Print version and exit.

## EXIT STATUS
0

success

1

label or uuid cannot be found

2

usage error, wrong number of arguments or unknown option

## ENVIRONMENT
LIBBLKID_DEBUG=all

enables libblkid debug output.

## AUTHORS
findfs was originally written by Theodore Ts’o <tytso@mit.edu> and re-written for the util-linux package by Karel Zak <kzak@redhat.com>.

## SEE ALSO
blkid(8), lsblk(8), partx(8)

## REPORTING BUGS
For bug reports, use the issue tracker at <https://github.com/util-linux/util-linux/issues>.

## AVAILABILITY
The findfs command is part of the util-linux package which can be downloaded from Linux Kernel Archive <https://www.kernel.org/pub/linux/utils/util-linux/>.


findmnt

title: findmnt(8)

summary: find a filesystem

text:
# findmnt(8)

## NAME
findmnt - find a filesystem

## SYNOPSIS
findmnt [options]

findmnt [options] device|mountpoint

findmnt [options] [--source] device [--target path|--mountpoint mountpoint]

## DESCRIPTION
findmnt will list all mounted filesystems or search for a filesystem. The findmnt command is able to search in /etc/fstab, /etc/mtab or /proc/self/mountinfo. If device or mountpoint is not given, all filesystems are shown.

The device may be specified by device name, major:minor numbers, filesystem label or UUID, or partition label or UUID. Note that findmnt follows mount(8) behavior where a device name may be interpreted as a mountpoint (and vice versa) if the --target, --mountpoint or --source options are not specified.

The command-line option --target accepts any file or directory and then findmnt displays the filesystem for the given path.

The command prints all mounted filesystems in the tree-like format by default. The default output, is subject to change. So whenever possible, you should avoid using default output in your scripts. Always explicitly define expected columns by using --output columns-list in environments where a stable output is required.

The relationship between block devices and filesystems is not always one-to-one. The filesystem may use more block devices. This is why findmnt provides SOURCE and SOURCES (pl.) columns. The column SOURCES displays all devices where it is possible to find the same filesystem UUID (or another tag specified in fstab when executed with --fstab and --evaluate).

## OPTIONS
-A, --all

Disable all built-in filters and print all filesystems.

-a, --ascii

Use ascii characters for tree formatting.

-b, --bytes

Print the sizes in bytes rather than in a human-readable format. By default, the unit, sizes are expressed in, is byte, and unit prefixes are in power of 2^10 (1024). Abbreviations of symbols are exhibited truncated in order to reach a better readability, by exhibiting alone the first letter of them; examples: "1 KiB" and "1 MiB" are respectively exhibited as "1 K" and "1 M", then omitting on purpose the mention "iB", which is part of these abbreviations.

-C, --nocanonicalize

Do not canonicalize paths at all. This option affects the comparing of paths and the evaluation of tags (LABEL, UUID, etc.).

-c, --canonicalize

Canonicalize all printed paths.

--deleted

Print filesystems where target (mountpoint) is marked as deleted by kernel.

-D, --df

Imitate the output of df(1). This option is equivalent to -o SOURCE,FSTYPE,SIZE,USED,AVAIL,USE%,TARGET but excludes all pseudo filesystems. Use --all to print all filesystems.

-d, --direction word

The search direction, either forward or backward.

-e, --evaluate

Convert all tags (LABEL, UUID, PARTUUID, or PARTLABEL) to the corresponding device names for the SOURCE column. It’s an unusual situation, but the same tag may be duplicated (used for more devices). For this purpose, there is SOURCES (pl.) column. This column displays by multi-line cell all devices where the tag is detected by libblkid. This option makes sense for fstab only.

-F, --tab-file path

Search in an alternative file. If used with --fstab, --mtab or --kernel, then it overrides the default paths. If specified more than once, then tree-like output is disabled (see the --list option).

-f, --first-only

Print the first matching filesystem only.

-i, --invert

Invert the sense of matching.

-J, --json

Use JSON output format.

-k, --kernel

Search in /proc/self/mountinfo. The output is in the tree-like format. This is the default. The output contains only mount options maintained by kernel (see also --mtab).

-l, --list

Use the list output format. This output format is automatically enabled if the output is restricted by the -t, -O, -S or -T option and the option --submounts is not used or if more that one source file (the option -F) is specified.

-M, --mountpoint path

Explicitly define the mountpoint file or directory. See also --target.

-m, --mtab

Search in /etc/mtab. The output is in the list format by default (see --tree). The output may include user space mount options.

-N, --task tid

Use alternative namespace /proc/<tid>/mountinfo rather than the default /proc/self/mountinfo. If the option is specified more than once, then tree-like output is disabled (see the --list option). See also the unshare(1) command.

-n, --noheadings

Do not print a header line.

-O, --options list

Limit the set of printed filesystems. More than one option may be specified in a comma-separated list. The -t and -O options are cumulative in effect. It is different from -t in that each option is matched exactly; a leading no at the beginning does not have global meaning. The "no" can used for individual items in the list. The "no" prefix interpretation can be disabled by "+" prefix.

-o, --output list

Define output columns. See the --help output to get a list of the currently supported columns. The TARGET column contains tree formatting if the --list or --raw options are not specified. The default list of columns may be extended if list is specified in the format +list (e.g., findmnt -o +PROPAGATION).

--output-all

Output almost all available columns. The columns that require --poll are not included.

-P, --pairs

Produce output in the form of key="value" pairs. All potentially unsafe value characters are hex-escaped (\x<code>). See also option --shell.

-p, --poll[=list]

Monitor changes in the /proc/self/mountinfo file. Supported actions are: mount, umount, remount and move. More than one action may be specified in a comma-separated list. All actions are monitored by default. The time for which --poll will block can be restricted with the --timeout or --first-only options.

The standard columns always use the new version of the information from the mountinfo file, except the umount action which is based on the original information cached by findmnt. The poll mode allows using extra columns:

ACTION

mount, umount, move or remount action name; this column is enabled by default

OLD-TARGET

available for umount and move actions

OLD-OPTIONS

available for umount and remount actions

--pseudo

Print only pseudo filesystems.

--shadow

Print only filesystems over-mounted by another filesystem.

-R, --submounts

Print recursively all submounts for the selected filesystems. The restrictions defined by options -t, -O, -S, -T and --direction are not applied to submounts. All submounts are always printed in tree-like order. The option enables the tree-like output format by default. This option has no effect for --mtab or --fstab.

-r, --raw

Use raw output format. All potentially unsafe characters are hex-escaped (\x<code>).

--real

Print only real filesystems.

-S, --source spec

Explicitly define the mount source. Supported specifications are device, maj:min, LABEL=label, UUID=uuid, PARTLABEL=label and PARTUUID=uuid.

-s, --fstab

Search in /etc/fstab. The output is in the list format (see --list).

-T, --target path

Define the mount target. If path is not a mountpoint file or directory, then findmnt checks the path elements in reverse order to get the mountpoint (this feature is supported only when searching in kernel files and unsupported for --fstab). It’s recommended to use the option --mountpoint when checks of path elements are unwanted and path is a strictly specified mountpoint.

-t, --types list

Limit the set of printed filesystems. More than one type may be specified in a comma-separated list. The list of filesystem types can be prefixed with no to specify the filesystem types on which no action should be taken. For more details see mount(8).

--tree

Enable tree-like output if possible. The options is silently ignored for tables where is missing child-parent relation (e.g., fstab).

--shadowed

Print only filesystems over-mounted by another filesystem.

-U, --uniq

Ignore filesystems with duplicate mount targets, thus effectively skipping over-mounted mount points.

-u, --notruncate

Do not truncate text in columns. The default is to not truncate the TARGET, SOURCE, UUID, LABEL, PARTUUID, PARTLABEL columns. This option disables text truncation also in all other columns.

-v, --nofsroot

Do not print a [/dir] in the SOURCE column for bind mounts or btrfs subvolumes.

-w, --timeout milliseconds

Specify an upper limit on the time for which --poll will block, in milliseconds.

-x, --verify

Check mount table content. The default is to verify /etc/fstab parsability and usability. It’s possible to use this option also with --tab-file. It’s possible to specify source (device) or target (mountpoint) to filter mount table. The option --verbose forces findmnt to print more details.

--verbose

Force findmnt to print more information (--verify only for now).

--vfs-all

When used with VFS-OPTIONS column, print all VFS (fs-independent) flags. This option is designed for auditing purposes to list also default VFS kernel mount options which are normally not listed.

-y, --shell

The column name will be modified to contain only characters allowed for shell variable identifiers. This is usable, for example, with --pairs. Note that this feature has been automatically enabled for --pairs in version 2.37, but due to compatibility issues, now it’s necessary to request this behavior by --shell.

-h, --help

Display help text and exit.

-V, --version

Print version and exit.

## EXIT STATUS
The exit value is 0 if there is something to display, or 1 on any error (for example if no filesystem is found based on the user’s filter specification, or the device path or mountpoint does not exist).

## ENVIRONMENT
LIBMOUNT_FSTAB=<path>

overrides the default location of the fstab file

LIBMOUNT_MTAB=<path>

overrides the default location of the mtab file

LIBMOUNT_DEBUG=all

enables libmount debug output

LIBSMARTCOLS_DEBUG=all

enables libsmartcols debug output

LIBSMARTCOLS_DEBUG_PADDING=on

use visible padding characters.

## EXAMPLES
findmnt --fstab -t nfs

Prints all NFS filesystems defined in /etc/fstab.

findmnt --fstab /mnt/foo

Prints all /etc/fstab filesystems where the mountpoint directory is /mnt/foo. It also prints bind mounts where /mnt/foo is a source.

findmnt --fstab --target /mnt/foo

Prints all /etc/fstab filesystems where the mountpoint directory is /mnt/foo.

findmnt --fstab --evaluate

Prints all /etc/fstab filesystems and converts LABEL= and UUID= tags to the real device names.

findmnt -n --raw --evaluate --output=target LABEL=/boot

Prints only the mountpoint where the filesystem with label "/boot" is mounted.

findmnt --poll --mountpoint /mnt/foo

Monitors mount, unmount, remount and move on /mnt/foo.

findmnt --poll=umount --first-only --mountpoint /mnt/foo

Waits for /mnt/foo unmount.

findmnt --poll=remount -t ext3 -O ro

Monitors remounts to read-only mode on all ext3 filesystems.

## AUTHORS
Karel Zak <kzak@redhat.com>

## SEE ALSO
fstab(5), mount(8)

## REPORTING BUGS
For bug reports, use the issue tracker at <https://github.com/util-linux/util-linux/issues>.

## AVAILABILITY
The findmnt command is part of the util-linux package which can be downloaded from Linux Kernel Archive <https://www.kernel.org/pub/linux/utils/util-linux/>.


fsck

title: fsck(8)

summary: check and repair a Linux filesystem

text:
# fsck(8)

## NAME
fsck - check and repair a Linux filesystem

## SYNOPSIS
fsck [-lsAVRTMNP] [-r [fd]] [-C [fd]] [-t fstype] [filesystem...] [--] [fs-specific-options]

## DESCRIPTION
fsck is used to check and optionally repair one or more Linux filesystems. filesystem can be a device name (e.g., /dev/hdc1, /dev/sdb2), a mount point (e.g., /, /usr, /home), or a filesystem label or UUID specifier (e.g., UUID=8868abf6-88c5-4a83-98b8-bfc24057f7bd or LABEL=root). Normally, the fsck program will try to handle filesystems on different physical disk drives in parallel to reduce the total amount of time needed to check all of them.

If no filesystems are specified on the command line, and the -A option is not specified, fsck will default to checking filesystems in /etc/fstab serially. This is equivalent to the -As options.

The exit status returned by fsck is the sum of the following conditions:

0

No errors

1

Filesystem errors corrected

2

System should be rebooted

4

Filesystem errors left uncorrected

8

Operational error

16

Usage or syntax error

32

Checking canceled by user request

128

Shared-library error

The exit status returned when multiple filesystems are checked is the bit-wise OR of the exit statuses for each filesystem that is checked.

In actuality, fsck is simply a front-end for the various filesystem checkers (fsck.fstype) available under Linux. The filesystem-specific checker is searched for in the PATH environment variable. If the PATH is undefined then fallback to /sbin.

Please see the filesystem-specific checker manual pages for further details.

## OPTIONS
-l

Create an exclusive flock(2) lock file (/run/fsck/<diskname>.lock) for whole-disk device. This option can be used with one device only (this means that -A and -l are mutually exclusive). This option is recommended when more fsck instances are executed in the same time. The option is ignored when used for multiple devices or for non-rotating disks. fsck does not lock underlying devices when executed to check stacked devices (e.g. MD or DM) - this feature is not implemented yet.

-r [fd]

Report certain statistics for each fsck when it completes. These statistics include the exit status, the maximum run set size (in kilobytes), the elapsed all-clock time and the user and system CPU time used by the fsck run. For example: /dev/sda1: status 0, rss 92828, real 4.002804, user 2.677592, sys 0.86186

GUI front-ends may specify a file descriptor fd, in which case the progress bar information will be sent to that file descriptor in a machine parsable format. For example:

/dev/sda1 0 92828 4.002804 2.677592 0.86186

-s

Serialize fsck operations. This is a good idea if you are checking multiple filesystems and the checkers are in an interactive mode. (Note: e2fsck(8) runs in an interactive mode by default. To make e2fsck(8) run in a non-interactive mode, you must either specify the -p or -a option, if you wish for errors to be corrected automatically, or the -n option if you do not.)

-t fslist

Specifies the type(s) of filesystem to be checked. When the -A flag is specified, only filesystems that match fslist are checked. The fslist parameter is a comma-separated list of filesystems and options specifiers. All of the filesystems in this comma-separated list may be prefixed by a negation operator 'no' or '!', which requests that only those filesystems not listed in fslist will be checked. If none of the filesystems in fslist is prefixed by a negation operator, then only those listed filesystems will be checked. Options specifiers may be included in the comma-separated fslist. They must have the format opts=fs-option. If an options specifier is present, then only filesystems which contain fs-option in their mount options field of /etc/fstab will be checked. If the options specifier is prefixed by a negation operator, then only those filesystems that do not have fs-option in their mount options field of /etc/fstab will be checked.

For example, if opts=ro appears in fslist, then only filesystems listed in /etc/fstab with the ro option will be checked.

For compatibility with Mandrake distributions whose boot scripts depend upon an unauthorized UI change to the fsck program, if a filesystem type of loop is found in fslist, it is treated as if opts=loop were specified as an argument to the -t option.

Normally, the filesystem type is deduced by searching for filesys in the /etc/fstab file and using the corresponding entry. If the type cannot be deduced, and there is only a single filesystem given as an argument to the -t option, fsck will use the specified filesystem type. If this type is not available, then the default filesystem type (currently ext2) is used.

-A

Walk through the /etc/fstab file and try to check all filesystems in one run. This option is typically used from the /etc/rc system initialization file, instead of multiple commands for checking a single filesystem. The root filesystem will be checked first unless the -P option is specified (see below). After that, filesystems will be checked in the order specified by the fs_passno (the sixth) field in the /etc/fstab file. Filesystems with a fs_passno value of 0 are skipped and are not checked at all. Filesystems with a fs_passno value of greater than zero will be checked in order, with filesystems with the lowest fs_passno number being checked first. If there are multiple filesystems with the same pass number, fsck will attempt to check them in parallel, although it will avoid running multiple filesystem checks on the same physical disk.

fsck does not check stacked devices (RAIDs, dm-crypt, ...) in parallel with any other device. See below for FSCK_FORCE_ALL_PARALLEL setting. The /sys filesystem is used to determine dependencies between devices.

Hence, a very common configuration in /etc/fstab files is to set the root filesystem to have a fs_passno value of 1 and to set all other filesystems to have a fs_passno value of 2. This will allow fsck to automatically run filesystem checkers in parallel if it is advantageous to do so. System administrators might choose not to use this configuration if they need to avoid multiple filesystem checks running in parallel for some reason - for example, if the machine in question is short on memory so that excessive paging is a concern.

fsck normally does not check whether the device actually exists before calling a filesystem specific checker. Therefore non-existing devices may cause the system to enter filesystem repair mode during boot if the filesystem specific checker returns a fatal error. The /etc/fstab mount option nofail may be used to have fsck skip non-existing devices. fsck also skips non-existing devices that have the special filesystem type auto.

-C [fd]

Display completion/progress bars for those filesystem checkers (currently only for ext[234]) which support them. fsck will manage the filesystem checkers so that only one of them will display a progress bar at a time. GUI front-ends may specify a file descriptor fd, in which case the progress bar information will be sent to that file descriptor.

-M

Do not check mounted filesystems and return an exit status of 0 for mounted filesystems.

-N

Don’t execute, just show what would be done.

-P

When the -A flag is set, check the root filesystem in parallel with the other filesystems. This is not the safest thing in the world to do, since if the root filesystem is in doubt things like the e2fsck(8) executable might be corrupted! This option is mainly provided for those sysadmins who don’t want to repartition the root filesystem to be small and compact (which is really the right solution).

-R

When checking all filesystems with the -A flag, skip the root filesystem. (This is useful in case the root filesystem has already been mounted read-write.)

-T

Don’t show the title on startup.

-V

Produce verbose output, including all filesystem-specific commands that are executed.

-?, --help

Display help text and exit.

--version

Display version information and exit.

## FILESYSTEM SPECIFIC OPTIONS
Options which are not understood by fsck are passed to the filesystem-specific checker!

These options must not take arguments, as there is no way for fsck to be able to properly guess which options take arguments and which don’t.

Options and arguments which follow the -- are treated as filesystem-specific options to be passed to the filesystem-specific checker.

Please note that fsck is not designed to pass arbitrarily complicated options to filesystem-specific checkers. If you’re doing something complicated, please just execute the filesystem-specific checker directly. If you pass fsck some horribly complicated options and arguments, and it doesn’t do what you expect, don’t bother reporting it as a bug. You’re almost certainly doing something that you shouldn’t be doing with fsck. Options to different filesystem-specific fsck’s are not standardized.

## ENVIRONMENT
The fsck program’s behavior is affected by the following environment variables:

FSCK_FORCE_ALL_PARALLEL

If this environment variable is set, fsck will attempt to check all of the specified filesystems in parallel, regardless of whether the filesystems appear to be on the same device. (This is useful for RAID systems or high-end storage systems such as those sold by companies such as IBM or EMC.) Note that the fs_passno value is still used.

FSCK_MAX_INST

This environment variable will limit the maximum number of filesystem checkers that can be running at one time. This allows configurations which have a large number of disks to avoid fsck starting too many filesystem checkers at once, which might overload CPU and memory resources available on the system. If this value is zero, then an unlimited number of processes can be spawned. This is currently the default, but future versions of fsck may attempt to automatically determine how many filesystem checks can be run based on gathering accounting data from the operating system.

PATH

The PATH environment variable is used to find filesystem checkers.

FSTAB_FILE

This environment variable allows the system administrator to override the standard location of the /etc/fstab file. It is also useful for developers who are testing fsck.

LIBBLKID_DEBUG=all

enables libblkid debug output.

LIBMOUNT_DEBUG=all

enables libmount debug output.

## FILES
/etc/fstab

## AUTHORS
Theodore Ts’o <tytso@mit.edu>>, Karel Zak <kzak@redhat.com>

## SEE ALSO
fstab(5), mkfs(8), fsck.ext2(8) or fsck.ext3(8) or e2fsck(8), fsck.cramfs(8), fsck.jfs(8), fsck.nfs(8), fsck.minix(8), fsck.msdos(8), fsck.vfat(8), fsck.xfs(8), reiserfsck(8)

## REPORTING BUGS
For bug reports, use the issue tracker at <https://github.com/util-linux/util-linux/issues>.

## AVAILABILITY
The fsck command is part of the util-linux package which can be downloaded from Linux Kernel Archive <https://www.kernel.org/pub/linux/utils/util-linux/>.


fsck.cramfs

title: fsck.cramfs(8)

summary: fsck compressed ROM file system

text:
# fsck.cramfs(8)

## NAME
fsck.cramfs - fsck compressed ROM file system

## SYNOPSIS
fsck.cramfs [options] file

## DESCRIPTION
fsck.cramfs is used to check the cramfs file system.

## OPTIONS
-v, --verbose

Enable verbose messaging.

-b, --blocksize blocksize

Use this blocksize, defaults to page size. Must be equal to what was set at creation time. Only used for --extract.

--extract[=directory]

Test to uncompress the whole file system. Optionally extract contents of the file to directory.

-a

This option is silently ignored.

-y

This option is silently ignored.

-h, --help

Display help text and exit.

-V, --version

Print version and exit.

## EXIT STATUS
0

success

4

file system was left uncorrected

8

operation error, such as unable to allocate memory

16

usage information was printed

## SEE ALSO
mount(8), mkfs.cramfs(8)

## REPORTING BUGS
For bug reports, use the issue tracker at <https://github.com/util-linux/util-linux/issues>.

## AVAILABILITY
The fsck.cramfs command is part of the util-linux package which can be downloaded from Linux Kernel Archive <https://www.kernel.org/pub/linux/utils/util-linux/>.


fsfreeze

title: fsfreeze(8)

text:
# fsfreeze(8)

## NAME
fsfreeze - suspend access to a filesystem (Ext3/4, ReiserFS, JFS, XFS)

## SYNOPSIS
fsfreeze --freeze|--unfreeze mountpoint

## DESCRIPTION
fsfreeze suspends or resumes access to a filesystem.

fsfreeze halts any new access to the filesystem and creates a stable image on disk. fsfreeze is intended to be used with hardware RAID devices that support the creation of snapshots.

fsfreeze is unnecessary for device-mapper devices. The device-mapper (and LVM) automatically freezes a filesystem on the device when a snapshot creation is requested. For more details see the dmsetup(8) man page.

The mountpoint argument is the pathname of the directory where the filesystem is mounted. The filesystem must be mounted to be frozen (see mount(8)).

Note that access-time updates are also suspended if the filesystem is mounted with the traditional atime behavior (mount option strictatime, for more details see mount(8)).

## OPTIONS
-f, --freeze

This option requests the specified filesystem to be frozen from new modifications. When this is selected, all ongoing transactions in the filesystem are allowed to complete, new write(2) system calls are halted, other calls which modify the filesystem are halted, and all dirty data, metadata, and log information are written to disk. Any process attempting to write to the frozen filesystem will block waiting for the filesystem to be unfrozen. Note that even after freezing, the on-disk filesystem can contain information on files that are still in the process of unlinking. These files will not be unlinked until the filesystem is unfrozen or a clean mount of the snapshot is complete.

-u, --unfreeze

This option is used to un-freeze the filesystem and allow operations to continue. Any filesystem modifications that were blocked by the freeze are unblocked and allowed to complete.

-h, --help

Display help text and exit.

-V, --version

Print version and exit.

## FILESYSTEM SUPPORT
This command will work only if filesystem supports has support for freezing. List of these filesystems include (2016-12-18) btrfs, ext2/3/4, f2fs, jfs, nilfs2, reiserfs, and xfs. Previous list may be incomplete, as more filesystems get support. If in doubt easiest way to know if a filesystem has support is create a small loopback mount and test freezing it.

## NOTES
This man page is based on xfs_freeze(8).

## AUTHORS
Written by Hajime Taira.

## SEE ALSO
mount(8)

## REPORTING BUGS
For bug reports, use the issue tracker at <https://github.com/util-linux/util-linux/issues>.

## AVAILABILITY
The fsfreeze command is part of the util-linux package which can be downloaded from Linux Kernel Archive <https://www.kernel.org/pub/linux/utils/util-linux/>.


fstrim

title: fstrim(8)

text:
# fstrim(8)

## NAME
fstrim - discard unused blocks on a mounted filesystem

## SYNOPSIS
fstrim [-Aav] [-o offset] [-l length] [-m minimum-size] [mountpoint]

## DESCRIPTION
fstrim is used on a mounted filesystem to discard (or "trim") blocks which are not in use by the filesystem. This is useful for solid-state drives (SSDs) and thinly-provisioned storage.

By default, fstrim will discard all unused blocks in the filesystem. Options may be used to modify this behavior based on range or size, as explained below.

The mountpoint argument is the pathname of the directory where the filesystem is mounted and is required when -A, -a, --fstab, or --all are unspecified.

Running fstrim frequently, or even using mount -o discard, might negatively affect the lifetime of poor-quality SSD devices. For most desktop and server systems a sufficient trimming frequency is once a week. Note that not all devices support a queued trim, so each trim command incurs a performance penalty on whatever else might be trying to use the disk at the time.

## OPTIONS
The offset, length, and minimum-size arguments may be followed by the multiplicative suffixes KiB (=1024), MiB (=1024*1024), and so on for GiB, TiB, PiB, EiB, ZiB and YiB (the "iB" is optional, e.g., "K" has the same meaning as "KiB") or the suffixes KB (=1000), MB (=1000*1000), and so on for GB, TB, PB, EB, ZB and YB.

-A, --fstab

Trim all mounted filesystems mentioned in /etc/fstab on devices that support the discard operation. The root filesystem is determined from kernel command line if missing in the file. The other supplied options, like --offset, --length and --minimum, are applied to all these devices. Errors from filesystems that do not support the discard operation, read-only devices, autofs and read-only filesystems are silently ignored. Filesystems with "X-fstrim.notrim" mount option are skipped.

-a, --all

Trim all mounted filesystems on devices that support the discard operation. The other supplied options, like --offset, --length and --minimum, are applied to all these devices. Errors from filesystems that do not support the discard operation, read-only devices and read-only filesystems are silently ignored.

-n, --dry-run

This option does everything apart from actually call FITRIM ioctl.

-o, --offset offset

Byte offset in the filesystem from which to begin searching for free blocks to discard. The default value is zero, starting at the beginning of the filesystem.

-l, --length length

The number of bytes (after the starting point) to search for free blocks to discard. If the specified value extends past the end of the filesystem, fstrim will stop at the filesystem size boundary. The default value extends to the end of the filesystem.

-I, --listed-in list

Specifies a colon-separated list of files in fstab or kernel mountinfo format. All missing or empty files are silently ignored. The evaluation of the list stops after first non-empty file. For example: --listed-in /etc/fstab:/proc/self/mountinfo.

Filesystems with "X-fstrim.notrim" mount option in fstab are skipped.

-m, --minimum minimum-size

Minimum contiguous free range to discard, in bytes. (This value is internally rounded up to a multiple of the filesystem block size.) Free ranges smaller than this will be ignored and fstrim will adjust the minimum if it’s smaller than the device’s minimum, and report that (fstrim_range.minlen) back to userspace. By increasing this value, the fstrim operation will complete more quickly for filesystems with badly fragmented freespace, although not all blocks will be discarded. The default value is zero, discarding every free block.

-t, --types list

Specifies allowed or forbidden filesystem types when used with --all or --fstab. The list is a comma-separated list of the filesystem names. The list follows how mount -t evaluates type patterns. Only specified filesystem types are allowed. All specified types are forbidden if the list is prefixed by "no" or each filesystem prefixed by "no" is forbidden. If the option is not used, then all filesystems (except "autofs") are allowed.

-v, --verbose

Verbose execution. With this option fstrim will output the number of bytes passed from the filesystem down the block stack to the device for potential discard. This number is a maximum discard amount from the storage device’s perspective, because FITRIM ioctl called repeated will keep sending the same sectors for discard repeatedly. fstrim will report the same potential discard bytes each time, but only sectors which had been written to between the discards would actually be discarded by the storage device. Further, the kernel block layer reserves the right to adjust the discard ranges to fit raid stripe geometry, non-trim capable devices in a LVM setup, etc. These reductions would not be reflected in fstrim_range.len (the --length option).

--quiet-unsupported

Suppress error messages if trim operation (ioctl) is unsupported. This option is meant to be used in systemd service file or in cron(8) scripts to hide warnings that are result of known problems, such as NTFS driver reporting Bad file descriptor when device is mounted read-only, or lack of file system support for ioctl FITRIM call. This option also cleans exit status when unsupported filesystem specified on fstrim command line.

-h, --help

Display help text and exit.

-V, --version

Print version and exit.

## EXIT STATUS
0

success

1

failure

32

all failed

64

some filesystem discards have succeeded, some failed

The command fstrim --all returns 0 (all succeeded), 32 (all failed) or 64 (some failed, some succeeded).

## AUTHORS
Lukas Czerner <lczerner@redhat.com>, Karel Zak <kzak@redhat.com>

## SEE ALSO
blkdiscard(8), mount(8)

## REPORTING BUGS
For bug reports, use the issue tracker at <https://github.com/util-linux/util-linux/issues>.

## AVAILABILITY
The fstrim command is part of the util-linux package which can be downloaded from Linux Kernel Archive <https://www.kernel.org/pub/linux/utils/util-linux/>.


isosize

title: isosize(8)

text:
# isosize(8)

## NAME
isosize - output the length of an iso9660 filesystem

## SYNOPSIS
isosize [options] iso9660_image_file

## DESCRIPTION
This command outputs the length of an iso9660 filesystem that is contained in the specified file. This file may be a normal file or a block device (e.g. /dev/hdd or /dev/sr0). In the absence of any options (and errors), it will output the size of the iso9660 filesystem in bytes. This can now be a large number (>> 4 GB).

## OPTIONS
-x, --sectors

Show the block count and block size in human-readable form. The output uses the term "sectors" for "blocks".

-d, --divisor number

Only has an effect when -x is not given. The value shown (if no errors) is the iso9660 file size in bytes divided by number. So if number is the block size then the shown value will be the block count. The size of the file (or block device) holding an iso9660 filesystem can be marginally larger than the actual size of the iso9660 filesystem. One reason for this is that cd writers are allowed to add "run out" sectors at the end of an iso9660 image.

-h, --help

Display help text and exit.

-V, --version

Print version and exit.

## EXIT STATUS
0

success

1

generic failure, such as invalid usage

32

all failed

64

some failed

## REPORTING BUGS
For bug reports, use the issue tracker at <https://github.com/util-linux/util-linux/issues>.

## AVAILABILITY
The isosize command is part of the util-linux package which can be downloaded from Linux Kernel Archive <https://www.kernel.org/pub/linux/utils/util-linux/>.


ldattach

title: ldattach(8)

text:
# ldattach(8)

## NAME
ldattach - attach a line discipline to a serial line

## SYNOPSIS
ldattach [-1278denoVh] [-i iflag] [-s speed] ldisc device

## DESCRIPTION
The ldattach daemon opens the specified device file (which should refer to a serial device) and attaches the line discipline ldisc to it for processing of the sent and/or received data. It then goes into the background keeping the device open so that the line discipline stays loaded.

The line discipline ldisc may be specified either by name or by number.

In order to detach the line discipline, kill(1) the ldattach process.

With no arguments, ldattach prints usage information.

## LINE DISCIPLINES
Depending on the kernel release, the following line disciplines are supported:

TTY(0)

The default line discipline, providing transparent operation (raw mode) as well as the habitual terminal line editing capabilities (cooked mode).

SLIP(1)

Serial Line IP (SLIP) protocol processor for transmitting TCP/IP packets over serial lines.

MOUSE(2)

Device driver for RS232 connected pointing devices (serial mice).

PPP(3)

Point to Point Protocol (PPP) processor for transmitting network packets over serial lines.

STRIP(4); AX25(5); X25(6)

Line driver for transmitting X.25 packets over asynchronous serial lines.

6PACK(7); R3964(9)

Driver for Simatic R3964 module.

IRDA(11)

Linux IrDa (infrared data transmission) driver - see <http://irda.sourceforge.net/>

HDLC(13)

Synchronous HDLC driver.

SYNC_PPP(14)

Synchronous PPP driver.

HCI(15)

Bluetooth HCI UART driver.

GIGASET_M101(16)

Driver for Siemens Gigaset M101 serial DECT adapter.

PPS(18)

Driver for serial line Pulse Per Second (PPS) source.

GSM0710(21)

Driver for GSM 07.10 multiplexing protocol modem (CMUX).

## OPTIONS
-1, --onestopbit

Set the number of stop bits of the serial line to one.

-2, --twostopbits

Set the number of stop bits of the serial line to two.

-7, --sevenbits

Set the character size of the serial line to 7 bits.

-8, --eightbits

Set the character size of the serial line to 8 bits.

-d, --debug

Keep ldattach in the foreground so that it can be interrupted or debugged, and to print verbose messages about its progress to standard error output.

-e, --evenparity

Set the parity of the serial line to even.

-i, --iflag value...

Set the specified bits in the c_iflag word of the serial line. The given value may be a number or a symbolic name. If value is prefixed by a minus sign, the specified bits are cleared instead. Several comma-separated values may be given in order to set and clear multiple bits.

-n, --noparity

Set the parity of the serial line to none.

-o, --oddparity

Set the parity of the serial line to odd.

-s, --speed value

Set the speed (the baud rate) of the serial line to the specified value.

-c, --intro-command string

Define an intro command that is sent through the serial line before the invocation of ldattach. E.g. in conjunction with line discipline GSM0710, the command 'AT+CMUX=0\r' is commonly suitable to switch the modem into the CMUX mode.

-p, --pause value

Sleep for value seconds before the invocation of ldattach. Default is one second.

-h, --help

Display help text and exit.

-V, --version

Print version and exit.

## AUTHORS
Tilman Schmidt <tilman@imap.cc>

## SEE ALSO
inputattach(1), ttys(4)

## REPORTING BUGS
For bug reports, use the issue tracker at <https://github.com/util-linux/util-linux/issues>.

## AVAILABILITY
The ldattach command is part of the util-linux package which can be downloaded from Linux Kernel Archive <https://www.kernel.org/pub/linux/utils/util-linux/>.


lslocks

title: lslocks(8)

summary: list local system locks

text:
# lslocks(8)

## NAME
lslocks - list local system locks

## SYNOPSIS
lslocks [options]

## DESCRIPTION
lslocks lists information about all the currently held file locks in a Linux system.

Note that lslocks also lists OFD (Open File Description) locks, these locks are not associated with any process (PID is -1). OFD locks are associated with the open file description on which they are acquired. This lock type is available since Linux 3.15, see fcntl(2) for more details.

## OPTIONS
-b, --bytes

Print the sizes in bytes rather than in a human-readable format. By default, the unit, sizes are expressed in, is byte, and unit prefixes are in power of 2^10 (1024). Abbreviations of symbols are exhibited truncated in order to reach a better readability, by exhibiting alone the first letter of them; examples: "1 KiB" and "1 MiB" are respectively exhibited as "1 K" and "1 M", then omitting on purpose the mention "iB", which is part of these abbreviations.

-i, --noinaccessible

Ignore lock files which are inaccessible for the current user.

-J, --json

Use JSON output format.

-n, --noheadings

Do not print a header line.

-o, --output list

Specify which output columns to print. Use --help to get a list of all supported columns. The default list of columns may be extended if list is specified in the format +list (e.g., lslocks -o +BLOCKER).

--output-all

Output all available columns.

-p, --pid pid

Display only the locks held by the process with this pid.

-r, --raw

Use the raw output format.

-u, --notruncate

Do not truncate text in columns.

-h, --help

Display help text and exit.

-V, --version

Print version and exit.

## OUTPUT
COMMAND

The command name of the process holding the lock.

PID

The process ID of the process which holds the lock or -1 for OFDLCK.

TYPE

The type of lock; can be FLOCK (created with flock(2)), POSIX (created with fcntl(2) and lockf(3)) or OFDLCK (created with fcntl(2)).

SIZE

Size of the locked file.

MODE

The lock’s access permissions (read, write). If the process is blocked and waiting for the lock, then the mode is postfixed with an '*' (asterisk).

M

Whether the lock is mandatory; 0 means no (meaning the lock is only advisory), 1 means yes. (See fcntl(2).)

START

Relative byte offset of the lock.

END

Ending offset of the lock.

PATH

Full path of the lock. If none is found, or there are no permissions to read the path, it will fall back to the device’s mountpoint and "..." is appended to the path. The path might be truncated; use --notruncate to get the full path.

BLOCKER

The PID of the process which blocks the lock.

## NOTES
The lslocks command is meant to replace the lslk(8) command, originally written by Victor A. Abell <abe@purdue.edu> and unmaintained since 2001.

## AUTHORS
Davidlohr Bueso <dave@gnu.org>

## SEE ALSO
flock(1), fcntl(2), lockf(3)

## REPORTING BUGS
For bug reports, use the issue tracker at <https://github.com/util-linux/util-linux/issues>.

## AVAILABILITY
The lslocks command is part of the util-linux package which can be downloaded from Linux Kernel Archive <https://www.kernel.org/pub/linux/utils/util-linux/>.


lsns

title: lsns(8)

summary: list namespaces

text:
# lsns(8)

## NAME
lsns - list namespaces

## SYNOPSIS
lsns [options] namespace

## DESCRIPTION
lsns lists information about all the currently accessible namespaces or about the given namespace. The namespace identifier is an inode number.

The default output is subject to change. So whenever possible, you should avoid using default outputs in your scripts. Always explicitly define expected output mode (--tree or --list) and columns by using the --output option together with a columns list in environments where a stable output is required.

The NSFS column, printed when net is specified for the --type option, is special; it uses multi-line cells. Use the option --nowrap to switch to ","-separated single-line representation.

Note that lsns reads information directly from the /proc filesystem and for non-root users it may return incomplete information. The current /proc filesystem may be unshared and affected by a PID namespace (see unshare --mount-proc for more details). lsns is not able to see persistent namespaces without processes where the namespace instance is held by a bind mount to /proc/pid/ns/type.

## OPTIONS
-J, --json

Use JSON output format.

-l, --list

Use list output format.

-n, --noheadings

Do not print a header line.

-o, --output list

Specify which output columns to print. Use --help to get a list of all supported columns. The default list of columns may be extended if list is specified in the format +list (e.g., lsns -o +PATH).

--output-all

Output all available columns.

-P, --persistent

Display only the namespaces without processes (aka persistent namespaces), created by bind mounting /proc/pid/ns/type files to a filesystem path.

-p, --task PID

Display only the namespaces held by the process with this PID.

-r, --raw

Use the raw output format.

-t, --type type

Display the specified type of namespaces only. The supported types are mnt, net, ipc, user, pid, uts, cgroup and time. This option may be given more than once.

-u, --notruncate

Do not truncate text in columns.

-W, --nowrap

Do not use multi-line text in columns.

-T, --tree rel

Use tree-like output format. If process is given as rel, print process tree(s) in each name space. This is default when --tree is not specified. If parent is given, print tree(s) constructed by the parent/child relationship. If owner is given, print tree(s) constructed by the owner/owned relationship. owner is used as default when rel is omitted.

-h, --help

Display help text and exit.

-V, --version

Print version and exit.

## EXIT STATUS
The lsns utility exits with one of the following values:

0

Success.

1

General error.

2

An ioctl was unknown to the kernel.

## AUTHORS
Karel Zak <kzak@redhat.com>

## SEE ALSO
nsenter(1), unshare(1), clone(2), namespaces(7), ioctl_ns(2), ip-netns(8)

## REPORTING BUGS
For bug reports, use the issue tracker at <https://github.com/util-linux/util-linux/issues>.

## AVAILABILITY
The lsns command is part of the util-linux package which can be downloaded from Linux Kernel Archive <https://www.kernel.org/pub/linux/utils/util-linux/>.


mkfs

title: mkfs(8)

summary: build a Linux filesystem

text:
# mkfs(8)

## NAME
mkfs - build a Linux filesystem

## SYNOPSIS
mkfs [options] [-t type] [fs-options] device [size]

## DESCRIPTION
This mkfs frontend is deprecated in favour of filesystem specific mkfs.<type> utils.

mkfs is used to build a Linux filesystem on a device, usually a hard disk partition. The device argument is either the device name (e.g., /dev/hda1, /dev/sdb2), or a regular file that shall contain the filesystem. The size argument is the number of blocks to be used for the filesystem.

The exit status returned by mkfs is 0 on success and 1 on failure.

In actuality, mkfs is simply a front-end for the various filesystem builders (mkfs.fstype) available under Linux. The filesystem-specific builder is searched for via your PATH environment setting only. Please see the filesystem-specific builder manual pages for further details.

## OPTIONS
-t, --type type

Specify the type of filesystem to be built. If not specified, the default filesystem type (currently ext2) is used.

fs-options

Filesystem-specific options to be passed to the real filesystem builder.

-V, --verbose

Produce verbose output, including all filesystem-specific commands that are executed. Specifying this option more than once inhibits execution of any filesystem-specific commands. This is really only useful for testing.

-h, --help

Display help text and exit.

-V, --version

Print version and exit. (Option -V will display version information only when it is the only parameter, otherwise it will work as --verbose.)

## BUGS
All generic options must precede and not be combined with filesystem-specific options. Some filesystem-specific programs do not automatically detect the device size and require the size parameter to be specified.

## AUTHORS
David Engel <david@ods.com>, Fred N. van Kempen <waltje@uwalt.nl.mugnet.org>, Ron Sommeling <sommel@sci.kun.nl>.

The manual page was shamelessly adapted from Remy Card’s version for the ext2 filesystem.

## SEE ALSO
fs(5), badblocks(8), fsck(8), mkdosfs(8), mke2fs(8), mkfs.bfs(8), mkfs.ext2(8), mkfs.ext3(8), mkfs.ext4(8), mkfs.minix(8), mkfs.msdos(8), mkfs.vfat(8), mkfs.xfs(8)

## REPORTING BUGS
For bug reports, use the issue tracker at <https://github.com/util-linux/util-linux/issues>.

## AVAILABILITY
The mkfs command is part of the util-linux package which can be downloaded from Linux Kernel Archive <https://www.kernel.org/pub/linux/utils/util-linux/>.


mkfs.cramfs

title: mkfs.cramfs(8)

summary: make compressed ROM file system

text:
# mkfs.cramfs(8)

## NAME
mkfs.cramfs - make compressed ROM file system

## SYNOPSIS
mkfs.cramfs [options] directory file

## DESCRIPTION
Files on cramfs file systems are zlib-compressed one page at a time to allow random read access. The metadata is not compressed, but is expressed in a terse representation that is more space-efficient than conventional file systems.

The file system is intentionally read-only to simplify its design; random write access for compressed files is difficult to implement. cramfs ships with a utility (mkcramfs(8)) to pack files into new cramfs images.

File sizes are limited to less than 16 MB.

Maximum file system size is a little under 272 MB. (The last file on the file system must begin before the 256 MB block, but can extend past it.)

## ARGUMENTS
The directory is simply the root of the directory tree that we want to generate a compressed filesystem out of.

The file will contain the cram file system, which later can be mounted.

## OPTIONS
-v

Enable verbose messaging.

-E

Treat all warnings as errors, which are reflected as command exit status.

-b blocksize

Use defined block size, which has to be divisible by page size.

-e edition

Use defined file system edition number in superblock.

-N big, little, host

Use defined endianness. Value defaults to host.

-i file

Insert a file to cramfs file system.

-n name

Set name of the cramfs file system.

-p

Pad by 512 bytes for boot code.

-s

This option is ignored. Originally the -s turned on directory entry sorting.

-z

Make explicit holes.

-l[=mode]

Use exclusive BSD lock for device or file it operates. The optional argument mode can be yes, no (or 1 and 0) or nonblock. If the mode argument is omitted, it defaults to "yes". This option overwrites environment variable $LOCK_BLOCK_DEVICE. The default is not to use any lock at all, but it’s recommended to avoid collisions with udevd or other tools.

-h, --help

Display help text and exit.

-V, --version

Print version and exit.

## EXIT STATUS
0

success

8

operation error, such as unable to allocate memory

## SEE ALSO
fsck.cramfs(8), mount(8)

## REPORTING BUGS
For bug reports, use the issue tracker at <https://github.com/util-linux/util-linux/issues>.

## AVAILABILITY
The mkfs.cramfs command is part of the util-linux package which can be downloaded from Linux Kernel Archive <https://www.kernel.org/pub/linux/utils/util-linux/>.


mkswap

title: mkswap(8)

summary: set up a Linux swap area

text:
# mkswap(8)

## NAME
mkswap - set up a Linux swap area

## SYNOPSIS
mkswap [options] device [size]

## DESCRIPTION
mkswap sets up a Linux swap area on a device or in a file.

The device argument will usually be a disk partition (something like /dev/sdb7) but can also be a file. The Linux kernel does not look at partition IDs, but many installation scripts will assume that partitions of hex type 82 (LINUX_SWAP) are meant to be swap partitions. (Warning: Solaris also uses this type. Be careful not to kill your Solaris partitions.)

The size parameter is superfluous but retained for backwards compatibility. (It specifies the desired size of the swap area in 1024-byte blocks. mkswap will use the entire partition or file if it is omitted. Specifying it is unwise - a typo may destroy your disk.)

After creating the swap area, you need the swapon(8) command to start using it. Usually swap areas are listed in /etc/fstab so that they can be taken into use at boot time by a swapon -a command in some boot script.

## WARNING
The swap header does not touch the first block. A boot loader or disk label can be there, but it is not a recommended setup. The recommended setup is to use a separate partition for a Linux swap area.

mkswap, like many others mkfs-like utils, erases the first partition block to make any previous filesystem invisible.

However, mkswap refuses to erase the first block on a device with a disk label (SUN, BSD, ...).

## OPTIONS
-c, --check

Check the device (if it is a block device) for bad blocks before creating the swap area. If any bad blocks are found, the count is printed.

-f, --force

Go ahead even if the command is stupid. This allows the creation of a swap area larger than the file or partition it resides on. Also, without this option, mkswap will refuse to erase the first block on a device with a partition table.

-q, --quiet

Suppress output and warning messages.

-L, --label label

Specify a label for the device, to allow swapon(8) by label.

--lock[=mode]

Use exclusive BSD lock for device or file it operates. The optional argument mode can be yes, no (or 1 and 0) or nonblock. If the mode argument is omitted, it defaults to yes. This option overwrites environment variable $LOCK_BLOCK_DEVICE. The default is not to use any lock at all, but it’s recommended to avoid collisions with systemd-udevd(8) or other tools.

-p, --pagesize size

Specify the page size (in bytes) to use. This option is usually unnecessary; mkswap reads the size from the kernel.

-U, --uuid UUID

Specify the UUID to use. The default is to generate a UUID. The format of the UUID is a series of hex digits separated by hyphens, like this: "c1b9d5a2-f162-11cf-9ece-0020afc76f16". The UUID parameter may also be one of the following: clear

clear the filesystem UUID

random

generate a new randomly-generated UUID

time

generate a new time-based UUID

-e, --endianness ENDIANNESS

Specify the ENDIANNESS to use, valid arguments are native, little or big. The default is native.

-v, --swapversion 1

Specify the swap-space version. (This option is currently pointless, as the old -v 0 option has become obsolete and now only -v 1 is supported. The kernel has not supported v0 swap-space format since 2.5.22 (June 2002). The new version v1 is supported since 2.1.117 (August 1998).)

--verbose

Verbose execution. With this option mkswap will output more details about detected problems during swap area set up.

-h, --help

Display help text and exit.

-V, --version

Print version and exit.

## ENVIRONMENT
LIBBLKID_DEBUG=all

enables libblkid debug output.

LOCK_BLOCK_DEVICE=<mode>

use exclusive BSD lock. The mode is "1" or "0". See --lock for more details.

## NOTES
The maximum useful size of a swap area depends on the architecture and the kernel version.

The maximum number of the pages that is possible to address by swap area header is 4294967295 (32-bit unsigned int). The remaining space on the swap device is ignored.

Presently, Linux allows 32 swap areas. The areas in use can be seen in the file /proc/swaps.

mkswap refuses areas smaller than 10 pages.

If you don’t know the page size that your machine uses, you can look it up with getconf PAGESIZE.

To set up a swap file, it is necessary to create that file before initializing it with mkswap, e.g. using a command like

```
# dd if=/dev/zero of=swapfile bs=1MiB count=$((8*1024))
```

to create 8GiB swapfile.

Please read notes from swapon(8) about the swap file use restrictions (holes, preallocation and copy-on-write issues).

## SEE ALSO
fdisk(8), swapon(8)

## REPORTING BUGS
For bug reports, use the issue tracker at <https://github.com/util-linux/util-linux/issues>.

## AVAILABILITY
The mkswap command is part of the util-linux package which can be downloaded from Linux Kernel Archive <https://www.kernel.org/pub/linux/utils/util-linux/>.


nologin

title: nologin(8)

summary: politely refuse a login

text:
# nologin(8)

## NAME
nologin — politely refuse a login

## SYNOPSIS
nologin

## DESCRIPTION
nologin displays a message that an account is not available and exits non-zero. It is intended as a replacement shell field for accounts that have been disabled.

If the file /etc/nologin.txt exists, nologin displays its contents to the user instead of the default message.

## SEE ALSO
login(1)

## HISTORY
The nologin command appeared in 4.4BSD.


title: pivot_root(8)

summary: change the root filesystem

text:
# pivot_root(8)

## NAME
pivot_root - change the root filesystem

## SYNOPSIS
pivot_root new_root put_old

## DESCRIPTION
pivot_root moves the root file system of the current process to the directory put_old and makes new_root the new root file system. Since pivot_root(8) simply calls pivot_root(2), we refer to the man page of the latter for further details.

Note that, depending on the implementation of pivot_root, root and current working directory of the caller may or may not change. The following is a sequence for invoking pivot_root that works in either case, assuming that pivot_root and chroot are in the current PATH:

```
cd new_root
pivot_root . put_old
exec chroot . command
```

Note that chroot must be available under the old root and under the new root, because pivot_root may or may not have implicitly changed the root directory of the shell.

Note that exec chroot changes the running executable, which is necessary if the old root directory should be unmounted afterwards. Also note that standard input, output, and error may still point to a device on the old root file system, keeping it busy. They can easily be changed when invoking chroot (see below; note the absence of leading slashes to make it work whether pivot_root has changed the shell’s root or not).

## OPTIONS
-h, --help

Display help text and exit.

-V, --version

Print version and exit.

## EXAMPLE
Change the root file system to /dev/hda1 from an interactive shell:

```
mount /dev/hda1 /new-root
cd /new-root
pivot_root . old-root
exec chroot . sh <dev/console >dev/console 2>&1
umount /old-root
```

Mount the new root file system over NFS from 10.0.0.1:/my_root and run init:

```
ifconfig lo 127.0.0.1 up   # for portmap
# configure Ethernet or such
portmap   # for lockd (implicitly started by mount)
mount -o ro 10.0.0.1:/my_root /mnt
killall portmap   # portmap keeps old root busy
cd /mnt
pivot_root . old_root
exec chroot . sh -c 'umount /old_root; exec /sbin/init' \

  <dev/console >dev/console 2>&1
```

## SEE ALSO
chroot(1), pivot_root(2), mount(8), switch_root(8), umount(8)

## REPORTING BUGS
For bug reports, use the issue tracker at <https://github.com/util-linux/util-linux/issues>.

## AVAILABILITY
The pivot_root command is part of the util-linux package which can be downloaded from Linux Kernel Archive <https://www.kernel.org/pub/linux/utils/util-linux/>.


readprofile

title: readprofile(8)

summary: read kernel profiling information

text:
# readprofile(8)

## NAME
readprofile - read kernel profiling information

## SYNOPSIS
readprofile [options]

## VERSION
This manpage documents version 2.0 of the program.

## DESCRIPTION
The readprofile command uses the /proc/profile information to print ascii data on standard output. The output is organized in three columns: the first is the number of clock ticks, the second is the name of the C function in the kernel where those many ticks occurred, and the third is the normalized `load' of the procedure, calculated as a ratio between the number of ticks and the length of the procedure. The output is filled with blanks to ease readability.

## OPTIONS
-a, --all

Print all symbols in the mapfile. By default the procedures with reported ticks are not printed.

-b, --histbin

Print individual histogram-bin counts.

-i, --info

Info. This makes readprofile only print the profiling step used by the kernel. The profiling step is the resolution of the profiling buffer, and is chosen during kernel configuration (through make config), or in the kernel’s command line. If the -t (terse) switch is used together with -i only the decimal number is printed.

-m, --mapfile mapfile

Specify a mapfile, which by default is /usr/src/linux/System.map. You should specify the map file on cmdline if your current kernel isn’t the last one you compiled, or if you keep System.map elsewhere. If the name of the map file ends with .gz it is decompressed on the fly.

-M, --multiplier multiplier

On some architectures it is possible to alter the frequency at which the kernel delivers profiling interrupts to each CPU. This option allows you to set the frequency, as a multiplier of the system clock frequency, HZ. Linux 2.6.16 dropped multiplier support for most systems. This option also resets the profiling buffer, and requires superuser privileges.

-p, --profile pro-file

Specify a different profiling buffer, which by default is /proc/profile. Using a different pro-file is useful if you want to `freeze' the kernel profiling at some time and read it later. The /proc/profile file can be copied using cat(1) or cp(1). There is no more support for compressed profile buffers, like in readprofile-1.1, because the program needs to know the size of the buffer in advance.

-r, --reset

Reset the profiling buffer. This can only be invoked by root, because /proc/profile is readable by everybody but writable only by the superuser. However, you can make readprofile set-user-ID 0, in order to reset the buffer without gaining privileges.

-s, --counters

Print individual counters within functions.

-v, --verbose

Verbose. The output is organized in four columns and filled with blanks. The first column is the RAM address of a kernel function, the second is the name of the function, the third is the number of clock ticks and the last is the normalized load.

-h, --help

Display help text and exit.

-V, --version

Print version and exit.

## FILES
/proc/profile

A binary snapshot of the profiling buffer.

/usr/src/linux/System.map

The symbol table for the kernel.

/usr/src/linux/*

The program being profiled :-)

## BUGS
readprofile only works with a 1.3.x or newer kernel, because /proc/profile changed in the step from 1.2 to 1.3.

This program only works with ELF kernels. The change for a.out kernels is trivial, and left as an exercise to the a.out user.

To enable profiling, the kernel must be rebooted, because no profiling module is available, and it wouldn’t be easy to build. To enable profiling, you can specify profile=2 (or another number) on the kernel commandline. The number you specify is the two-exponent used as profiling step.

Profiling is disabled when interrupts are inhibited. This means that many profiling ticks happen when interrupts are re-enabled. Watch out for misleading information.

## EXAMPLE
Browse the profiling buffer ordering by clock ticks:

```
   readprofile | sort -nr | less
```

Print the 20 most loaded procedures:

```
   readprofile | sort -nr +2 | head -20
```

Print only filesystem profile:

```
   readprofile | grep _ext2
```

Look at all the kernel information, with ram addresses:

```
   readprofile -av | less
```

Browse a 'frozen' profile buffer for a non current kernel:

```
   readprofile -p ~/profile.freeze -m /zImage.map.gz
```

Request profiling at 2kHz per CPU, and reset the profiling buffer:

```
   sudo readprofile -M 20
```

## REPORTING BUGS
For bug reports, use the issue tracker at <https://github.com/util-linux/util-linux/issues>.

## AVAILABILITY
The readprofile command is part of the util-linux package which can be downloaded from Linux Kernel Archive <https://www.kernel.org/pub/linux/utils/util-linux/>.


rtcwake

title: rtcwake(8)

text:
# rtcwake(8)

## NAME
rtcwake - enter a system sleep state until specified wakeup time

## SYNOPSIS
rtcwake [options] [-d device] [-m standby_mode] {-s seconds|-t time_t}

## DESCRIPTION
This program is used to enter a system sleep state and to automatically wake from it at a specified time.

This uses cross-platform Linux interfaces to enter a system sleep state, and leave it no later than a specified time. It uses any RTC framework driver that supports standard driver model wakeup flags.

This is normally used like the old apmsleep utility, to wake from a suspend state like ACPI S1 (standby) or S3 (suspend-to-RAM). Most platforms can implement those without analogues of BIOS, APM, or ACPI.

On some systems, this can also be used like nvram-wakeup, waking from states like ACPI S4 (suspend to disk). Not all systems have persistent media that are appropriate for such suspend modes.

Note that alarm functionality depends on hardware; not every RTC is able to setup an alarm up to 24 hours in the future.

The suspend setup may be interrupted by active hardware; for example wireless USB input devices that continue to send events for some fraction of a second after the return key is pressed. rtcwake tries to avoid this problem and it waits to the terminal to settle down before entering a system sleep.

## OPTIONS
-A, --adjfile file

Specify an alternative path to the adjust file.

-a, --auto

Read the clock mode (whether the hardware clock is set to UTC or local time) from the adjtime file, where hwclock(8) stores that information. This is the default.

--date timestamp

Set the wakeup time to the value of the timestamp. Format of the timestamp can be any of the following:

YYYYMMDDhhmmss

YYYY-MM-DD hh:mm:ss

YYYY-MM-DD hh:mm

(seconds will be set to 00)

YYYY-MM-DD

(time will be set to 00:00:00)

hh:mm:ss

(date will be set to today)

hh:mm

(date will be set to today, seconds to 00)

tomorrow

(time is set to 00:00:00)

+5min

-d, --device device

Use the specified device instead of rtc0 as realtime clock. This option is only relevant if your system has more than one RTC. You may specify rtc1, rtc2, ... here.

-l, --local

Assume that the hardware clock is set to local time, regardless of the contents of the adjtime file.

--list-modes

List available --mode option arguments.

-m, --mode mode

Go into the given standby state. Valid values for mode are: standby

ACPI state S1. This state offers minimal, though real, power savings, while providing a very low-latency transition back to a working system. This is the default mode.

freeze

The processes are frozen, all the devices are suspended and all the processors idled. This state is a general state that does not need any platform-specific support, but it saves less power than Suspend-to-RAM, because the system is still in a running state. (Available since Linux 3.9.)

mem

ACPI state S3 (Suspend-to-RAM). This state offers significant power savings as everything in the system is put into a low-power state, except for memory, which is placed in self-refresh mode to retain its contents.

disk

ACPI state S4 (Suspend-to-disk). This state offers the greatest power savings, and can be used even in the absence of low-level platform support for power management. This state operates similarly to Suspend-to-RAM, but includes a final step of writing memory contents to disk.

off

ACPI state S5 (Poweroff). This is done by calling '/sbin/shutdown'. Not officially supported by ACPI, but it usually works.

no

Don’t suspend, only set the RTC wakeup time.

on

Don’t suspend, but read the RTC device until an alarm time appears. This mode is useful for debugging.

disable

Disable a previously set alarm.

show

Print alarm information in format: "alarm: off|on <time>". The time is in ctime() output format, e.g., "alarm: on Tue Nov 16 04:48:45 2010".

-n, --dry-run

This option does everything apart from actually setting up the alarm, suspending the system, or waiting for the alarm.

-s, --seconds seconds

Set the wakeup time to seconds in the future from now.

-t, --time time_t

Set the wakeup time to the absolute time time_t. time_t is the time in seconds since 1970-01-01, 00:00 UTC. Use the date(1) tool to convert between human-readable time and time_t.

-u, --utc

Assume that the hardware clock is set to UTC (Universal Time Coordinated), regardless of the contents of the adjtime file.

-v, --verbose

Be verbose.

-h, --help

Display help text and exit.

-V, --version

Print version and exit.

## NOTES
Some PC systems can’t currently exit sleep states such as mem using only the kernel code accessed by this driver. They need help from userspace code to make the framebuffer work again.

## FILES
/etc/adjtime

## HISTORY
The program was posted several times on LKML and other lists before appearing in kernel commit message for Linux 2.6 in the GIT commit 87ac84f42a7a580d0dd72ae31d6a5eb4bfe04c6d.

## AUTHORS
The program was written by David Brownell <dbrownell@users.sourceforge.net> and improved by Bernhard Walle <bwalle@suse.de>.

## COPYRIGHT
This is free software. You may redistribute copies of it under the terms of the GNU General Public License <http://www.gnu.org/licenses/gpl.html>. There is NO WARRANTY, to the extent permitted by law.

## SEE ALSO
adjtime_config(5), hwclock(8), date(1)

## REPORTING BUGS
For bug reports, use the issue tracker at <https://github.com/util-linux/util-linux/issues>.

## AVAILABILITY
The rtcwake command is part of the util-linux package which can be downloaded from Linux Kernel Archive <https://www.kernel.org/pub/linux/utils/util-linux/>.


swaplabel

title: swaplabel(8)

text:
# swaplabel(8)

## NAME
swaplabel - print or change the label or UUID of a swap area

## SYNOPSIS
swaplabel [-L label] [-U UUID] device

## DESCRIPTION
swaplabel will display or change the label or UUID of a swap partition located on device (or regular file).

If the optional arguments -L and -U are not given, swaplabel will simply display the current swap-area label and UUID of device.

If an optional argument is present, then swaplabel will change the appropriate value on device. These values can also be set during swap creation using mkswap(8). The swaplabel utility allows changing the label or UUID on an actively used swap device.

## OPTIONS
-h, --help

Display help text and exit.

-V, --version

Print version and exit.

-L, --label label

Specify a new label for the device. Swap partition labels can be at most 16 characters long. If label is longer than 16 characters, swaplabel will truncate it and print a warning message.

-U, --uuid UUID

Specify a new UUID for the device. The UUID must be in the standard 8-4-4-4-12 character format, such as is output by uuidgen(1).

## ENVIRONMENT
LIBBLKID_DEBUG=all

enables libblkid debug output.

## AUTHORS
swaplabel was written by Jason Borden <jborden@bluehost.com> and Karel Zak <kzak@redhat.com>.

## SEE ALSO
uuidgen(1), mkswap(8), swapon(8)

## REPORTING BUGS
For bug reports, use the issue tracker at <https://github.com/util-linux/util-linux/issues>.

## AVAILABILITY
The swaplabel command is part of the util-linux package which can be downloaded from Linux Kernel Archive <https://www.kernel.org/pub/linux/utils/util-linux/>.


title: switch_root(8)

text:
# switch_root(8)

## NAME
switch_root - switch to another filesystem as the root of the mount tree

## SYNOPSIS
switch_root [-hV]

switch_root newroot init [arg...]

## DESCRIPTION
switch_root moves already mounted /proc, /dev, /sys and /run to newroot and makes newroot the new root filesystem and starts init process.

WARNING: switch_root removes recursively all files and directories on the current root filesystem.

## OPTIONS
-h, --help

Display help text and exit.

-V, --version

Print version and exit.

## EXIT STATUS
switch_root returns 1 on failure, it never returns on success.

## NOTES
switch_root will fail to function if newroot is not the root of a mount. If you want to switch root into a directory that does not meet this requirement then you can first use a bind-mounting trick to turn any directory into a mount point:

```
mount --bind $DIR $DIR
```

## AUTHORS
Peter Jones <pjones@redhat.com>, Jeremy Katz <katzj@redhat.com>, Karel Zak <kzak@redhat.com>

## SEE ALSO
chroot(2), init(8), mkinitrd(8), mount(8)

## REPORTING BUGS
For bug reports, use the issue tracker at <https://github.com/util-linux/util-linux/issues>.

## AVAILABILITY
The switch_root command is part of the util-linux package which can be downloaded from Linux Kernel Archive <https://www.kernel.org/pub/linux/utils/util-linux/>.


wdctl

title: wdctl(8)

summary: show hardware watchdog status

text:
# wdctl(8)

## NAME
wdctl - show hardware watchdog status

## SYNOPSIS
wdctl [options] [device...]

## DESCRIPTION
Show hardware watchdog status. The default device is /dev/watchdog. If more than one device is specified then the output is separated by one blank line.

If the device is already used or user has no permissions to read from the device, then wdctl reads data from sysfs. In this case information about supported features (flags) might be missing.

Note that the number of supported watchdog features is hardware specific.

## OPTIONS
-f, --flags list

Print only the specified flags.

-F, --noflags

Do not print information about flags.

-I, --noident

Do not print watchdog identity information.

-n, --noheadings

Do not print a header line for flags table.

-o, --output list

Define the output columns to use in table of watchdog flags. If no output arrangement is specified, then a default set is used. Use --help to get list of all supported columns.

-O, --oneline

Print all wanted information on one line in key="value" output format.

-p, --setpretimeout seconds

Set the watchdog pre-timeout in seconds. A watchdog pre-timeout is a notification generated by the watchdog before the watchdog reset might occur in the event the watchdog has not been serviced. This notification is handled by the kernel and can be configured to take an action using sysfs or by --setpregovernor.

-g, --setpregovernor governor

Set pre-timeout governor name. For available governors see default wdctl output.

-r, --raw

Use the raw output format.

-s, --settimeout seconds

Set the watchdog timeout in seconds.

-T, --notimeouts

Do not print watchdog timeouts.

-x, --flags-only

Same as -I -T.

-h, --help

Display help text and exit.

-V, --version

Print version and exit.

## AUTHORS
Karel Zak <kzak@redhat.com>, Lennart Poettering <lennart@poettering.net>

## REPORTING BUGS
For bug reports, use the issue tracker at <https://github.com/util-linux/util-linux/issues>.

## AVAILABILITY
The wdctl command is part of the util-linux package which can be downloaded from Linux Kernel Archive <https://www.kernel.org/pub/linux/utils/util-linux/>.


wipefs

title: wipefs(8)

summary: wipe a signature from a device

text:
# wipefs(8)

## NAME
wipefs - wipe a signature from a device

## SYNOPSIS
wipefs [options] device...

wipefs [--backup] -o offset device...

wipefs [--backup] -a device...

## DESCRIPTION
wipefs can erase filesystem, raid or partition-table signatures (magic strings) from the specified device to make the signatures invisible for libblkid. wipefs does not erase the filesystem itself nor any other data from the device.

When used without any options, wipefs lists all visible filesystems and the offsets of their basic signatures. The default output is subject to change. So whenever possible, you should avoid using default outputs in your scripts. Always explicitly define expected columns by using --output columns-list in environments where a stable output is required.

wipefs calls the BLKRRPART ioctl when it has erased a partition-table signature to inform the kernel about the change. The ioctl is called as the last step and when all specified signatures from all specified devices are already erased. This feature can be used to wipe content on partitions devices as well as partition table on a disk device, for example by wipefs -a /dev/sdc1 /dev/sdc2 /dev/sdc.

Note that some filesystems and some partition tables store more magic strings on the device (e.g., FAT, ZFS, GPT). The wipefs command (since v2.31) lists all the offset where a magic strings have been detected.

When option -a is used, all magic strings that are visible for libblkid(3) are erased. In this case the wipefs scans the device again after each modification (erase) until no magic string is found.

Note that by default wipefs does not erase nested partition tables on non-whole disk devices. For this the option --force is required.

## OPTIONS
-a, --all

Erase all available signatures. The set of erased signatures can be restricted with the -t option.

-b, --backup

Create a signature backup to the file $HOME/wipefs-<devname>-<offset>.bak. For more details see the EXAMPLE section.

-f, --force

Force erasure, even if the filesystem is mounted. This is required in order to erase a partition-table signature on a block device.

-J, --json

Use JSON output format.

--lock[=mode]

Use exclusive BSD lock for device or file it operates. The optional argument mode can be yes, no (or 1 and 0) or nonblock. If the mode argument is omitted, it defaults to "yes". This option overwrites environment variable $LOCK_BLOCK_DEVICE. The default is not to use any lock at all, but it’s recommended to avoid collisions with udevd or other tools.

-i, --noheadings

Do not print a header line.

-O, --output list

Specify which output columns to print. Use --help to get a list of all supported columns.

-n, --no-act

Causes everything to be done except for the write(2) call.

-o, --offset offset

Specify the location (in bytes) of the signature which should be erased from the device. The offset number may include a "0x" prefix; then the number will be interpreted as a hex value. It is possible to specify multiple -o options. The offset argument may be followed by the multiplicative suffixes KiB (=1024), MiB (=1024*1024), and so on for GiB, TiB, PiB, EiB, ZiB and YiB (the "iB" is optional, e.g., "K" has the same meaning as "KiB"), or the suffixes KB (=1000), MB (=1000*1000), and so on for GB, TB, PB, EB, ZB and YB.

-p, --parsable

Print out in parsable instead of printable format. Encode all potentially unsafe characters of a string to the corresponding hex value prefixed by '\x'.

-q, --quiet

Suppress any messages after a successful signature wipe.

-t, --types list

Limit the set of printed or erased signatures. More than one type may be specified in a comma-separated list. The list or individual types can be prefixed with 'no' to specify the types on which no action should be taken. For more details see mount(8).

-h, --help

Display help text and exit.

-V, --version

Print version and exit.

## ENVIRONMENT
LIBBLKID_DEBUG=all

enables libblkid(3) debug output.

LOCK_BLOCK_DEVICE=<mode>

use exclusive BSD lock. The mode is "1" or "0". See --lock for more details.

## EXAMPLES
wipefs /dev/sda*

Prints information about sda and all partitions on sda.

wipefs --all --backup /dev/sdb

Erases all signatures from the device /dev/sdb and creates a signature backup file ~/wipefs-sdb-<offset>.bak for each signature.

dd if=~/wipefs-sdb-0x00000438.bak of=/dev/sdb seek=$((0x00000438)) bs=1 conv=notrunc

Restores an ext2 signature from the backup file ~/wipefs-sdb-0x00000438.bak.

## AUTHORS
Karel Zak <kzak@redhat.com>

## SEE ALSO
blkid(8), findfs(8)

## REPORTING BUGS
For bug reports, use the issue tracker at <https://github.com/util-linux/util-linux/issues>.

## AVAILABILITY
The wipefs command is part of the util-linux package which can be downloaded from Linux Kernel Archive <https://www.kernel.org/pub/linux/utils/util-linux/>.


zramctl

title: zramctl(8)

summary: set up and control zram devices

text:
# zramctl(8)

## NAME
zramctl - set up and control zram devices

## SYNOPSIS
Get info:

zramctl [options]

Reset zram:

zramctl -r zramdev...

Print name of first unused zram device:

zramctl -f

Set up a zram device:

zramctl [-f | zramdev] [-s size] [-t number] [-a algorithm]

## DESCRIPTION
zramctl is used to quickly set up zram device parameters, to reset zram devices, and to query the status of used zram devices.

If no option is given, all non-zero size zram devices are shown.

Note that zramdev node specified on command line has to already exist. The command zramctl creates a new /dev/zram<N> nodes only when --find option specified. It’s possible (and common) that after system boot /dev/zram<N> nodes are not created yet.

## OPTIONS
-a, --algorithm lzo|lz4|lz4hc|deflate|842|zstd

Set the compression algorithm to be used for compressing data in the zram device. The list of supported algorithms could be inaccurate as it depends on the current kernel configuration. A basic overview can be obtained by using the command "cat /sys/block/zram0/comp_algorithm"; however, please note that this list might also be incomplete. This is due to the fact that ZRAM utilizes the Crypto API, and if certain algorithms were built as modules, it becomes impossible to enumerate all of them.

-f, --find

Find the first unused zram device. If a --size argument is present, then initialize the device.

-n, --noheadings

Do not print a header line in status output.

-o, --output list

Define the status output columns to be used. If no output arrangement is specified, then a default set is used. Use --help to get a list of all supported columns.

--output-all

Output all available columns.

--raw

Use the raw format for status output.

-r, --reset

Reset the options of the specified zram device(s). Zram device settings can be changed only after a reset.

-s, --size size

Create a zram device of the specified size. Zram devices are aligned to memory pages; when the requested size is not a multiple of the page size, it will be rounded up to the next multiple. When not otherwise specified, the unit of the size parameter is bytes. The size argument may be followed by the multiplicative suffixes KiB (=1024), MiB (=1024*1024), and so on for GiB, TiB, PiB, EiB, ZiB and YiB (the "iB" is optional, e.g., "K" has the same meaning as "KiB") or the suffixes KB (=1000), MB (=1000*1000), and so on for GB, TB, PB, EB, ZB and YB.

-t, --streams number

Set the maximum number of compression streams that can be used for the device. The default is use all CPUs and one stream for kernels older than 4.6.

-h, --help

Display help text and exit.

-V, --version

Print version and exit.

## EXIT STATUS
zramctl returns 0 on success, nonzero on failure.

## FILES
/dev/zram[0..N]

zram block devices

## EXAMPLE
The following commands set up a zram device with a size of one gigabyte and use it as swap device.

```
 # zramctl --find --size 1024M

 /dev/zram0

 # mkswap /dev/zram0

 # swapon /dev/zram0

 ...

 # swapoff /dev/zram0

 # zramctl --reset /dev/zram0
```

## AUTHORS
Timofey Titovets <nefelim4ag@gmail.com>, Karel Zak <kzak@redhat.com>

## SEE ALSO
Linux kernel documentation <https://docs.kernel.org/admin-guide/blockdev/zram.html>

## REPORTING BUGS
For bug reports, use the issue tracker at <https://github.com/util-linux/util-linux/issues>.

## AVAILABILITY
The zramctl command is part of the util-linux package which can be downloaded from Linux Kernel Archive <https://www.kernel.org/pub/linux/utils/util-linux/>.


uucico

package: uucp

title: uucico(8)

summary: UUCP file transfer daemon

text:
# uucico(8)

## NAME
uucico - UUCP file transfer daemon

## SYNOPSIS
uucico [ options ]

## DESCRIPTION
The uucico daemon processes file transfer requests queued by uucp (1) and uux (1). It is started when uucp or uux is run (unless they are given the -r option). It is also typically started periodically using entries in the crontab table(s).

When invoked with -r1, --master, -s, --system, or -S, the daemon will place a call to a remote system, running in master mode. Otherwise the daemon will start in slave mode, accepting a call from a remote system. Typically a special login name will be set up for UUCP which automatically invokes uucico when a call is made.

When uucico terminates, it invokes the uuxqt (8) daemon, unless the -q or --nouuxqt option is given; uuxqt (8) executes any work orders created by uux (1) on a remote system, and any work orders created locally which have received remote files for which they were waiting.

If a call fails, uucico will normally refuse to retry the call until a certain (configurable) amount of time has passed. This may be overriden by the -f, --force, or -S option.

The -l, --prompt, -e, or --loop options may be used to force uucico to produce its own prompts of "login: " and "Password:". When another daemon calls in, it will see these prompts and log in as usual. The login name and password will normally be checked against a separate list kept specially for uucico rather than the /etc/passwd file; it is possible on some systems to direct uucico to use the /etc/passwd file. The -l or --prompt option will prompt once and then exit; in this mode the UUCP administrator or the superuser may use the -u or --login option to force a login name, in which case uucico will not prompt for one. The -e or --loop option will prompt again after the first session is over; in this mode uucico will permanently control a port.

If uucico receives a SIGQUIT, SIGTERM or SIGPIPE signal, it will cleanly abort any current conversation with a remote system and exit. If it receives a SIGHUP signal it will abort any current conversation, but will continue to place calls to (if invoked with -r1 or --master) and accept calls from (if invoked with -e or --loop) other systems. If it receives a SIGINT signal it will finish the current conversation, but will not place or accept any more calls.

## OPTIONS
The following options may be given to uucico.

-r1, --master

Start in master mode (call out to a system); implied by -s, --system, or -S. If no system is specified, call any system for which work is waiting to be done.

-r0, --slave

Start in slave mode. This is the default.

-s system, --system system

Call the named system.

-S system

Call the named system, ignoring any required wait. This is equivalent to -s system -f.

-f, --force

Ignore any required wait for any systems to be called.

-l, --prompt

Prompt for login name and password using "login: " and "Password:". This allows uucico to be easily run from inetd (8). The login name and password are checked against the UUCP password file, which probably has no connection to the file /etc/passwd. The --login option may be used to force a login name, in which cause uucico will only prompt for a password.

-p port, --port port

Specify a port to call out on or to listen to.

-e, --loop

Enter endless loop of login/password prompts and slave mode daemon execution. The program will not stop by itself; you must use kill (1) to shut it down.

-w, --wait

After calling out (to a particular system when -s, --system, or -S is specifed, or to all systems which have work when just -r1 or --master is specifed), begin an endless loop as with --loop.

-q, --nouuxqt

Do not start the uuxqt (8) daemon when finished.

-c, --quiet

If no calls are permitted at this time, then don't make the call, but also do not put an error message in the log file and do not update the system status (as reported by uustat (1)). This can be convenient for automated polling scripts, which may want to simply attempt to call every system rather than worry about which particular systems may be called at the moment. This option also suppresses the log message indicating that there is no work to be done.

-C, --ifwork

Only call the system named by -s, --system or -S if there is work for that system.

-D, --nodetach

Do not detach from the controlling terminal. Normally uucico detaches from the terminal before each call out to another system and before invoking uuxqt. This option prevents this.

-u name, --login name

Set the login name to use instead of that of the invoking user. This option may only be used by the UUCP administrator or the superuser. If used with --prompt, this will cause uucico to prompt only for the password, not the login name.

-z, --try-next

If a call fails after the remote system is reached, try the next alternate rather than simply exiting.

-i type, --stdin type

Set the type of port to use when using standard input. The only support port type is TLI, and this is only available on machines which support the TLI networking interface. Specifying -iTLI causes uucico to use TLI calls to perform I/O.

-x type, -X type, --debug type

Turn on particular debugging types. The following types are recognized: abnormal, chat, handshake, uucp-proto, proto, port, config, spooldir, execute, incoming, outgoing. Multiple types may be given, separated by commas, and the --debug option may appear multiple times. A number may also be given, which will turn on that many types from the foregoing list; for example, --debug 2 is equivalent to --debug abnormal,chat.

The debugging output is sent to the debugging file, which may be printed using uulog -D.

-I file, --config file

Set configuration file to use. This option may not be available, depending upon how uucico was compiled.

-v, --version

Report version information and exit.

--help

Print a help message and exit.

## SEE ALSO
kill(1), uucp(1), uux(1), uustat(1), uuxqt(8)

## AUTHOR
Ian Lance Taylor <ian@airs.com>