mirror of
https://github.com/tldr-pages/tldr.git
synced 2024-09-23 09:47:49 +03:00
parted: add page (#4961)
This commit is contained in:
parent
c978cc8172
commit
6db7d9f7d1
36
pages/linux/parted.md
Normal file
36
pages/linux/parted.md
Normal file
@ -0,0 +1,36 @@
|
||||
# parted
|
||||
|
||||
> A partition manipulation program.
|
||||
> More information: <https://www.gnu.org/software/parted/parted.html>.
|
||||
|
||||
- List partitions on all block devices:
|
||||
|
||||
`sudo parted --list`
|
||||
|
||||
- Start to manipulate disk partition:
|
||||
|
||||
`sudo parted {{/dev/sdX}}`
|
||||
|
||||
- Create a new partition table of label-type directly, label-type can be gpt, msdos etc:
|
||||
|
||||
`sudo parted --script {{/dev/sdX}} mklabel {{gpt}}`
|
||||
|
||||
- Show disk partition information in interactive mode:
|
||||
|
||||
`print`
|
||||
|
||||
- Select a disk in interactive mode:
|
||||
|
||||
`select {{/dev/sdX}}`
|
||||
|
||||
- Interactively create a 16GB partition with a given filesystem:
|
||||
|
||||
`mkpart {{primary|logical|extended}} {{filesystem}} {{0%}} {{16G}}`
|
||||
|
||||
- Resize partition size:
|
||||
|
||||
`resizepart {{/dev/sdXN}} {{end_position_of_partition}}`
|
||||
|
||||
- Remove partition:
|
||||
|
||||
`rm {{/dev/sdXN}}`
|
Loading…
Reference in New Issue
Block a user