LinuxCommandLibrary

lxc-network

manages networks for LXD containers

TLDR

List all networks

$ lxc network list
copy
Show network configuration
$ lxc network show [network_name]
copy
Attach container to network
$ lxc network attach [network_name] [container_name]
copy
Create new network
$ lxc network create [network_name]
copy
Set bridge interface
$ lxc network set [network_name] bridge.external_interfaces eth0
copy
Disable NAT
$ lxc network set [network_name] ipv4.nat false
copy

SYNOPSIS

lxc network command [options]

DESCRIPTION

lxc network manages networks for LXD containers. It can create, configure, and attach networks to containers, supporting bridges, VLANs, and various network configurations.

SUBCOMMANDS

list

List available networks
show NAME
Show network configuration
create NAME
Create new managed network
delete NAME
Delete network
attach NAME CONTAINER
Attach container to network
detach NAME CONTAINER
Detach container from network
set NAME KEY VALUE
Set network configuration

SEE ALSO

lxc(1), lxc-start(1)

> TERMINAL_GEAR

Curated for the Linux community

Copied to clipboard

> TERMINAL_GEAR

Curated for the Linux community