1PARTED(8)                      GNU Parted Manual                     PARTED(8)
2
3
4

NAME

6       parted - a partition manipulation program
7

SYNOPSIS

9       parted [options] [device [command [options...]...]]
10

DESCRIPTION

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

OPTIONS

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

COMMANDS

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",  and
133                     "palo".  state should be either "on" or "off".
134
135              unit unit
136                     Set unit as the unit to use when displaying locations and
137                     sizes, and for interpreting those given by the user  when
138                     not  suffixed  with an explicit unit.  unit can be one of
139                     "s" (sectors), "B"  (bytes),  "kB",  "MB",  "MiB",  "GB",
140                     "GiB",  "TB",  "TiB",  "%"  (percentage  of device size),
141                     "cyl" (cylinders), "chs" (cylinders, heads, sectors),  or
142                     "compact" (megabytes for input, and a human-friendly form
143                     for output).
144
145              toggle partition flag
146                     Toggle the state of flag on partition.
147
148              disk_set flag state
149                     Change a flag on the disk to state. A flag can be  either
150                     "on" or "off".  Some or all of these flags will be avail‐
151                     able, depending on what disk label you are  using.   Sup‐
152                     ported  flags  are: "pmbr_boot" on GPT to enable the boot
153                     flag on the GPT's protective MBR partition.
154
155              disk_toggle flag
156                     Toggle the state of the disk flag.
157
158              version
159                     Display version information and a copyright message.
160

REPORTING BUGS

162       Report bugs to <bug-parted@gnu.org>
163

SEE ALSO

165       fdisk(8), mkfs(8), The  parted  program  is  fully  documented  in  the
166       info(1) format GNU partitioning software manual.
167

AUTHOR

169       This manual page was written by Timshel Knoll <timshel@debian.org>, for
170       the Debian GNU/Linux system (but may be used by others).
171
172
173
174parted                         2021 September 28                     PARTED(8)
Impressum