mirror of
https://github.com/ivuorinen/cheatsheet-tldr.git
synced 2026-03-01 16:54:25 +00:00
Update cheatsheets
This commit is contained in:
33
linux/losetup
Normal file
33
linux/losetup
Normal file
@@ -0,0 +1,33 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, linux]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# losetup
|
||||
|
||||
> Set up and control loop devices.
|
||||
> More information: <https://manned.org/losetup>.
|
||||
|
||||
- List loop devices with detailed info:
|
||||
|
||||
`losetup -a`
|
||||
|
||||
- Attach a file to a given loop device:
|
||||
|
||||
`sudo losetup /dev/{{loop}} /{{path/to/file}}`
|
||||
|
||||
- Attach a file to a new free loop device and scan the device for partitions:
|
||||
|
||||
`sudo losetup --show --partscan -f /{{path/to/file}}`
|
||||
|
||||
- Attach a file to a read-only loop device:
|
||||
|
||||
`sudo losetup --read-only /dev/{{loop}} /{{path/to/file}}`
|
||||
|
||||
- Detach all loop devices:
|
||||
|
||||
`sudo losetup -D`
|
||||
|
||||
- Detach a given loop device:
|
||||
|
||||
`sudo losetup -d /dev/{{loop}}`
|
||||
Reference in New Issue
Block a user