'\" t
.\"     Title: udisksctl
.\"    Author: [see the "AUTHOR" section]
.\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
.\"      Date: August 2018
.\"    Manual: User Commands
.\"    Source: udisks 2.9.0
.\"  Language: English
.\"
.TH "UDISKSCTL" "1" "August 2018" "udisks 2\&.9\&.0" "User Commands"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.\" http://bugs.debian.org/507673
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.ie \n(.g .ds Aq \(aq
.el       .ds Aq '
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
.ad l
.\" -----------------------------------------------------------------
.\" * MAIN CONTENT STARTS HERE *
.\" -----------------------------------------------------------------
.SH "NAME"
udisksctl \- The udisks command line tool
.SH "SYNOPSIS"
.HP \w'\fBudisksctl\fR\ 'u
\fBudisksctl\fR status
.HP \w'\fBudisksctl\fR\ 'u
\fBudisksctl\fR info {\-\-object\-path\ \fIOBJECT\fR | \-\-block\-device\ \fIDEVICE\fR | \-\-drive\ \fIDRIVE\fR}
.HP \w'\fBudisksctl\fR\ 'u
\fBudisksctl\fR mount {\-\-object\-path\ \fIOBJECT\fR | \-\-block\-device\ \fIDEVICE\fR} [\-\-filesystem\-type\ \fITYPE\fR] [\-\-options\ \fIOPTIONS\fR...] [\-\-no\-user\-interaction]
.HP \w'\fBudisksctl\fR\ 'u
\fBudisksctl\fR unmount {\-\-object\-path\ \fIOBJECT\fR | \-\-block\-device\ \fIDEVICE\fR} [\-\-force] [\-\-no\-user\-interaction]
.HP \w'\fBudisksctl\fR\ 'u
\fBudisksctl\fR unlock {\-\-object\-path\ \fIOBJECT\fR | \-\-block\-device\ \fIDEVICE\fR} [\-\-no\-user\-interaction] [\-\-key\-file\ \fIPATH\fR] [\-\-read\-only]
.HP \w'\fBudisksctl\fR\ 'u
\fBudisksctl\fR lock {\-\-object\-path\ \fIOBJECT\fR | \-\-block\-device\ \fIDEVICE\fR} [\-\-no\-user\-interaction]
.HP \w'\fBudisksctl\fR\ 'u
\fBudisksctl\fR loop\-setup \-\-file\ \fIPATH\fR [\-\-read\-only] [\-\-offset\ \fIOFFSET\fR] [\-\-size\ \fISIZE\fR] [\-\-no\-user\-interaction]
.HP \w'\fBudisksctl\fR\ 'u
\fBudisksctl\fR loop\-delete {\-\-object\-path\ \fIOBJECT\fR | \-\-block\-device\ \fIDEVICE\fR} [\-\-no\-user\-interaction]
.HP \w'\fBudisksctl\fR\ 'u
\fBudisksctl\fR power\-off {\-\-object\-path\ \fIOBJECT\fR | \-\-block\-device\ \fIDEVICE\fR} [\-\-no\-user\-interaction]
.HP \w'\fBudisksctl\fR\ 'u
\fBudisksctl\fR smart\-simulate \-\-file\ \fIPATH\fR {\-\-object\-path\ \fIOBJECT\fR | \-\-block\-device\ \fIDEVICE\fR} [\-\-no\-user\-interaction]
.HP \w'\fBudisksctl\fR\ 'u
\fBudisksctl\fR monitor
.HP \w'\fBudisksctl\fR\ 'u
\fBudisksctl\fR dump
.HP \w'\fBudisksctl\fR\ 'u
\fBudisksctl\fR help
.SH "DESCRIPTION"
.PP
\fBudisksctl\fR
is a command\-line program used to interact with the
\fBudisksd\fR(8)
daemon process\&.
.SH "COMMANDS"
.PP
\fBstatus\fR
.RS 4
Shows high\-level information about disk drives and block devices\&.
.RE
.PP
\fBinfo\fR
.RS 4
Shows detailed information about
\fIOBJECT\fR,
\fIDEVICE\fR
or
\fIDRIVE\fR\&.
.RE
.PP
\fBmount\fR
.RS 4
Mounts a device\&. The device will be mounted in a subdirectory in the
/run/media
hierarchy \- upon successful completion, the mount point will be printed to standard output\&.
.PP
\fB\-t\fR, \fB\-\-filesystem\-type\fR
.RS 4
Filesystem type to use\&. If not specified, autodetected filesystem type will be used\&.
.RE
.PP
\fB\-o\fR, \fB\-\-options\fR
.RS 4
The device will be mounted with a safe set of default options\&. You can influence the options passed to the
\fBmount\fR(8)
command using this option\&. Note that only safe options are allowed \- requests with inherently unsafe options such as
\fIsuid\fR
or
\fIdev\fR
that would allow the caller to gain additional privileges, are rejected\&.
.RE
.RE
.PP
\fBunmount\fR
.RS 4
Unmounts a device\&. This only works if the device is mounted\&. The option
\fB\-\-force\fR
can be used to request that the device is unmounted even if active references exists\&.
.PP
\fB\-f\fR, \fB\-\-force\fR
.RS 4
Lazy unmount\&. Detach the filesystem from the file hierarchy now, and clean up all references to this filesystem as soon as it is not busy anymore\&.
.RE
.RE
.PP
\fBunlock\fR
.RS 4
Unlocks an encrypted device\&. The passphrase will be requested from the controlling terminal and upon successful completion, the cleartext device will be printed to standard output\&.
.PP
\fB\-\-key\-file=\fR\fB\fIPATH\fR\fR
.RS 4
Read passphrase from the given file\&.
.RE
.RE
.PP
\fBlock\fR
.RS 4
Locks a device\&. This only works if the device is a cleartext device backed by a cryptotext device\&.
.RE
.PP
\fBloop\-setup\fR
.RS 4
Sets up a loop device backed by
\fIFILE\fR\&.
.PP
\fB\-f\fR, \fB\-\-file=\fR\fB\fIFILE\fR\fR
.RS 4
File to set up a loop device for\&.
.RE
.PP
\fB\-r\fR, \fB\-\-read\-only\fR
.RS 4
Set up a read\-only loop device\&.
.RE
.PP
\fB\-o\fR, \fB\-\-offset=\fR\fB\fIOFFSET\fR\fR
.RS 4
The data start is moved
\fIOFFSET\fR
bytes into the specified file\&.
.RE
.PP
\fB\-s\fR, \fB\-\-size=\fR\fB\fISIZE\fR\fR
.RS 4
The data end is set to no more than
\fISIZE\fR
bytes after the data start\&.
.RE
.RE
.PP
\fBloop\-delete\fR
.RS 4
Tears down a loop device\&.
.RE
.PP
\fBpower\-off\fR
.RS 4
Arranges for the drive to be safely removed and powered off\&. On the OS side this includes ensuring that no process is using the drive, then requesting that in\-flight buffers and caches are committed to stable storage\&. The exact steps for powering off the drive depends on the drive itself and the interconnect used\&. For drives connected through USB, the effect is that the USB device will be deconfigured followed by disabling the upstream hub port it is connected to\&.
.sp
Note that as some physical devices contain multiple drives (for example 4\-in\-1 flash card reader USB devices) powering off one drive may affect other drives\&. As such there are not a lot of guarantees associated with performing this action\&. Usually the effect is that the drive disappears as if it was unplugged\&.
.RE
.PP
\fBsmart\-simulate\fR
.RS 4
Sets SMART data from the libatasmart blob given by
\fIFILE\fR
\- see
/usr/share/doc/libatasmart\-devel\-VERSION/
for blobs shipped with libatasmart\&. This is a debugging feature used to check that applications act correctly when a disk is failing\&.
.PP
\fB\-f\fR, \fB\-\-file=\fR\fB\fIFILE\fR\fR
.RS 4
File with the libatasmart blob\&.
.RE
.RE
.PP
\fBmonitor\fR
.RS 4
Monitors the daemon for events\&.
.RE
.PP
\fBdump\fR
.RS 4
Prints the current state of the daemon\&.
.RE
.PP
\fBhelp\fR
.RS 4
Prints help and exit\&.
.RE
.SH "DEVICE SPECIFICATION"
.PP
For commands that require a device as an argument following options can be used to specify it\&.
.PP
\fB\-b\fR, \fB\-\-block\-device=\fR\fB\fIDEVICE\fR\fR
.RS 4
Specify a device by its device file path\&. For example
\fI/dev/sda\fR\&.
.RE
.PP
\fB\-p\fR, \fB\-\-object\-path=\fR\fB\fIOBJECT\fR\fR
.RS 4
Specify a device by the UDisks internal object path without the /org/freedesktop/UDisks2 prefix\&. For example
\fIblock_devices/sda\fR
for the
/dev/sda
disk\&.
.RE
.PP
\fB\-d\fR, \fB\-\-drive=\fR\fB\fIDRIVE\fR\fR
.RS 4
Specify a drive by name, for example
\fIVirtIO_Disk\fR\&. This can be currently used only together with the
\fBinfo\fR
command\&.
.RE
.SH "COMMON OPTIONS"
.PP
The option
\fB\-\-no\-user\-interaction\fR
can be used to request that no interaction (such as the user being presented with an authentication dialog) must occur when checking with
\fBpolkit\fR(8)
whether the caller is authorized to perform the requested action\&.
.SH "AUDIENCE"
.PP
This program does not assume that the caller is the super user \- it is intended to be used by unprivileged users and authorizations are checked by the udisks daemon using
\fBpolkit\fR(8)\&. Additionally, this program is not intended to be used by scripts or other programs \- options/commands may change in incompatible ways in the future even in maintenance releases\&. See the
\(lqAPI STABILITY\(rq
section of
\fBudisks\fR(8)
for more information\&.
.SH "BASH COMPLETION"
.PP
\fBudisksctl\fR
ships with a bash completion script to complete commands, objects, block devices and some options\&.
.SH "AUTHOR"
.PP
This man page was originally written for UDisks2 by David Zeuthen
<zeuthen@gmail\&.com>
with a lot of help from many others\&.
.SH "BUGS"
.PP
Please send bug reports to either the distribution bug tracker or the upstream bug tracker at
\m[blue]\fB\%https://github.com/storaged-project/udisks/issues\fR\m[]\&.
.SH "SEE ALSO"
.PP
\fBudisks\fR(8),
\fBudisksd\fR(8),
\fBumount.udisks2\fR(8),
\fBpolkit\fR(8)
