← 返回命令列表

Linux command

parted.interactive 命令

安全

权限或系统影响较大,执行前请核对目标。

常用示例

Example

sudo parted /dev/sdX

Example

print

Select

select /dev/sdX

Example

mkpart partition_name ext4 0% 16G

Example

mkpart primary ext4 0% 16G

Resize

resizepart /dev/sdX1 end_position

Remove

rm /dev/sdX1

Example

?

说明

parted is a partition manipulation program that supports both MBR and GPT partition tables. In interactive mode, it provides a command-line interface for viewing and modifying disk partitions. The interactive mode allows real-time partition management with immediate feedback on changes. It supports various filesystem types including ext2, ext3, ext4, btrfs, fat16, fat32, ntfs, and xfs.

参数

print
Display partition table information
select _device_
Select a disk to work with
mkpart _name_ _fs-type_ _start_ _end_
Create a new partition
resizepart _partition_ _end_
Resize a partition
rm _partition_
Remove a partition
?
Display help for interactive commands

FAQ

What is the parted.interactive command used for?

parted is a partition manipulation program that supports both MBR and GPT partition tables. In interactive mode, it provides a command-line interface for viewing and modifying disk partitions. The interactive mode allows real-time partition management with immediate feedback on changes. It supports various filesystem types including ext2, ext3, ext4, btrfs, fat16, fat32, ntfs, and xfs.

How do I run a basic parted.interactive example?

Run `sudo parted /dev/sdX` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

What does print do in parted.interactive?

Display partition table information