OSDN Git Service

util-linux 2.38: 翻訳予約。
[linuxjm/jm.git] / manual / util-linux / original / man8 / cfdisk.8
1 '\" t
2 .\"     Title: cfdisk
3 .\"    Author: [see the "AUTHOR(S)" section]
4 .\" Generator: Asciidoctor 2.0.15
5 .\"      Date: 2022-02-17
6 .\"    Manual: System Administration
7 .\"    Source: util-linux 2.38
8 .\"  Language: English
9 .\"
10 .TH "CFDISK" "8" "2022-02-17" "util\-linux 2.38" "System Administration"
11 .ie \n(.g .ds Aq \(aq
12 .el       .ds Aq '
13 .ss \n[.ss] 0
14 .nh
15 .ad l
16 .de URL
17 \fI\\$2\fP <\\$1>\\$3
18 ..
19 .als MTO URL
20 .if \n[.g] \{\
21 .  mso www.tmac
22 .  am URL
23 .    ad l
24 .  .
25 .  am MTO
26 .    ad l
27 .  .
28 .  LINKSTYLE blue R < >
29 .\}
30 .SH "NAME"
31 cfdisk \- display or manipulate a disk partition table
32 .SH "SYNOPSIS"
33 .sp
34 \fBcfdisk\fP [options] [\fIdevice\fP]
35 .SH "DESCRIPTION"
36 .sp
37 \fBcfdisk\fP is a curses\-based program for partitioning any block device. The default device is \fI/dev/sda\fP.
38 .sp
39 Note that \fBcfdisk\fP provides basic partitioning functionality with a user\-friendly interface. If you need advanced features, use \fBfdisk\fP(8) instead.
40 .sp
41 All disk label changes will remain in memory only, and the disk will be unmodified until you decide to write your changes. Be careful before using the write command.
42 .sp
43 Since version 2.25 \fBcfdisk\fP supports MBR (DOS), GPT, SUN and SGI disk labels, but no longer provides any functionality for CHS (Cylinder\-Head\-Sector) addressing. CHS has never been important for Linux, and this addressing concept does not make any sense for new devices.
44 .sp
45 Since version 2.25 \fBcfdisk\fP also does not provide a \(aqprint\(aq command any more. This functionality is provided by the utilities \fBpartx\fP(8) and \fBlsblk\fP(8) in a very comfortable and rich way.
46 .sp
47 If you want to remove an old partition table from a device, use \fBwipefs\fP(8).
48 .SH "OPTIONS"
49 .sp
50 \fB\-h\fP, \fB\-\-help\fP
51 .RS 4
52 Display help text and exit.
53 .RE
54 .sp
55 \fB\-V\fP, \fB\-\-version\fP
56 .RS 4
57 Print version and exit.
58 .RE
59 .sp
60 \fB\-L\fP, \fB\-\-color\fP[\fB=\fP\fIwhen\fP]
61 .RS 4
62 Colorize the output. The optional argument \fIwhen\fP can be \fBauto\fP, \fBnever\fP or \fBalways\fP. If the \fIwhen\fP argument is omitted, it defaults to \fBauto\fP. The colors can be disabled, for the current built\-in default see \fB\-\-help\fP output. See also the \fBCOLORS\fP section.
63 .RE
64 .sp
65 \fB\-\-lock\fP[=\fImode\fP]
66 .RS 4
67 Use exclusive BSD lock for device or file it operates. The optional argument \fImode\fP can be \fByes\fP, \fBno\fP (or 1 and 0) or \fBnonblock\fP. If the \fImode\fP argument is omitted, it defaults to \fByes\fP. This option overwrites environment variable \fB$LOCK_BLOCK_DEVICE\fP. The default is not to use any lock at all, but it\(cqs recommended to avoid collisions with \fBsystemd\-udevd\fP(8) or other tools.
68 .RE
69 .sp
70 \fB\-r\fP, \fB\-\-read\-only\fP
71 .RS 4
72 Forced open in read\-only mode.
73 .RE
74 .sp
75 \fB\-z\fP, \fB\-\-zero\fP
76 .RS 4
77 Start with an in\-memory zeroed partition table. This option does not zero the partition table on the disk; rather, it simply starts the program without reading the existing partition table. This option allows you to create a new partition table from scratch or from an \fBsfdisk\fP(8)\-compatible script.
78 .RE
79 .SH "COMMANDS"
80 .sp
81 The commands for \fBcfdisk\fP can be entered by pressing the corresponding key (pressing \fIEnter\fP after the command is not necessary). Here is a list of the available commands:
82 .sp
83 \fBb\fP
84 .RS 4
85 Toggle the bootable flag of the current partition. This allows you to select which primary partition is bootable on the drive. This command may not be available for all partition label types.
86 .RE
87 .sp
88 \fBd\fP
89 .RS 4
90 Delete the current partition. This will convert the current partition into free space and merge it with any free space immediately surrounding the current partition. A partition already marked as free space or marked as unusable cannot be deleted.
91 .RE
92 .sp
93 \fBh\fP
94 .RS 4
95 Show the help screen.
96 .RE
97 .sp
98 \fBn\fP
99 .RS 4
100 Create a new partition from free space. \fBcfdisk\fP then prompts you for the size of the partition you want to create. The default size is equal to the entire available free space at the current position.
101 .sp
102 The size may be followed by a multiplicative suffix: KiB (=1024), MiB (=1024*1024), and so on for GiB, TiB, PiB, EiB, ZiB and YiB (the "iB" is optional, e.g., "K" has the same meaning as "KiB").
103 .RE
104 .sp
105 \fBq\fP
106 .RS 4
107 Quit the program. This will exit the program without writing any data to the disk.
108 .RE
109 .sp
110 \fBr\fP
111 .RS 4
112 Reduce or enlarge the current partition. \fBcfdisk\fP then prompts you for the new size of the partition. The default size is the current size. A partition marked as free space or marked as unusable cannot be resized.
113 .sp
114 \fBNote that reducing the size of a partition might destroy data on that partition.\fP
115 .RE
116 .sp
117 \fBs\fP
118 .RS 4
119 Sort the partitions in ascending start\-sector order. When deleting and adding partitions, it is likely that the numbering of the partitions will no longer match their order on the disk. This command restores that match.
120 .RE
121 .sp
122 \fBt\fP
123 .RS 4
124 Change the partition type. By default, new partitions are created as \fILinux\fP partitions.
125 .RE
126 .sp
127 \fBu\fP
128 .RS 4
129 Dump the current in\-memory partition table to an \fBsfdisk\fP(8)\-compatible script file.
130 .sp
131 The script files are compatible between \fBcfdisk\fP, \fBfdisk\fP(8) \fBsfdisk\fP(8) and other libfdisk applications. For more details see \fBsfdisk\fP(8).
132 .sp
133 It is also possible to load an sfdisk\-script into \fBcfdisk\fP if there is no partition table on the device or when you start \fBcfdisk\fP with the \fB\-\-zero\fP command\-line option.
134 .RE
135 .sp
136 \fBW\fP
137 .RS 4
138 Write the partition table to disk (you must enter an uppercase W). Since this might destroy data on the disk, you must either confirm or deny the write by entering `yes\(aq or `no\(aq. If you enter `yes\(aq, \fBcfdisk\fP will write the partition table to disk and then tell the kernel to re\-read the partition table from the disk.
139 .sp
140 The re\-reading of the partition table does not always work. In such a case you need to inform the kernel about any new partitions by using \fBpartprobe\fP(8) or \fBpartx\fP(8), or by rebooting the system.
141 .RE
142 .sp
143 \fBx\fP
144 .RS 4
145 Toggle extra information about a partition.
146 .RE
147 .sp
148 \fIUp Arrow\fP, \fIDown Arrow\fP
149 .RS 4
150 Move the cursor to the previous or next partition. If there are more partitions than can be displayed on a screen, you can display the next (previous) set of partitions by moving down (up) at the last (first) partition displayed on the screen.
151 .RE
152 .sp
153 \fILeft Arrow\fP, \fIRight Arrow\fP
154 .RS 4
155 Select the preceding or the next menu item. Hitting \fIEnter\fP will execute the currently selected item.
156 .RE
157 .sp
158 All commands can be entered with either uppercase or lowercase letters (except for \fBW\fPrite). When in a submenu or at a prompt, you can hit the \fIEsc\fP key to return to the main menu.
159 .SH "COLORS"
160 .sp
161 The output colorization is implemented by \fBterminal\-colors.d\fP(5) functionality.
162 Implicit coloring can be disabled by an empty file
163 .RS 3
164 .ll -.6i
165 .sp
166 \fI/etc/terminal\-colors.d/cfdisk.disable\fP
167 .br
168 .RE
169 .ll
170 .sp
171 for the \fBcfdisk\fP command or for all tools by
172 .RS 3
173 .ll -.6i
174 .sp
175 \fI/etc/terminal\-colors.d/disable\fP
176 .br
177 .RE
178 .ll
179 .sp
180 The user\-specific \fI$XDG_CONFIG_HOME/terminal\-colors.d\fP
181 or \fI$HOME/.config/terminal\-colors.d\fP overrides the global setting.
182 .sp
183 Note that the output colorization may be enabled by default, and in this case
184 \fIterminal\-colors.d\fP directories do not have to exist yet.
185 .sp
186 \fBcfdisk\fP does not support color customization with a color\-scheme file.
187 .SH "ENVIRONMENT"
188 .sp
189 \fBCFDISK_DEBUG\fP=all
190 .RS 4
191 enables cfdisk debug output.
192 .RE
193 .sp
194 \fBLIBFDISK_DEBUG\fP=all
195 .RS 4
196 enables libfdisk debug output.
197 .RE
198 .sp
199 \fBLIBBLKID_DEBUG\fP=all
200 .RS 4
201 enables libblkid debug output.
202 .RE
203 .sp
204 \fBLIBSMARTCOLS_DEBUG\fP=all
205 .RS 4
206 enables libsmartcols debug output.
207 .RE
208 .sp
209 \fBLIBSMARTCOLS_DEBUG_PADDING\fP=on
210 .RS 4
211 use visible padding characters. Requires enabled \fBLIBSMARTCOLS_DEBUG\fP.
212 .RE
213 .sp
214 \fBLOCK_BLOCK_DEVICE\fP=<mode>
215 .RS 4
216 use exclusive BSD lock. The mode is "1" or "0". See \fB\-\-lock\fP for more details.
217 .RE
218 .SH "AUTHORS"
219 .sp
220 .MTO "kzak\(atredhat.com" "Karel Zak" ""
221 .sp
222 The current \fBcfdisk\fP implementation is based on the original \fBcfdisk\fP from \c
223 .MTO "martin\(atcs.unc.edu" "Kevin E. Martin" "."
224 .SH "SEE ALSO"
225 .sp
226 \fBfdisk\fP(8),
227 \fBparted\fP(8),
228 \fBpartprobe\fP(8),
229 \fBpartx\fP(8),
230 \fBsfdisk\fP(8)
231 .SH "REPORTING BUGS"
232 .sp
233 For bug reports, use the issue tracker at \c
234 .URL "https://github.com/util\-linux/util\-linux/issues" "" "."
235 .SH "AVAILABILITY"
236 .sp
237 The \fBcfdisk\fP command is part of the util\-linux package which can be downloaded from \c
238 .URL "https://www.kernel.org/pub/linux/utils/util\-linux/" "Linux Kernel Archive" "."