1PARTED(8) GNU Parted Manual PARTED(8)
2
3
4
6 parted - a partition manipulation program
7
9 parted [options] [device [command [options...]...]]
10
12 parted is a program to manipulate disk partitions. It supports multi‐
13 ple partition table formats, including MS-DOS and GPT. It is useful
14 for creating space for new operating systems, reorganising disk usage,
15 and copying data to new hard disks.
16
17 This manual page documents parted briefly. Complete documentation is
18 distributed with the package in GNU Info format.
19
21 -h, --help
22 displays a help message
23
24 -l, --list
25 lists partition layout on all block devices
26
27 -m, --machine
28 displays machine parseable output
29
30 -j, --json
31 displays JSON output
32
33 -s, --script
34 never prompts for user intervention
35
36 -f, --fix
37 automatically answer "fix" to exceptions in script mode
38
39 -v, --version
40 displays the version
41
42 -a alignment-type, --align alignment-type
43 Set alignment for newly created partitions, valid alignment
44 types are:
45
46 none Use the minimum alignment allowed by the disk type.
47
48 cylinder
49 Align partitions to cylinders.
50
51 minimal
52 Use minimum alignment as given by the disk topology in‐
53 formation. This and the opt value will use layout infor‐
54 mation provided by the disk to align the logical parti‐
55 tion table addresses to actual physical blocks on the
56 disks. The min value is the minimum alignment needed to
57 align the partition properly to physical blocks, which
58 avoids performance degradation.
59
60 optimal
61 Use optimum alignment as given by the disk topology in‐
62 formation. This aligns to a multiple of the physical
63 block size in a way that guarantees optimal performance.
64
65
67 [device]
68 The block device to be used. When none is given, parted will
69 use the first block device it finds.
70
71 [command [options]]
72 Specifies the command to be executed. If no command is given,
73 parted will present a command prompt. Possible commands are:
74
75 help [command]
76 Print general help, or help on command if specified.
77
78 align-check type partition
79 Check if partition satisfies the alignment constraint of
80 type. type must be "minimal" or "optimal".
81
82 mklabel label-type
83 Create a new disklabel (partition table) of label-type.
84 label-type should be one of "aix", "amiga", "bsd", "dvh",
85 "gpt", "loop", "mac", "msdos", "pc98", or "sun".
86
87 mkpart [part-type name fs-type] start end
88 Create a new partition. part-type may be specified only
89 with msdos and dvh partition tables, it should be one of
90 "primary", "logical", or "extended". name is required
91 for GPT partition tables and fs-type is optional. fs-
92 type can be one of "btrfs", "ext2", "ext3", "ext4",
93 "fat16", "fat32", "hfs", "hfs+", "linux-swap", "ntfs",
94 "reiserfs", "udf", or "xfs".
95
96 name partition name
97 Set the name of partition to name. This option works only
98 on Mac, PC98, and GPT disklabels. The name can be placed
99 in double quotes, if necessary. And depending on the
100 shell may need to also be wrapped in single quotes so
101 that the shell doesn't strip off the double quotes.
102
103 print print-type
104 Display the partition table. print-type is optional, and
105 can be one of devices, free, list, or all.
106
107 quit Exit from parted.
108
109 rescue start end
110 Rescue a lost partition that was located somewhere be‐
111 tween start and end. If a partition is found, parted
112 will ask if you want to create an entry for it in the
113 partition table.
114
115 resizepart partition end
116 Change the end position of partition. Note that this
117 does not modify any filesystem present in the partition.
118
119 rm partition
120 Delete partition.
121
122 select device
123 Choose device as the current device to edit. device
124 should usually be a Linux hard disk device, but it can be
125 a partition, software raid device, or an LVM logical vol‐
126 ume if necessary.
127
128 set partition flag state
129 Change the state of the flag on partition to state. Sup‐
130 ported flags are: "boot", "root", "swap", "hidden",
131 "raid", "lvm", "lba", "legacy_boot", "irst", "msftres",
132 "esp", "chromeos_kernel", "bls_boot", "linux-home",
133 "no_automount", "bios_grub", and "palo". state should be
134 either "on" or "off".
135
136 unit unit
137 Set unit as the unit to use when displaying locations and
138 sizes, and for interpreting those given by the user when
139 not suffixed with an explicit unit. unit can be one of
140 "s" (sectors), "B" (bytes), "kB", "MB", "KiB", "MiB",
141 "GB", "GiB", "TB", "TiB", "%" (percentage of device
142 size), "cyl" (cylinders), "chs" (cylinders, heads, sec‐
143 tors), or "compact" (megabytes for input, and a human-
144 friendly form for output).
145
146 toggle partition flag
147 Toggle the state of flag on partition.
148
149 type partition id or uuid
150 On MS-DOS set the type aka. partition id of partition to
151 id. The id is a value between "0x01" and "0xff". On GPT
152 the type-uuid of partition to uuid.
153
154 disk_set flag state
155 Change a flag on the disk to state. A flag can be either
156 "on" or "off". Some or all of these flags will be avail‐
157 able, depending on what disk label you are using. Sup‐
158 ported flags are: "pmbr_boot" on GPT to enable the boot
159 flag on the GPT's protective MBR partition.
160
161 disk_toggle flag
162 Toggle the state of the disk flag.
163
164 version
165 Display version information and a copyright message.
166
168 Report bugs to <bug-parted@gnu.org>
169
171 fdisk(8), mkfs(8), The parted program is fully documented in the
172 info(1) format GNU partitioning software manual.
173
175 This manual page was written by Timshel Knoll <timshel@debian.org>, for
176 the Debian GNU/Linux system (but may be used by others).
177
178
179
180parted 2021 September 28 PARTED(8)