Hello,
I am currently through the “Linux Fundamentals” on the HTB Academy. It was updated recently and added new sections. One is about “Containerization” and talks about Docker and Linux Containers / LXC.
Specifically on the LXC part, it references some commands for “lxc-config”:
- lxc-config -n container name -s storage
- lxc-config -n container name -s network
- lxc-config -n container name -s security
Since the entire sections talks specifically of Ubuntu, I made a VM on VMware with Ubuntu 23.02 (latest as of today) to test some things out.
Here are the commands I used :
- sudo apt-get install lxc lxc-utils lxc-templates -y
- sudo lxc-create --name linuxcontainer --template ubuntu
- sudo lxc-start -n linuxcontainer
- sudo lxc-attach -n linuxcontainer
- sudo lxc-config -n linuxcontainer -s network
When reaching that last command, I was met with “Unknow configuration item : -n”.
When using : lxc-config --help it seems that the only option available is “-l”.
Am I missing something ?
I guess I can always edit the configuration files directly ?
The documentation I found online only makes all this more confusing.
Thanks