Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sidarta-luizalabs/7c0668e1f164c1983b4e47e1d74ecc5f to your computer and use it in GitHub Desktop.
Save sidarta-luizalabs/7c0668e1f164c1983b4e47e1d74ecc5f to your computer and use it in GitHub Desktop.
lxc-update-etc-hosts
lxc list --format=json | jq -r '.[]| select(.status=="Running").state.network.eth0.addresses[0].address + " " + select(.status=="Running").name' | sudo tee -a /etc/hosts
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment