⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 losetup.8

📁 Util-linux 软件包包含许多工具。其中比较重要的是加载、卸载、格式化、分区和管理硬盘驱动器
💻 8
字号:
.TH LOSETUP 8 "2003-07-01" "Linux" "MAINTENANCE COMMANDS".SH NAMElosetup \- set up and control loop devices.SH SYNOPSIS.ad lGet info:.sp.in +5.B losetup.I loop_device.sp.in -5Delete loop:.sp.in +5.B "losetup \-d".I loop_device.sp.in -5Print name of first unused loop device:.sp.in +5.B "losetup \-f".sp.in -5Setup loop device:.sp.in +5.B losetup.RB [{\-e | \-E}.IR encryption ].RB [ \-o.IR offset ].RB [ \-p.IR pfd ].in +8.RB { \-f | \fIloop_device\fP }.I file.in -13.ad b.SH DESCRIPTION.B losetupis used to associate loop devices with regular files or block devices,to detach loop devices and to query the status of a loop device. If only the\fIloop_device\fP argument is given, the status of the corresponding loopdevice is shown..SS "Encryption"It is possible to specify transfer functions (for encryption/decryptionor other purposes) using one of the.B \-Eand.B \-eoptions.There are two mechanisms to specify the desired encryption: by numberand by name. If an encryption is specified by number then onehas to make sure that the Linux kernel knows about the encryption with thatnumber, probably by patching the kernel. Standard numbers that arealways present are 0 (no encryption) and 1 (XOR encryption).When the cryptoloop module is loaded (or compiled in), it uses number 18.This cryptoloop module wil take the name of an arbitrary encryption typeand finds the module that knows how to perform that encryption.(Thus, either one uses a number different from 18 with the.B \-Eoption, or one uses a name with the.B \-eoption.).SH OPTIONS.IP \fB\-d\fPDetach the file or device associated with the specified loop device..IP "\fB\-E \fIencryption_type\fP"Enable data encryption with specified number..IP "\fB\-e \fIencryption_name\fP"Enable data encryption with specified name..IP "\fB\-f\fP"Find the first unused loop device. If a.I fileargument is present, use this device. Otherwise, print its name..IP "\fB\-o \fIoffset\fP"The data start is moved \fIoffset\fP bytes into the specified file ordevice..IP "\fB\-p \fInum\fP"Read the passphrase from file descriptor with number.I numinstead of from the terminal..SH RETURN VALUE.B losetupreturns 0 on success, nonzero on failure. When.B losetupdisplays the status of a loop device, it returns 1 if the deviceis not configured and 2 if an error occurred which prevented.B losetupfrom determining the status of the device..SH FILES.nf/dev/loop0, /dev/loop1, ...   loop devices (major=7).fi.SH EXAMPLEIf you are using the loadable module you must have the module loadedfirst with the command.IP# insmod loop.o.LPMaybe also encryption modules are needed..IP# insmod des.o# insmod cryptoloop.o.LPThe following commands can be used as an example of using the loop device..nf.IP# dd if=/dev/zero of=/file bs=1k count=100# losetup -e des /dev/loop0 /filePassword:Init (up to 16 hex digits):# mkfs -t ext2 /dev/loop0 100# mount -t ext2 /dev/loop0 /mnt ...# umount /dev/loop0# losetup -d /dev/loop0.fi.LPIf you are using the loadable module you may remove the module withthe command.IP# rmmod loop.LP.fi.SH RESTRICTIONDES encryption is painfully slow. On the other hand, XOR is terribly weak..\" .SH AUTHORS.\" .nf.\" Original version: Theodore Ts'o <tytso@athena.mit.edu>.\" Original DES by: Eric Young <eay@psych.psy.uq.oz.au>.\" .fi

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -