1
0
Fork 0
mirror of https://github.com/tldr-pages/tldr.git synced 2025-04-29 23:24:55 +02:00
tldr/pages/linux/parted.md

22 lines
683 B
Markdown
Raw Normal View History

2020-12-12 05:06:23 +08:00
# parted
> A partition manipulation program.
> See also: `parted-interactive`, `partprobe`.
2020-12-12 05:06:23 +08:00
> More information: <https://www.gnu.org/software/parted/parted.html>.
- List partitions on all block devices:
`sudo parted --list`
2021-03-19 10:10:13 -04:00
- Create a new partition table of the specified label-type:
2020-12-12 05:06:23 +08:00
`sudo parted {{/dev/sdX}} --script mklabel {{aix|amiga|bsd|dvh|gpt|loop|mac|msdos|pc98|sun}}`
2020-12-12 05:06:23 +08:00
- Create a new `gpt` partition table with a 500MiB boot partition and give the rest for the system partition:
2020-12-12 05:06:23 +08:00
`sudo parted {{/dev/sdX}} --script mklabel gpt mkpart primary 0% 500MiB mkpart primary 500MiB 100%`
2020-12-12 05:06:23 +08:00
- Start interactive mode with the specified disk selected:
2020-12-12 05:06:23 +08:00
`sudo parted {{/dev/sdX}}`