I‘m using Debian Linux server with Linux Containers (lxc). How do I disconnect and exit from an lxc-console to a shell prompt without closing ssh session?
You need to use the lxc-console command to log in to a running Linux container. The syntax is as follows:
lxc-console -n container-name
lxc-console -n webserver
lxc-console -n pgsql
To exit an lxc-console from a shell prompt:
- Open a shell prompt.
- Login to a host server called server1.
- Use the lxc-console command to log in to a running container called ‘memcache’ type: lxc-console -n memcache
- To exit an lxc-console session, type Ctrl-A followed by Q.
Here is a sample session: