Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

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.

share|improve this question

1 Answer 1

up vote 8 down vote accepted

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 up this on Arch, but you have to find out where it manages it's ttys (/etc/inittab is the first place you have to look), then see with the tty program how to roll your own custom prompt.

share|improve this answer
1  
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

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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