Linux command
udisksctl 命令
文本
复制后可按需替换文件名、目录或参数。
常用示例
Example
udisksctl status
Example
udisksctl info -b /dev/sdX
Mount
udisksctl mount -b /dev/sdX1
Unmount
udisksctl unmount -b /dev/sdX1
Power off
udisksctl power-off -b /dev/sdX
Monitor
udisksctl monitor
Unlock
udisksctl unlock -b /dev/sdX1
Lock
udisksctl lock -b /dev/sdX1
说明
udisksctl is a command-line interface for interacting with the udisksd daemon. It allows unprivileged users to query and manipulate storage devices, with authorization managed through polkit. Operations include mounting, unmounting, and powering off devices.
参数
- status
- Show high-level information about disk drives and block devices
- info
- Show detailed information about an object, device, or drive
- mount
- Mount a device; filesystem appears in /run/media hierarchy
- unmount
- Unmount a mounted device
- unlock
- Unlock an encrypted device
- lock
- Lock an unlocked encrypted device
- loop-setup
- Set up a loop device
- loop-delete
- Delete a loop device
- power-off
- Safely power off a drive for removal
- smart-simulate
- Simulate disk failure scenarios using SMART data
- monitor
- Monitor the daemon for events
- dump
- Show current state of the daemon
- -b, --block-device DEVICE
- Specify block device (e.g., /dev/sda)
- --object-path PATH
- Specify UDisks object path
- --filesystem-type TYPE
- Specify filesystem type for mount
- --options OPTIONS
- Specify mount options
- --force
- Force unmount (lazy unmount)
FAQ
What is the udisksctl command used for?
udisksctl is a command-line interface for interacting with the udisksd daemon. It allows unprivileged users to query and manipulate storage devices, with authorization managed through polkit. Operations include mounting, unmounting, and powering off devices.
How do I run a basic udisksctl example?
Run `udisksctl status` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does status do in udisksctl?
Show high-level information about disk drives and block devices