Число текстовых консолей (обычно по умолчанию 6) в Linux (в отличие, например, от FreeBSD) — величина легко изменяемая динамически (настройками, в ходе работы, без пересборки ядра). При работе именно с программами ядра число консолей может понадобится значительно увеличить... В некоторых более старых дистрибутивах (и других UNIX системах) используется хорошо описанный способ — конфигурационный файл /etc/inittab:И это часто повторяют из одного учебника Linux в другой... Это идёт ещё от самых старых UNIX систем, SunOS, Minix 2 и т.д. ... из книги Робачевского и т.д.Код: [Выделить]$ uname -r
2.6.18-92.el5
$ cat /etc/inittab
...
# Run gettys in standard runlevels
1:2345:respawn:/sbin/mingetty tty1
2:2345:respawn:/sbin/mingetty tty2
3:2345:respawn:/sbin/mingetty tty3
4:2345:respawn:/sbin/mingetty tty4
5:2345:respawn:/sbin/mingetty tty5
6:2345:respawn:/sbin/mingetty tty6
...
Но в большинстве новых дистрибутивах файл /etc/inittab практически пустой:Код: [Выделить]# uname -r
В этом варианте начальная инициализация консолей, как нам и подсказывает показанный комментарий, происходит в каталоге :
2.6.32.9-70.fc12.i686.PAE
# cat /etc/inittab
...
# Terminal gettys (tty[1-6]) are handled by /etc/event.d/tty[1-6] and
# /etc/event.d/serial
...Код: [Выделить]# ls /etc/event.d/tty*
tty1 tty2 tty3 tty4 tty5 tty6
# cat /etc/event.d/tty6
...
respawn
exec /sbin/mingetty tty6
...
[olej@dell mnt]$ man systemd-getty-generator
...
3. systemd for Administrators, Part XVI: Gettys on Serial Consoles (and Elsewhere)
http://0pointer.de/blog/projects/serial-console.html
Lennart Poettering (автор)
Сергей Пташник (русский перевод)
Данный документ доступен на условиях лицензии CC-BY-SA 3.0 Unported
17 февраля 2017 г.
...
16 Запуск getty на последовательных (и не только) консолях . . . . . . 60
16.1 Виртуальные консоли . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60
16.2 Последовательные консоли . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61
Если кому будет интересно:Благодарю за ссылку на полезную информацию.
systemd для администраторов (http://www2.kangran.su/~nnz/pub/s4a/s4a_latest.pdf)
В systemd это меняется в файле /etc/systemd/logind.conf через опцию "NAutoVTs=".
sudo cat /etc/systemd/logind.conf | grep NAutoVTs
Вывод: #NAutoVTs=6Правда, удобнее, чем простынями писать?
Правда, удобнее, чем простынями писать?Отнюдь. :D
$ man logind.conf
...
NAutoVTs=
Takes a positive integer. Configures how many virtual terminals (VTs) to allocate by default that, when switched to and are previously
unused, "autovt" services are automatically spawned on. These services are instantiated from the template unit autovt@.service for the
respective VT TTY name, for example, autovt@tty4.service. By default, autovt@.service is linked to getty@.service. In other words,
login prompts are started dynamically as the user switches to unused virtual terminals. Hence, this parameter controls how many login
"gettys" are available on the VTs. If a VT is already used by some other subsystem (for example, a graphical login), this kind of
activation will not be attempted. Note that the VT configured in ReserveVT= is always subject to this kind of activation, even if it
is not one of the VTs configured with the NAutoVTs= directive. Defaults to 6. When set to 0, automatic spawning of "autovt" services
is disabled.
...
в большинстве новых дистрибутивахотносится только к старых Ubuntu'идам и RHEL 6.X.