Listing Names not CIDs

yatesco

Well-Known Member
Sep 25, 2009
211
5
58
Hi,

i am using `lxc-attach --name CID` quite a bit bt it is getting tedious remembering the CID for the instance I want. I have given each container a memorable name (e.g. 'rclone' for the container which, you guessed it, rclones various things offsite).

Is there a magic sequence of keys that will list the CID and hostname for each container?

Thanks!
 
you probably should use 'pct' instead of the lxc-XXX binaries

e.g., 'pct enter' instead of 'lxc-attach -n'

'pct list' will give you a list of containers. 'pct help' and 'man pct' are probably also helpful for further reading ;)
 
  • Like
Reactions: yatesco
Ah `pct` is the magic source, not `lxc` - got it.

(and yes, I did `man lxc-attach` :))
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!