Forrest logo
back to the udevadm tool

udevadm:tldr:85599

udevadm: List attributes of a device.
$ sudo udevadm info --attribute-walk --path ${-dev-sda1}
try on your machine

This command is used to gather information about a specific device, in this case, /dev/sda1 which is likely a partition on the first hard drive.

Let's break down the command:

  • sudo is a command that allows users to run programs with the security privileges of another user, typically the superuser (or root).
  • udevadm is a command-line tool used for querying and modifying the udev device manager.
  • info is the sub-command that provides information about a device.
  • --attribute-walk is an option that instructs udevadm to display information about all attributes and their values for the specified device. It provides a more detailed output.
  • --path is an option to specify the path of the device to gather information about.
  • ${-dev-sda1} is a variable representing the device path or device node that is being queried for information. In this case, it points to /dev/sda1.

Overall, this command, when executed with root privileges, will display detailed information and attributes of the /dev/sda1 device.

This explanation was created by an AI. In most cases those are correct. But please always be careful and never run a command you are not sure if it is safe.
back to the udevadm tool