To be clear, I am not referring to /etc/issue
(shown before the prompt) or /etc/motd
(shown after login), but the prompt itself, which is currently
hostname login:
For good measure, I am running Arch Linux, but I believe the answer will likely be cross-distro.
Best Answer
My background is RHEL-derived distributions (mainly Fedora, today), Arch is foreign to me.
Back when
/etc/inittab
andmgetty
where used by RHEL, you could edit/etc/inittab
and pass the-p
option tomgetty
. This would set the prompt.Now with the adoption of
systemd
/etc/inittab
is empty. The tty configuration file is now/lib/systemd/system/getty\@.service
. This file seems to useagetty
instead ofmgetty
to manage the tty.agetty
man page doesn't show the-p
option, but you could reinstallmgetty
and use it. Or you could use the-n
(no prompt) option with the-l
(specify a login program) option and write a wrapper to/bin/login
with your own prompt.Now, I don't know how to set this up on Arch, but you have to find out where it manages its ttys (
/etc/inittab
is the first place you have to look), then see with the tty program how to roll your own custom prompt.