12

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.

13

My background is RHEL-derived distributions (mainly Fedora, today), Arch is foreign to me.

Back when /etc/inittab and mgetty where used by RHEL, you could edit /etc/inittab and pass the -p option to mgetty. 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 use agetty instead of mgetty to manage the tty. agetty man page doesn't show the -p option, but you could reinstall mgetty 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.

  • 2
    Aha! Thank you, this is getting me on the right track. I've discovered that Arch uses agetty, and found the invocation inside /etc/inittab. Unfortunately, agetty does not seem to have an option to change the prompt. (Oh I just reread your answer, you said that for me haha). It seems like your ideas are the best possible options. Thank you! – nona Jul 18 '11 at 1:05
-1

Create a systemd service file in /etc/systemd/system/ to run a one line bash script with "chvt N" in it.

For details, see my post: https://bbs.archlinux.org/viewtopic.php?id=231082

Worked well for me. I'm thinking there has to be a setting for this that could be edited or whatever, but after several hours, I gave up looking for it. The versatility and configuration options of systemd seem awesome. Now if I could just figure out how to find/use them properly.

EDIT TO ADD INFO (Oct 28th 2017):

Also for details on how to do this, see: systemd - Change default login tty

Please correct errors or explain simpler solutions via posting, rather that just down voting or pointing out errors.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.