Thursday, May 21, 2015

Linux exit from lxc-console keyboard shortcut

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:

  1. Open a shell prompt.
  2. Login to a host server called server1.
  3. Use the lxc-console command to log in to a running container called 'memcache' type: lxc-console -n memcache
  4. To exit an lxc-console session, type Ctrl-A followed by Q.
Here is a sample session:
Gif.01: How to disconnect from lxc-console demo
Gif.01: How to disconnect from lxc-console demo

0 comments:

Post a Comment