2025-01-02 00:05:44 +02:00
|
|
|
# pct
|
|
|
|
|
|
|
|
> Manage LXC containers in Proxmox.
|
|
|
|
> More information: <https://pve.proxmox.com/pve-docs/pct.1.html>.
|
|
|
|
|
|
|
|
- List all containers:
|
|
|
|
|
|
|
|
`pct list`
|
|
|
|
|
|
|
|
- Start/Stop/Reboot a specific container:
|
|
|
|
|
|
|
|
`pct {{start|stop|reboot}} {{100}}`
|
|
|
|
|
|
|
|
- Access a specific container's shell:
|
|
|
|
|
2025-07-25 09:58:43 +03:00
|
|
|
`pct {{[en|enter]}} {{100}}`
|
2025-01-02 00:05:44 +02:00
|
|
|
|
|
|
|
- Create a container from template:
|
|
|
|
|
2025-07-25 09:58:43 +03:00
|
|
|
`pct {{[cr|create]}} {{100}} {{/var/lib/vz/template/cache/distro-name.tar.zst}} -hostname {{hostname}} -password {{password}} --rootfs {{local-lvm}} --on-boot`
|
2025-01-02 00:05:44 +02:00
|
|
|
|
|
|
|
- Resize the container's disk to 20G:
|
|
|
|
|
2025-07-25 09:58:43 +03:00
|
|
|
`pct {{[resi|resize]]} {{100}} {{rootfs|mpX}} {{20G}}`
|
2025-01-02 00:05:44 +02:00
|
|
|
|
|
|
|
- Show the configuration of a container, specifying its ID:
|
|
|
|
|
2025-07-25 09:58:43 +03:00
|
|
|
`pct {{[conf|config]}} {{100}}`
|
2025-01-02 00:05:44 +02:00
|
|
|
|
|
|
|
- Snapshot a specific container with description:
|
|
|
|
|
2025-07-25 09:58:43 +03:00
|
|
|
`pct {{[sn|snapshot]}} {{100}} {{my-snapshot}} --description {{My snapshot description}}`
|
2025-01-02 00:05:44 +02:00
|
|
|
|
|
|
|
- Destroy a container and remove all related resources:
|
|
|
|
|
2025-07-25 09:58:43 +03:00
|
|
|
`pct {{[des|destroy]}} {{100}} --purge`
|