Start a screen session inside LXD-managed container
For LXD using
lxc exec my-ubuntu -- sh -c "exec >/dev/tty 2>/dev/tty </dev/tty && /usr/bin/screen -s /bin/bash"
or
lxc exec my-ubuntu -- sh -c "exec >/dev/tty 2>/dev/tty </dev/tty && /usr/bin/screen -x"
or with any other screen
switch.
The same for Docker ;)
docker run -it my-ubuntu sh -c "exec >/dev/tty 2>/dev/tty </dev/tty && /usr/bin/screen -s /bin/bash"