]> @LXC_GENERATE_DATE@ lxc-attach 1 lxc-attach start a process inside a running container. lxc-attach -n name -a arch -e -- command Description lxc-attach runs the specified command inside the container specified by name. The container has to be running already. If no command is specified, the current default shell of the user running lxc-attach will be looked up inside the container and executed. This will fail if no such user exists inside the container or the container does not have a working nsswitch mechanism. Options Specify the architecture which the kernel should appear to be running as to the command executed. This option will accept the same settings as the option in container configuration files, see lxc.conf 5 . By default, the current archictecture of the running container will be used. Do not drop privileges when running command inside the container. If this option is specified, the new process will not be added to the container's cgroup(s) and it will not drop its capabilities before executing. Warning: This may leak privileges into the container if the command starts subprocesses that remain active after the main process that was attached is terminated. The (re-)starting of daemons inside the container is problematic, especially if the daemon starts a lot of subprocesses such as cron or sshd. Use with great care. &commonoptions; Examples To spawn a new shell running inside an existing container, use lxc-attach -n container To restart the cron service of a running Debian container, use lxc-attach -n container -- /etc/init.d/cron restart To deactivate the network link eth1 of a running container that does not have the NET_ADMIN capability, use the option to use increased capabilities: lxc-attach -n container -e -- /sbin/ip link delete eth1 Security The should be used with care, as it may break the isolation of the containers if used improperly. &seealso; Author Daniel Lezcano daniel.lezcano@free.fr