1lxc-console(1) lxc-console(1)
2
3
4
6 lxc-console - Launch a console for the specified container
7
9 lxc-console {-n name} [-e escape character] [-t ttynum]
10
12 If the tty service has been configured and is available for the con‐
13 tainer specified as parameter, this command will launch a console al‐
14 lowing to log on the container.
15
16 The available tty are free slots taken by this command. That means if
17 the container has four ttys available and the command has been launched
18 four times each taking a different tty, the fifth command will fail be‐
19 cause no console will be available.
20
21 The command will connect to a tty. If the connection is lost or broken,
22 the command can be launched again and regain the tty at the state it
23 was before the disconnection.
24
25 A ttynum of 0 may be given to attach to the container's /dev/console
26 instead of its dev/tty<ttynum>.
27
28 A keyboard escape sequence may be used to disconnect from the tty and
29 quit lxc-console. The default escape sequence is <Ctrl+a q>.
30
32 -e, --escape escape character
33 Specify the escape sequence prefix to use instead of <Ctrl a>.
34 This may be given as '^letter' or just 'letter'. For example to
35 use <Ctrl+b q> as the escape sequence use -e '^b'.
36
37 -t, --tty ttynum
38 Specify the tty number to connect to or 0 for the console. If
39 not specified the next available tty number will be automatical‐
40 ly chosen by the container.
41
43 These options are common to most of lxc commands.
44
45 -?, -h, --help
46 Print a longer usage message than normal.
47
48 --usage
49 Give the usage message
50
51 -q, --quiet
52 mute on
53
54 -P, --lxcpath=PATH
55 Use an alternate container path. The default is /var/lib/lxc.
56
57 -o, --logfile=FILE
58 Output to an alternate log FILE. The default is no log.
59
60 -l, --logpriority=LEVEL
61 Set log priority to LEVEL. The default log priority is ERROR.
62 Possible values are : FATAL, CRIT, WARN, ERROR, NOTICE, INFO,
63 DEBUG.
64
65 Note that this option is setting the priority of the events log
66 in the alternate log file. It do not have effect on the ERROR
67 events log on stderr.
68
69 -n, --name=NAME
70 Use container identifier NAME. The container identifier format
71 is an alphanumeric string.
72
73 --rcfile=FILE
74 Specify the configuration file to configure the virtualization
75 and isolation functionalities for the container.
76
77 This configuration file if present will be used even if there is
78 already a configuration file present in the previously created
79 container (via lxc-create).
80
81 --version
82 Show the version number.
83
85 tty service denied
86 No tty is available or there is not enough privilege to use the
87 console. For example, the container belongs to user "foo" and
88 "bar" is trying to open a console to it.
89
91 lxc(7), lxc-create(1), lxc-copy(1), lxc-destroy(1), lxc-start(1), lxc-
92 stop(1), lxc-execute(1), lxc-console(1), lxc-monitor(1), lxc-wait(1),
93 lxc-cgroup(1), lxc-ls(1), lxc-info(1), lxc-freeze(1), lxc-unfreeze(1),
94 lxc-attach(1), lxc.conf(5)
95
97 Daniel Lezcano <daniel.lezcano@free.fr>
98
99
100
101 2019-09-09 lxc-console(1)