βš™οΈutil-linux

Util-linux is an open-source collection of Linux utilities that provides various security-related features, including password management and disk encryption.

Util-linux is a popular open-source collection of Linux utilities that provides various essential system tools to manage and maintain the Linux operating system. It includes more than 70 different utilities, such as fdisk, login, mount, and many others, that are commonly used by system administrators and end-users alike.

One of the critical utilities included in Util-linux is the security tool, which provides several security-related features for Linux systems. These features aim to secure the system against unauthorized access, prevent data loss, and maintain the system's integrity. In this article, we will discuss the different security-related features provided by the security tool in Util-linux.

One of the most crucial security features of the security tool is the password management utility. This utility allows administrators to manage user passwords and ensure that they are stored securely. It provides different password management options, such as setting password expiration dates, password length, and password complexity requirements. Additionally, the utility also provides a way to create new passwords, modify existing passwords, and verify password strength.

Another essential security feature provided by the security tool is the cryptsetup utility. This utility allows administrators to encrypt and decrypt the file system to protect sensitive data stored on the system. It supports different encryption methods, such as AES and Twofish, and provides various authentication options, such as passwords, keyfiles, and tokens. Additionally, cryptsetup also supports creating encrypted volumes on external devices such as USB drives.

Util-linux's security tool also includes a number of utilities that can be used to secure the boot process. The mkinitrd utility, for example, allows administrators to create a custom initramfs image, which can include different kernel modules and scripts that are required to boot the system. This can be used to ensure that only authorized users can boot the system, and that the system is protected against unauthorized modifications.

Finally, Util-linux's security tool also includes several utilities that can be used to audit the system and monitor its security. For example, the auditctl utility allows administrators to configure the Linux Audit System, which can be used to track system events and detect security-related issues. Additionally, the logname utility can be used to display the current user's login name, which can be useful for auditing purposes.

In conclusion, Util-linux's security tool provides several critical security-related features for Linux systems. These features aim to protect the system against unauthorized access, prevent data loss, and maintain the system's integrity. By using these tools, administrators can ensure that their Linux systems are secure and protected against potential security threats.

Packages and Binaries:

This package contains some extra BSD utilities: col, colcrt, colrm, column, hd, hexdump, look, ul and write. Other BSD utilities are provided by bsdutils and calendar.

Installed size: 337 KB How to install: sudo apt install bsdextrautils

Dependencies:
  • libc6

  • libsmartcols1

  • libtinfo6

col

Filter reverse line feeds from input

:~# col --help

Usage:
 col [options]

Filter out reverse line feeds from standard input.

Options:
 -b, --no-backspaces    do not output backspaces
 -f, --fine             permit forward half line feeds
 -p, --pass             pass unknown control sequences
 -h, --tabs             convert spaces to tabs
 -x, --spaces           convert tabs to spaces
 -l, --lines NUM        buffer at least NUM lines
 -H, --help             display this help
 -v, --version          display version

For more details see col(1).

colcrt

Filter nroff output for CRT previewing

:~# colcrt -h

Usage:
 colcrt [options] [<file>...]

Filter nroff output for CRT previewing.

Options:
 -,  --no-underlining    suppress all underlining
 -2, --half-lines        print all half-lines

 -h, --help              display this help
 -V, --version           display version

For more details see colcrt(1).

colrm

Remove columns from a file

:~# colrm -h

Usage:
 colrm [startcol [endcol]]

Filter out the specified columns.

Options:
 -h, --help     display this help
 -V, --version  display version
colrm reads from standard input and writes to standard output


For more details see colrm(1).

column

Columnate lists

:~# column -h

Usage:
 column [options] [<file>...]

Columnate lists.

Options:
 -t, --table                      create a table
 -n, --table-name <name>          table name for JSON output
 -O, --table-order <columns>      specify order of output columns
 -N, --table-columns <names>      comma separated columns names
 -l, --table-columns-limit <num>  maximal number of input columns
 -E, --table-noextreme <columns>  don't count long text from the columns to column width
 -d, --table-noheadings           don't print header
 -e, --table-header-repeat        repeat header for each page
 -H, --table-hide <columns>       don't print the columns
 -R, --table-right <columns>      right align text in these columns
 -T, --table-truncate <columns>   truncate text in the columns when necessary
 -W, --table-wrap <columns>       wrap text in the columns when necessary
 -L, --keep-empty-lines           don't ignore empty lines
 -J, --json                       use JSON output format for table

 -r, --tree <column>              column to use tree-like output for the table
 -i, --tree-id <column>           line ID to specify child-parent relation
 -p, --tree-parent <column>       parent to specify child-parent relation

 -c, --output-width <width>       width of output in number of characters
 -o, --output-separator <string>  columns separator for table output (default is two spaces)
 -s, --separator <string>         possible table delimiters
 -x, --fillrows                   fill rows before columns

 -h, --help                       display this help
 -V, --version                    display version

For more details see column(1).

hd

Display file contents in hexadecimal, decimal, octal, or ascii MFM/IDE hard disk devices

:~# hd -h

Usage:
 hd [options] <file>...

Display file contents in hexadecimal, decimal, octal, or ascii.

Options:
 -b, --one-byte-octal      one-byte octal display
 -c, --one-byte-char       one-byte character display
 -C, --canonical           canonical hex+ASCII display
 -d, --two-bytes-decimal   two-byte decimal display
 -o, --two-bytes-octal     two-byte octal display
 -x, --two-bytes-hex       two-byte hexadecimal display
 -L, --color[=<mode>]      interpret color formatting specifiers
                             colors are enabled by default
 -e, --format <format>     format string to be used for displaying data
 -f, --format-file <file>  file that contains format strings
 -n, --length <length>     interpret only length bytes of input
 -s, --skip <offset>       skip offset bytes from the beginning
 -v, --no-squeezing        output identical lines

 -h, --help                display this help
 -V, --version             display version

Arguments:
 <length> and <offset> arguments may be followed by the suffixes for
   GiB, TiB, PiB, EiB, ZiB, and YiB (the "iB" is optional)

For more details see hexdump(1).

hexdump

Display file contents in hexadecimal, decimal, octal, or ascii

:~# hexdump -h

Usage:
 hexdump [options] <file>...

Display file contents in hexadecimal, decimal, octal, or ascii.

Options:
 -b, --one-byte-octal      one-byte octal display
 -c, --one-byte-char       one-byte character display
 -C, --canonical           canonical hex+ASCII display
 -d, --two-bytes-decimal   two-byte decimal display
 -o, --two-bytes-octal     two-byte octal display
 -x, --two-bytes-hex       two-byte hexadecimal display
 -L, --color[=<mode>]      interpret color formatting specifiers
                             colors are enabled by default
 -e, --format <format>     format string to be used for displaying data
 -f, --format-file <file>  file that contains format strings
 -n, --length <length>     interpret only length bytes of input
 -s, --skip <offset>       skip offset bytes from the beginning
 -v, --no-squeezing        output identical lines

 -h, --help                display this help
 -V, --version             display version

Arguments:
 <length> and <offset> arguments may be followed by the suffixes for
   GiB, TiB, PiB, EiB, ZiB, and YiB (the "iB" is optional)

For more details see hexdump(1).

look

Display lines beginning with a given string

:~# look -h

Usage:
 look [options] <string> [<file>...]

Display lines beginning with a specified string.

Options:
 -a, --alternative        use the alternative dictionary
 -d, --alphanum           compare only blanks and alphanumeric characters
 -f, --ignore-case        ignore case differences when comparing
 -t, --terminate <char>   define the string-termination character

 -h, --help               display this help
 -V, --version            display version

For more details see look(1).

ul

Do underlining

:~# ul -h

Usage:
 ul [options] [<file> ...]

Do underlining.

Options:
 -t, -T, --terminal TERMINAL  override the TERM environment variable
 -i, --indicated              underlining is indicated via a separate line
 -h, --help                   display this help
 -V, --version                display version

For more details see ul(1).

write

Send a message to another user

:~# write -h

Usage:
 write [options] <user> [<ttyname>]

Send a message to another user.

Options:
 -h, --help     display this help
 -V, --version  display version

For more details see write(1).

bsdutils

This package contains the bare minimum of BSD utilities needed for a Debian system: logger, renice, script, scriptlive, scriptreplay and wall. The remaining standard BSD utilities are provided by bsdextrautils.

Installed size: 355 KB How to install: sudo apt install bsdutils

Dependencies:
  • libc6

  • libsystemd0

logger

Enter messages into the system log

:~# logger -h

Usage:
 logger [options] [<message>]

Enter messages into the system log.

Options:
 -i                       log the logger command's PID
     --id[=<id>]          log the given <id>, or otherwise the PID
 -f, --file <file>        log the contents of this file
 -e, --skip-empty         do not log empty lines when processing files
     --no-act             do everything except the write the log
 -p, --priority <prio>    mark given message with this priority
     --octet-count        use rfc6587 octet counting
     --prio-prefix        look for a prefix on every line read from stdin
 -s, --stderr             output message to standard error as well
 -S, --size <size>        maximum size for a single message
 -t, --tag <tag>          mark every line with this tag
 -n, --server <name>      write to this remote syslog server
 -P, --port <port>        use this port for UDP or TCP connection
 -T, --tcp                use TCP only
 -d, --udp                use UDP only
     --rfc3164            use the obsolete BSD syslog protocol
     --rfc5424[=<snip>]   use the syslog protocol (the default for remote);
                            <snip> can be notime, or notq, and/or nohost
     --sd-id <id>         rfc5424 structured data ID
     --sd-param <data>    rfc5424 structured data name=value
     --msgid <msgid>      set rfc5424 message id field
 -u, --socket <socket>    write to this Unix socket
     --socket-errors[=<on|off|auto>]
                          print connection errors when using Unix sockets
     --journald[=<file>]  write journald entry

 -h, --help               display this help
 -V, --version            display version

For more details see logger(1).

renice

Alter priority of running processes

:~# renice -h

Usage:
 renice [-n] <priority> [-p|--pid] <pid>...
 renice [-n] <priority>  -g|--pgrp <pgid>...
 renice [-n] <priority>  -u|--user <user>...

Alter the priority of running processes.

Options:
 -n, --priority <num>   specify the nice value
 -p, --pid              interpret arguments as process ID (default)
 -g, --pgrp             interpret arguments as process group ID
 -u, --user             interpret arguments as username or user ID

 -h, --help             display this help
 -V, --version          display version

For more details see renice(1).

script

Make typescript of terminal session

:~# script -h

Usage:
 script [options] [file]

Make a typescript of a terminal session.

Options:
 -I, --log-in <file>           log stdin to file
 -O, --log-out <file>          log stdout to file (default)
 -B, --log-io <file>           log stdin and stdout to file

 -T, --log-timing <file>       log timing information to file
 -t[<file>], --timing[=<file>] deprecated alias to -T (default file is stderr)
 -m, --logging-format <name>   force to 'classic' or 'advanced' format

 -a, --append                  append to the log file
 -c, --command <command>       run command rather than interactive shell
 -e, --return                  return exit code of the child process
 -f, --flush                   run flush after each write
     --force                   use output file even when it is a link
 -E, --echo <when>             echo input in session (auto, always or never)
 -o, --output-limit <size>     terminate if output files exceed size
 -q, --quiet                   be quiet

 -h, --help                    display this help
 -V, --version                 display version

For more details see script(1).

scriptlive

Re-run session typescripts, using timing information

:~# scriptlive -h

Usage:
 scriptlive [options]
 scriptlive [-t] timingfile [-I|-B] typescript

Execute terminal typescript.

Options:
 -t, --timing <file>     script timing log file
 -T, --log-timing <file> alias to -t
 -I, --log-in <file>     script stdin log file
 -B, --log-io <file>     script stdin and stdout log file

 -c, --command <command> run command rather than interactive shell
 -d, --divisor <num>     speed up or slow down execution with time divisor
 -m, --maxdelay <num>    wait at most this many seconds between updates
 -h, --help              display this help
 -V, --version           display version

For more details see scriptlive(1).

scriptreplay

Play back typescripts, using timing information

:~# scriptreplay -h

Usage:
 scriptreplay [options]
 scriptreplay [-t] timingfile [typescript] [divisor]

Play back terminal typescripts, using timing information.

Options:
 -t, --timing <file>     script timing log file
 -T, --log-timing <file> alias to -t
 -I, --log-in <file>     script stdin log file
 -O, --log-out <file>    script stdout log file (default)
 -B, --log-io <file>     script stdin and stdout log file

 -s, --typescript <file> deprecated alias to -O

     --summary           display overview about recorded session and exit
 -d, --divisor <num>     speed up or slow down execution with time divisor
 -m, --maxdelay <num>    wait at most this many seconds between updates
 -x, --stream <name>     stream type (out, in, signal or info)
 -c, --cr-mode <type>    CR char mode (auto, never, always)
 -h, --help              display this help
 -V, --version           display version

For more details see scriptreplay(1).

wall

Write a message to all users

:~# wall -h

Usage:
 wall [options] [<file> | <message>]

Write a message to all users.

Options:
 -g, --group <group>     only send message to group
 -n, --nobanner          do not print banner, works only for root
 -t, --timeout <timeout> write timeout in seconds

 -h, --help              display this help
 -V, --version           display version

For more details see wall(1).

eject

This program will eject CD-ROMs (assuming your drive supports the CDROMEJECT ioctl). It also allows setting the autoeject feature.

On supported ATAPI/IDE multi-disc CD-ROM changers, it allows changing the active disc.

You can also use eject to properly disconnect external mass-storage devices like digital cameras or portable music players.

Installed size: 132 KB How to install: sudo apt install eject

Dependencies:
  • libc6

  • libmount1

eject

Eject removable media

:~# eject -h

Usage:
 eject [options] [<device>|<mountpoint>]

Eject removable media.

Options:
 -a, --auto <on|off>         turn auto-eject feature on or off
 -c, --changerslot <slot>    switch discs on a CD-ROM changer
 -d, --default               display default device
 -f, --floppy                eject floppy
 -F, --force                 don't care about device type
 -i, --manualeject <on|off>  toggle manual eject protection on/off
 -m, --no-unmount            do not unmount device even if it is mounted
 -M, --no-partitions-unmount do not unmount another partitions
 -n, --noop                  don't eject, just show device found
 -p, --proc                  use /proc/mounts instead of /etc/mtab
 -q, --tape                  eject tape
 -r, --cdrom                 eject CD-ROM
 -s, --scsi                  eject SCSI device
 -t, --trayclose             close tray
 -T, --traytoggle            toggle tray
 -v, --verbose               enable verbose output
 -x, --cdspeed <speed>       set CD-ROM max speed
 -X, --listspeed             list CD-ROM available speeds

 -h, --help                  display this help
 -V, --version               display version

By default tries -r, -s, -f, and -q in order until success.

For more details see eject(1).

fdisk

This package contains the classic fdisk, sfdisk and cfdisk partitioning utilities from the util-linux suite.

The utilities included in this package allow you to partition your hard disk. The utilities supports both modern and legacy partition tables (eg. GPT, MBR, etc).

The fdisk utility is the classical text-mode utility. The cfdisk utilitity gives a more userfriendly curses based interface. The sfdisk utility is mostly for automation and scripting uses.

Installed size: 479 KB How to install: sudo apt install fdisk

Dependencies:
  • libc6

  • libfdisk1

  • libmount1

  • libncursesw6

  • libreadline8

  • libsmartcols1

  • libtinfo6

cfdisk

Display or manipulate a disk partition table

:~# cfdisk -h

Usage:
 cfdisk [options] <disk>

Display or manipulate a disk partition table.

Options:
 -L, --color[=<when>]     colorize output (auto, always or never)
                            colors are enabled by default
 -z, --zero               start with zeroed partition table
     --lock[=<mode>]      use exclusive device lock (yes, no or nonblock)
 -r, --read-only          forced open cfdisk in read-only mode

 -h, --help               display this help
 -V, --version            display version

For more details see cfdisk(8).

fdisk

Manipulate disk partition table

:~# fdisk -h

Usage:
 fdisk [options] <disk>         change partition table
 fdisk [options] -l [<disk>...] list partition table(s)

Display or manipulate a disk partition table.

Options:
 -b, --sector-size <size>      physical and logical sector size
 -B, --protect-boot            don't erase bootbits when creating a new label
 -c, --compatibility[=<mode>]  mode is 'dos' or 'nondos' (default)
 -L, --color[=<when>]          colorize output (auto, always or never)
                                 colors are enabled by default
 -l, --list                    display partitions and exit
 -x, --list-details            like --list but with more details
 -n, --noauto-pt               don't create default partition table on empty devices
 -o, --output <list>           output columns
 -t, --type <type>             recognize specified partition table type only
 -u, --units[=<unit>]          display units: 'cylinders' or 'sectors' (default)
 -s, --getsz                   display device size in 512-byte sectors [DEPRECATED]
     --bytes                   print SIZE in bytes rather than in human readable format
     --lock[=<mode>]           use exclusive device lock (yes, no or nonblock)
 -w, --wipe <mode>             wipe signatures (auto, always or never)
 -W, --wipe-partitions <mode>  wipe signatures from new partitions (auto, always or never)

 -C, --cylinders <number>      specify the number of cylinders
 -H, --heads <number>          specify the number of heads
 -S, --sectors <number>        specify the number of sectors per track

 -h, --help                    display this help
 -V, --version                 display version

Available output columns:
 gpt: Device Start End Sectors Size Type Type-UUID Attrs Name UUID
 dos: Device Start End Sectors Cylinders Size Type Id Attrs Boot End-C/H/S
      Start-C/H/S
 bsd: Slice Start End Sectors Cylinders Size Type Bsize Cpg Fsize
 sgi: Device Start End Sectors Cylinders Size Type Id Attrs
 sun: Device Start End Sectors Cylinders Size Type Id Flags

For more details see fdisk(8).

sfdisk

Display or manipulate a disk partition table

:~# sfdisk -h

Usage:
 sfdisk [options] <dev> [[-N] <part>]
 sfdisk [options] <command>

Display or manipulate a disk partition table.

Commands:
 -A, --activate <dev> [<part> ...] list or set bootable (P)MBR partitions
 -d, --dump <dev>                  dump partition table (usable for later input)
 -J, --json <dev>                  dump partition table in JSON format
 -B, --backup-pt-sectors <dev>     binary partition table backup (see -b and -O)
 -g, --show-geometry [<dev> ...]   list geometry of all or specified devices
 -l, --list [<dev> ...]            list partitions of each device
 -F, --list-free [<dev> ...]       list unpartitioned free areas of each device
 -r, --reorder <dev>               fix partitions order (by start offset)
 -s, --show-size [<dev> ...]       list sizes of all or specified devices
 -T, --list-types                  print the recognized types (see -X)
 -V, --verify [<dev> ...]          test whether partitions seem correct
     --delete <dev> [<part> ...]   delete all or specified partitions

 --part-label <dev> <part> [<str>] print or change partition label
 --part-type <dev> <part> [<type>] print or change partition type
 --part-uuid <dev> <part> [<uuid>] print or change partition uuid
 --part-attrs <dev> <part> [<str>] print or change partition attributes

 --disk-id <dev> [<str>]           print or change disk label ID (UUID)
 --relocate <oper> <dev>           move partition header

Arguments:
 <dev>                     device (usually disk) path
 <part>                    partition number
 <type>                    partition type, GUID for GPT, hex for MBR

Options:
 -a, --append              append partitions to existing partition table
 -b, --backup              backup partition table sectors (see -O)
     --bytes               print SIZE in bytes rather than in human readable format
     --move-data[=<typescript>] move partition data after relocation (requires -N)
     --move-use-fsync      use fsync after each write when move data
 -f, --force               disable all consistency checking
     --color[=<when>]      colorize output (auto, always or never)
                             colors are enabled by default
     --lock[=<mode>]       use exclusive device lock (yes, no or nonblock)
 -N, --partno <num>        specify partition number
 -n, --no-act              do everything except write to device
     --no-reread           do not check whether the device is in use
     --no-tell-kernel      do not tell kernel about changes
 -O, --backup-file <path>  override default backup file name
 -o, --output <list>       output columns
 -q, --quiet               suppress extra info messages
 -w, --wipe <mode>         wipe signatures (auto, always or never)
 -W, --wipe-partitions <mode>  wipe signatures from new partitions (auto, always or never)
 -X, --label <name>        specify label type (dos, gpt, ...)
 -Y, --label-nested <name> specify nested label type (dos, bsd)

 -G, --show-pt-geometry    deprecated, alias to --show-geometry
 -L, --Linux               deprecated, only for backward compatibility
 -u, --unit S              deprecated, only sector unit is supported

 -h, --help                display this help
 -v, --version             display version

Available output columns:
 gpt: Device Start End Sectors Size Type Type-UUID Attrs Name UUID
 dos: Device Start End Sectors Cylinders Size Type Id Attrs Boot End-C/H/S
      Start-C/H/S
 bsd: Slice Start End Sectors Cylinders Size Type Bsize Cpg Fsize
 sgi: Device Start End Sectors Cylinders Size Type Id Attrs
 sun: Device Start End Sectors Cylinders Size Type Id Flags

For more details see sfdisk(8).

libblkid-dev

The blkid library allows system programs such as fsck and mount to quickly and easily find block devices by filesystem UUID or label. This allows system administrators to avoid specifying filesystems by hard-coded device names and use a logical naming system instead.

This package contains the development environment for the blkid library.

Installed size: 875 KB How to install: sudo apt install libblkid-dev

Dependencies:
  • libblkid1

  • libc6-dev | libc-dev

  • uuid-dev


libblkid1

The blkid library allows system programs such as fsck and mount to quickly and easily find block devices by filesystem UUID or label. This allows system administrators to avoid specifying filesystems by hard-coded device names and use a logical naming system instead.

Installed size: 398 KB How to install: sudo apt install libblkid1

Dependencies:
  • libc6


libfdisk-dev

The libfdisk library is used for manipulating partition tables. It is the core of the fdisk, cfdisk, and sfdisk tools.

This package contains the development environment for the fdisk library.

Installed size: 77 KB How to install: sudo apt install libfdisk-dev

Dependencies:
  • libblkid-dev

  • libc6-dev | libc-dev

  • libfdisk1

  • uuid-dev


libfdisk1

The libfdisk library is used for manipulating partition tables. It is the core of the fdisk, cfdisk, and sfdisk tools.

Installed size: 533 KB How to install: sudo apt install libfdisk1

Dependencies:
  • libblkid1

  • libc6

  • libuuid1


libmount-dev

This device mounting library is used by mount and umount helpers.

This package contains the development environment for the mount library.

Installed size: 81 KB How to install: sudo apt install libmount-dev

Dependencies:
  • libblkid-dev

  • libc6-dev | libc-dev

  • libmount1

  • libselinux1-dev


libmount1

This device mounting library is used by mount and umount helpers.

Installed size: 454 KB How to install: sudo apt install libmount1

Dependencies:
  • libblkid1

  • libc6

  • libselinux1


libsmartcols-dev

This smart column output alignment library is used by fdisk utilities.

This package contains the development environment for the mount library.

Installed size: 61 KB How to install: sudo apt install libsmartcols-dev

Dependencies:
  • libc6-dev | libc-dev

  • libsmartcols1


libsmartcols1

This smart column output alignment library is used by fdisk utilities.

Installed size: 289 KB How to install: sudo apt install libsmartcols1

Dependencies:
  • libc6


libuuid1

The libuuid library generates and parses 128-bit Universally Unique IDs (UUIDs). A UUID is an identifier that is unique within the space of all such identifiers across both space and time. It can be used for multiple purposes, from tagging objects with an extremely short lifetime to reliably identifying very persistent objects across a network.

See RFC 4122 for more information.

Installed size: 79 KB How to install: sudo apt install libuuid1

Dependencies:
  • libc6


mount

This package provides the mount(8), umount(8), swapon(8), swapoff(8), and losetup(8) commands.

Installed size: 393 KB How to install: sudo apt install mount

Dependencies:
  • libblkid1

  • libc6

  • libmount1

  • libselinux1

  • libsmartcols1

losetup

Set up and control loop devices

:~# losetup -h

Usage:
 losetup [options] [<loopdev>]
 losetup [options] -f | <loopdev> <file>

Set up and control loop devices.

Options:
 -a, --all                     list all used devices
 -d, --detach <loopdev>...     detach one or more devices
 -D, --detach-all              detach all used devices
 -f, --find                    find first unused device
 -c, --set-capacity <loopdev>  resize the device
 -j, --associated <file>       list all devices associated with <file>
 -L, --nooverlap               avoid possible conflict between devices

 -o, --offset <num>            start at offset <num> into file
     --sizelimit <num>         device is limited to <num> bytes of the file
 -b, --sector-size <num>       set the logical sector size to <num>
 -P, --partscan                create a partitioned loop device
 -r, --read-only               set up a read-only loop device
     --direct-io[=<on|off>]    open backing file with O_DIRECT
     --show                    print device name after setup (with -f)
 -v, --verbose                 verbose mode

 -J, --json                    use JSON --list output format
 -l, --list                    list info about all or specified (default)
 -n, --noheadings              don't print headings for --list output
 -O, --output <cols>           specify columns to output for --list
     --output-all              output all columns
     --raw                     use raw --list output format

 -h, --help                    display this help
 -V, --version                 display version

Available output columns:
         NAME  loop device name
    AUTOCLEAR  autoclear flag set
    BACK-FILE  device backing file
     BACK-INO  backing file inode number
 BACK-MAJ:MIN  backing file major:minor device number
      MAJ:MIN  loop device major:minor number
       OFFSET  offset from the beginning
     PARTSCAN  partscan flag set
           RO  read-only device
    SIZELIMIT  size limit of the file in bytes
          DIO  access backing file with direct-io
      LOG-SEC  logical sector size in bytes

For more details see losetup(8).

mount

Mount a filesystem

:~# mount -h

Usage:
 mount [-lhV]
 mount -a [options]
 mount [options] [--source] <source> | [--target] <directory>
 mount [options] <source> <directory>
 mount <operation> <mountpoint> [<target>]

Mount a filesystem.

Options:
 -a, --all               mount all filesystems mentioned in fstab
 -c, --no-canonicalize   don't canonicalize paths
 -f, --fake              dry run; skip the mount(2) syscall
 -F, --fork              fork off for each device (use with -a)
 -T, --fstab <path>      alternative file to /etc/fstab
 -i, --internal-only     don't call the mount.<type> helpers
 -l, --show-labels       show also filesystem labels
 -m, --mkdir[=<mode>]    alias to '-o X-mount.mkdir[=<mode>]'
 -n, --no-mtab           don't write to /etc/mtab
     --options-mode <mode>
                         what to do with options loaded from fstab
     --options-source <source>
                         mount options source
     --options-source-force
                         force use of options from fstab/mtab
 -o, --options <list>    comma-separated list of mount options
 -O, --test-opts <list>  limit the set of filesystems (use with -a)
 -r, --read-only         mount the filesystem read-only (same as -o ro)
 -t, --types <list>      limit the set of filesystem types
     --source <src>      explicitly specifies source (path, label, uuid)
     --target <target>   explicitly specifies mountpoint
     --target-prefix <path>
                         specifies path used for all mountpoints
 -v, --verbose           say what is being done
 -w, --rw, --read-write  mount the filesystem read-write (default)
 -N, --namespace <ns>    perform mount in another namespace

 -h, --help              display this help
 -V, --version           display version

Source:
 -L, --label <label>     synonym for LABEL=<label>
 -U, --uuid <uuid>       synonym for UUID=<uuid>
 LABEL=<label>           specifies device by filesystem label
 UUID=<uuid>             specifies device by filesystem UUID
 PARTLABEL=<label>       specifies device by partition label
 PARTUUID=<uuid>         specifies device by partition UUID
 ID=<id>                 specifies device by udev hardware ID
 <device>                specifies device by path
 <directory>             mountpoint for bind mounts (see --bind/rbind)
 <file>                  regular file for loopdev setup

Operations:
 -B, --bind              mount a subtree somewhere else (same as -o bind)
 -M, --move              move a subtree to some other place
 -R, --rbind             mount a subtree and all submounts somewhere else
 --make-shared           mark a subtree as shared
 --make-slave            mark a subtree as slave
 --make-private          mark a subtree as private
 --make-unbindable       mark a subtree as unbindable
 --make-rshared          recursively mark a whole subtree as shared
 --make-rslave           recursively mark a whole subtree as slave
 --make-rprivate         recursively mark a whole subtree as private
 --make-runbindable      recursively mark a whole subtree as unbindable

For more details see mount(8).

swapoff

Enable/disable devices and files for paging and swapping

:~# swapoff -h

Usage:
 swapoff [options] [<spec>]

Disable devices and files for paging and swapping.

Options:
 -a, --all              disable all swaps from /proc/swaps
 -v, --verbose          verbose mode

 -h, --help             display this help
 -V, --version          display version

The <spec> parameter:
 -L <label>             LABEL of device to be used
 -U <uuid>              UUID of device to be used
 LABEL=<label>          LABEL of device to be used
 UUID=<uuid>            UUID of device to be used
 <device>               name of device to be used
 <file>                 name of file to be used

For more details see swapoff(8).

swapon

Enable/disable devices and files for paging and swapping

:~# swapon -h

Usage:
 swapon [options] [<spec>]

Enable devices and files for paging and swapping.

Options:
 -a, --all                enable all swaps from /etc/fstab
 -d, --discard[=<policy>] enable swap discards, if supported by device
 -e, --ifexists           silently skip devices that do not exist
 -f, --fixpgsz            reinitialize the swap space if necessary
 -o, --options <list>     comma-separated list of swap options
 -p, --priority <prio>    specify the priority of the swap device
 -s, --summary            display summary about used swap devices (DEPRECATED)
     --show[=<columns>]   display summary in definable table
     --noheadings         don't print table heading (with --show)
     --raw                use the raw output format (with --show)
     --bytes              display swap size in bytes in --show output
 -v, --verbose            verbose mode

 -h, --help               display this help
 -V, --version            display version

The <spec> parameter:
 -L <label>             synonym for LABEL=<label>
 -U <uuid>              synonym for UUID=<uuid>
 LABEL=<label>          specifies device by swap area label
 UUID=<uuid>            specifies device by swap area UUID
 PARTLABEL=<label>      specifies device by partition label
 PARTUUID=<uuid>        specifies device by partition UUID
 <device>               name of device to be used
 <file>                 name of file to be used

Available discard policy types (for --discard):
 once    : only single-time area discards are issued
 pages   : freed pages are discarded before they are reused
If no policy is selected, both discard types are enabled (default).

Available output columns:
 NAME   device file or partition path
 TYPE   type of the device
 SIZE   size of the swap area
 USED   bytes in use
 PRIO   swap priority
 UUID   swap uuid
 LABEL  swap label

For more details see swapon(8).

umount

Unmount filesystems

:~# umount -h

Usage:
 umount [-hV]
 umount -a [options]
 umount [options] <source> | <directory>

Unmount filesystems.

Options:
 -a, --all               unmount all filesystems
 -A, --all-targets       unmount all mountpoints for the given device in the
                           current namespace
 -c, --no-canonicalize   don't canonicalize paths
 -d, --detach-loop       if mounted loop device, also free this loop device
     --fake              dry run; skip the umount(2) syscall
 -f, --force             force unmount (in case of an unreachable NFS system)
 -i, --internal-only     don't call the umount.<type> helpers
 -n, --no-mtab           don't write to /etc/mtab
 -l, --lazy              detach the filesystem now, clean up things later
 -O, --test-opts <list>  limit the set of filesystems (use with -a)
 -R, --recursive         recursively unmount a target with all its children
 -r, --read-only         in case unmounting fails, try to remount read-only
 -t, --types <list>      limit the set of filesystem types
 -v, --verbose           say what is being done
 -q, --quiet             suppress 'not mounted' error messages
 -N, --namespace <ns>    perform umount in another namespace

 -h, --help              display this help
 -V, --version           display version

For more details see umount(8).

rfkill

rfkill is a simple tool for accessing the Linux rfkill device interface, which is used to enable and disable wireless networking devices, typically WLAN, Bluetooth and mobile broadband.

Installed size: 97 KB How to install: sudo apt install rfkill

Dependencies:
  • libc6

  • libsmartcols1

rfkill

Tool for enabling and disabling wireless devices

:~# rfkill -h

Usage:
 rfkill [options] command [identifier ...]

Tool for enabling and disabling wireless devices.

Options:
 -J, --json             use JSON output format
 -n, --noheadings       don't print headings
 -o, --output <list>    define which output columns to use
     --output-all       output all columns
 -r, --raw              use the raw output format

 -h, --help             display this help
 -V, --version          display version

Available output columns:
 DEVICE      kernel device name
 ID          device identifier value
 TYPE        device type name that can be used as identifier
 TYPE-DESC   device type description
 SOFT        status of software block
 HARD        status of hardware block

Commands:
 help
 event
 list   [identifier]
 block   identifier
 unblock identifier
 toggle  identifier

For more details see rfkill(8).

util-linux

This package contains a number of important utilities, most of which are oriented towards maintenance of your system. Some of the more important utilities included in this package allow you to view kernel messages, create new filesystems, view block device information, interface with real time clock, etc.

Installed size: 4.85 MB How to install: sudo apt install util-linux

Dependencies:
  • libblkid1