You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser.
I just noticed that in the default configuration of newly created LXC container, the TTY count defaults to 2.
I changed it to 1 and nothing bad happens

. Using web console and
pct enter
simultaneously doesn't break either.
Just curious why it defaults to 2, I thought there might be a reason.
The reason LXC containers use
tty2 instead of
tty1 by default is related to how init systems (such as systemd) manage terminals inside the container.
Explanation:
- Systemd reserves tty1
- On systems using systemd, tty1 is typically reserved for the primary login interface during boot or for system messages.
- Inside a container, tty1 may be unavailable because there isn't a full "boot" process like on a physical machine.
- Avoids conflicts with system logs
- Some distributions send kernel and init system logs to tty1, which could interfere with interactive terminal usage inside the container.
- Compatibility with various systems
- tty2 is considered a "safer" choice for the first available interactive terminal.
- LXC simply skips tty1 to avoid potential issues across different Linux distributions.