← 返回命令列表

Linux command

pct 命令

文本

复制后可按需替换文件名、目录或参数。

常用示例

List

pct list

Start/Stop

pct start 100

Enter

pct enter 100

Create

pct create 100 local:vztmpl/distro.tar.zst --rootfs local-lvm:4

Resize

pct resize 100 rootfs 20G

Show

pct config 100

Snapshot

pct snapshot 100 my-snapshot --description "description"

Destroy

pct destroy 100 --purge

说明

pct is the LXC container management tool for Proxmox VE. It provides a complete command-line interface for creating, configuring, starting, stopping, and managing Linux containers.

参数

list
List all containers
create _vmid_ _template_
Create a new container from template
config _vmid_
Display container configuration
set _vmid_
Modify container configuration
start _vmid_
Start a container
stop _vmid_
Stop a container
enter _vmid_
Access container shell
exec _vmid_ _command_
Execute command in container
snapshot _vmid_ _name_
Create a snapshot
destroy _vmid_
Remove a container
resize _vmid_ _disk_ _size_
Resize container disk
--purge
Remove all related resources when destroying

FAQ

What is the pct command used for?

pct is the LXC container management tool for Proxmox VE. It provides a complete command-line interface for creating, configuring, starting, stopping, and managing Linux containers.

How do I run a basic pct example?

Run `pct list` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

What does list do in pct?

List all containers