I’m not 100% sure what you mean about “first screen”, but the accepted answer in that link says: docker run -t -i → can be detached with ^P^Q and reattached with docker attach. So maybe you want to use “docker attach ubuntu” instead of “docker exec -it ubuntu /bin/bash”.