1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519
|
<?xml version="1.0"?>
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd"
[<!ENTITY version SYSTEM "../version.xml">]>
<refentry id="udisksctl.1">
<refentryinfo>
<title>udisksctl</title>
<date>August 2018</date>
<productname>udisks</productname>
</refentryinfo>
<refmeta>
<refentrytitle>udisksctl</refentrytitle>
<manvolnum>1</manvolnum>
<refmiscinfo class="manual">User Commands</refmiscinfo>
<refmiscinfo class="source">udisks</refmiscinfo>
<refmiscinfo class="version">&version;</refmiscinfo>
</refmeta>
<refnamediv>
<refname>udisksctl</refname>
<refpurpose>The udisks command line tool</refpurpose>
</refnamediv>
<refsynopsisdiv><title>SYNOPSIS</title>
<cmdsynopsis>
<command>udisksctl</command>
<arg choice="plain">status</arg>
</cmdsynopsis>
<cmdsynopsis>
<command>udisksctl</command>
<arg choice="plain">info</arg>
<group choice="req">
<arg choice="plain">--object-path <replaceable>OBJECT</replaceable></arg>
<arg choice="plain">--block-device <replaceable>DEVICE</replaceable></arg>
<arg choice="plain">--drive <replaceable>DRIVE</replaceable></arg>
</group>
</cmdsynopsis>
<cmdsynopsis>
<command>udisksctl</command>
<arg choice="plain">mount </arg>
<group choice="req">
<arg choice="plain">--object-path <replaceable>OBJECT</replaceable></arg>
<arg choice="plain">--block-device <replaceable>DEVICE</replaceable></arg>
</group>
<group>
<arg choice="plain">--filesystem-type <replaceable>TYPE</replaceable></arg>
</group>
<arg choice="opt" rep="repeat">--options <replaceable>OPTIONS</replaceable></arg>
<arg choice="opt">--no-user-interaction</arg>
</cmdsynopsis>
<cmdsynopsis>
<command>udisksctl</command>
<arg choice="plain">unmount </arg>
<group choice="req">
<arg choice="plain">--object-path <replaceable>OBJECT</replaceable></arg>
<arg choice="plain">--block-device <replaceable>DEVICE</replaceable></arg>
</group>
<arg choice="opt">--force</arg>
<arg choice="opt">--no-user-interaction</arg>
</cmdsynopsis>
<cmdsynopsis>
<command>udisksctl</command>
<arg choice="plain">unlock </arg>
<group choice="req">
<arg choice="plain">--object-path <replaceable>OBJECT</replaceable></arg>
<arg choice="plain">--block-device <replaceable>DEVICE</replaceable></arg>
</group>
<arg choice="opt">--no-user-interaction</arg>
<arg choice="opt">--key-file <replaceable>PATH</replaceable></arg>
<arg choice="opt">--read-only</arg>
</cmdsynopsis>
<cmdsynopsis>
<command>udisksctl</command>
<arg choice="plain">lock </arg>
<group choice="req">
<arg choice="plain">--object-path <replaceable>OBJECT</replaceable></arg>
<arg choice="plain">--block-device <replaceable>DEVICE</replaceable></arg>
</group>
<arg choice="opt">--no-user-interaction</arg>
</cmdsynopsis>
<cmdsynopsis>
<command>udisksctl</command>
<arg choice="plain">loop-setup </arg>
<arg choice="plain">--file <replaceable>PATH</replaceable></arg>
<arg choice="opt">--read-only</arg>
<arg choice="opt">--offset <replaceable>OFFSET</replaceable></arg>
<arg choice="opt">--size <replaceable>SIZE</replaceable></arg>
<arg choice="opt">--no-user-interaction</arg>
</cmdsynopsis>
<cmdsynopsis>
<command>udisksctl</command>
<arg choice="plain">loop-delete </arg>
<group choice="req">
<arg choice="plain">--object-path <replaceable>OBJECT</replaceable></arg>
<arg choice="plain">--block-device <replaceable>DEVICE</replaceable></arg>
</group>
<arg choice="opt">--no-user-interaction</arg>
</cmdsynopsis>
<cmdsynopsis>
<command>udisksctl</command>
<arg choice="plain">power-off </arg>
<group choice="req">
<arg choice="plain">--object-path <replaceable>OBJECT</replaceable></arg>
<arg choice="plain">--block-device <replaceable>DEVICE</replaceable></arg>
</group>
<arg choice="opt">--no-user-interaction</arg>
</cmdsynopsis>
<cmdsynopsis>
<command>udisksctl</command>
<arg choice="plain">smart-simulate </arg>
<arg choice="plain">--file <replaceable>PATH</replaceable></arg>
<group choice="req">
<arg choice="plain">--object-path <replaceable>OBJECT</replaceable></arg>
<arg choice="plain">--block-device <replaceable>DEVICE</replaceable></arg>
</group>
<arg choice="opt">--no-user-interaction</arg>
</cmdsynopsis>
<cmdsynopsis>
<command>udisksctl</command>
<arg choice="plain">monitor</arg>
</cmdsynopsis>
<cmdsynopsis>
<command>udisksctl</command>
<arg choice="plain">dump</arg>
</cmdsynopsis>
<cmdsynopsis>
<command>udisksctl</command>
<arg choice="plain">help</arg>
</cmdsynopsis>
</refsynopsisdiv>
<refsect1><title>DESCRIPTION</title>
<para>
<command>udisksctl</command> is a command-line program used
to interact with the
<citerefentry><refentrytitle>udisksd</refentrytitle><manvolnum>8</manvolnum></citerefentry>
daemon process.
</para>
</refsect1>
<refsect1>
<title>COMMANDS</title>
<variablelist>
<varlistentry>
<term><option>status</option></term>
<listitem>
<para>
Shows high-level information about disk drives and block
devices.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>info</option></term>
<listitem>
<para>
Shows detailed information about
<replaceable>OBJECT</replaceable>,
<replaceable>DEVICE</replaceable> or
<replaceable>DRIVE</replaceable>.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>mount</option></term>
<listitem>
<para>
Mounts a device. The device will be mounted in a
subdirectory in the <filename>/run/media</filename> hierarchy
- upon successful completion, the mount point will be
printed to standard output.
</para>
</listitem>
<varlistentry>
<term><option>-t</option></term>
<term><option>--filesystem-type</option></term>
<listitem>
<para>
Filesystem type to use. If not specified, autodetected filesystem
type will be used.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>-o</option></term>
<term><option>--options</option></term>
<listitem>
<para>
The device will be mounted with a safe set of default
options. You can influence the options passed to the
<citerefentry><refentrytitle>mount</refentrytitle><manvolnum>8</manvolnum></citerefentry>
command using this option. Note that only
safe options are allowed - requests with inherently unsafe
options such as <parameter>suid</parameter> or
<parameter>dev</parameter> that would allow the caller to
gain additional privileges, are rejected.
</para>
</listitem>
</varlistentry>
</varlistentry>
<varlistentry>
<term><option>unmount</option></term>
<listitem>
<para>
Unmounts a device. This only works if the device is
mounted. The option <option>--force</option> can be used
to request that the device is unmounted even if active
references exists.
</para>
</listitem>
<varlistentry>
<term><option>-f</option></term>
<term><option>--force</option></term>
<listitem>
<para>
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.
</para>
</listitem>
</varlistentry>
</varlistentry>
<varlistentry>
<term><option>unlock</option></term>
<listitem>
<para>
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.
</para>
</listitem>
<varlistentry>
<term><option>--key-file=<replaceable>PATH</replaceable></option></term>
<listitem>
<para>
Read passphrase from the given file.
</para>
</listitem>
</varlistentry>
</varlistentry>
<varlistentry>
<term><option>lock</option></term>
<listitem>
<para>
Locks a device. This only works if the device is a
cleartext device backed by a cryptotext device.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>loop-setup</option></term>
<listitem>
<para>
Sets up a loop device backed by <replaceable>FILE</replaceable>.
</para>
</listitem>
<varlistentry>
<term><option>-f</option></term>
<term><option>--file=<replaceable>FILE</replaceable></option></term>
<listitem>
<para>
File to set up a loop device for.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>-r</option></term>
<term><option>--read-only</option></term>
<listitem>
<para>
Set up a read-only loop device.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>-o</option></term>
<term><option>--offset=<replaceable>OFFSET</replaceable></option></term>
<listitem>
<para>
The data start is moved <replaceable>OFFSET</replaceable> bytes
into the specified file.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>-s</option></term>
<term><option>--size=<replaceable>SIZE</replaceable></option></term>
<listitem>
<para>
The data end is set to no more than <replaceable>SIZE</replaceable>
bytes after the data start.
</para>
</listitem>
</varlistentry>
</varlistentry>
<varlistentry>
<term><option>loop-delete</option></term>
<listitem>
<para>
Tears down a loop device.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>power-off</option></term>
<listitem>
<para>
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.
</para>
<para>
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.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>smart-simulate</option></term>
<listitem>
<para>
Sets SMART data from the libatasmart blob given by
<replaceable>FILE</replaceable> - see
<filename>/usr/share/doc/libatasmart-devel-VERSION/</filename>
for blobs shipped with libatasmart. This is a debugging
feature used to check that applications act correctly when
a disk is failing.
</para>
</listitem>
<varlistentry>
<term><option>-f</option></term>
<term><option>--file=<replaceable>FILE</replaceable></option></term>
<listitem>
<para>
File with the libatasmart blob.
</para>
</listitem>
</varlistentry>
</varlistentry>
<varlistentry>
<term><option>monitor</option></term>
<listitem><para>
Monitors the daemon for events.
</para></listitem>
</varlistentry>
<varlistentry>
<term><option>dump</option></term>
<listitem><para>
Prints the current state of the daemon.
</para></listitem>
</varlistentry>
<varlistentry>
<term><option>help</option></term>
<listitem><para>
Prints help and exit.
</para></listitem>
</varlistentry>
</variablelist>
</refsect1>
<refsect1>
<title>DEVICE SPECIFICATION</title>
<para>
For commands that require a device as an argument following options
can be used to specify it.
</para>
<variablelist>
<varlistentry>
<term><option>-b</option></term>
<term><option>--block-device=<replaceable>DEVICE</replaceable></option></term>
<listitem>
<para>
Specify a device by its device file path. For example
<emphasis>/dev/sda</emphasis>.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>-p</option></term>
<term><option>--object-path=<replaceable>OBJECT</replaceable></option></term>
<listitem>
<para>
Specify a device by the UDisks internal object path without the
/org/freedesktop/UDisks2 prefix. For example
<emphasis>block_devices/sda</emphasis>
for the <filename class="devicefile">/dev/sda</filename> disk.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>-d</option></term>
<term><option>--drive=<replaceable>DRIVE</replaceable></option></term>
<listitem>
<para>
Specify a drive by name, for example <emphasis>VirtIO_Disk</emphasis>.
This can be currently used only together with the
<option>info</option> command.
</para>
</listitem>
</varlistentry>
</variablelist>
</refsect1>
<refsect1>
<title>COMMON OPTIONS</title>
<para>
The option <option>--no-user-interaction</option> can be used
to request that no interaction (such as the user being
presented with an authentication dialog) must occur when
checking with
<citerefentry><refentrytitle>polkit</refentrytitle><manvolnum>8</manvolnum></citerefentry>
whether the caller is authorized to perform the requested
action.
</para>
</refsect1>
<refsect1><title>AUDIENCE</title>
<para>
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
<citerefentry><refentrytitle>polkit</refentrytitle><manvolnum>8</manvolnum></citerefentry>.
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
<quote>API STABILITY</quote> section of
<link linkend="udisks.8"><citerefentry><refentrytitle>udisks</refentrytitle><manvolnum>8</manvolnum></citerefentry></link>
for more information.
</para>
</refsect1>
<refsect1><title>BASH COMPLETION</title>
<para>
<command>udisksctl</command> ships with a bash completion script to
complete commands, objects, block devices and some options.
</para>
</refsect1>
<refsect1><title>AUTHOR</title>
<para>
This man page was originally written for UDisks2 by David Zeuthen
<email><![CDATA[zeuthen@gmail.com]]></email> with a lot of help
from many others.
</para>
</refsect1>
<refsect1>
<title>BUGS</title>
<para>
Please send bug reports to either the distribution bug tracker
or the upstream bug tracker at
<ulink url="https://github.com/storaged-project/udisks/issues"/>.
</para>
</refsect1>
<refsect1>
<title>SEE ALSO</title>
<para>
<link linkend="udisks.8"><citerefentry><refentrytitle>udisks</refentrytitle><manvolnum>8</manvolnum></citerefentry></link>,
<link linkend="udisksd.8"><citerefentry><refentrytitle>udisksd</refentrytitle><manvolnum>8</manvolnum></citerefentry></link>,
<link linkend="umount.udisks2.8"><citerefentry><refentrytitle>umount.udisks2</refentrytitle><manvolnum>8</manvolnum></citerefentry></link>,
<citerefentry>
<refentrytitle>polkit</refentrytitle><manvolnum>8</manvolnum>
</citerefentry>
</para>
</refsect1>
</refentry>
|