Showing entries 1 to 1
Displaying posts with tag: login prompt (reset)
Linux: How do you display specific information at login prompt in Linux on the console?

Buddy of mine asked me a question over chat today: “how do I show my machines’ IP at login prompt with out logging in?” He is referring to his Virtual Machine in this case. He does not want to have to log in to the server to see what ip it has (since its on dhcp) for him to ssh in or hit it from the browser. I could have answered him with a simple how to but what is the fun in that? So I decided to give some background on how login prompts are done and show what can be done.

When Linux server boots up, it calls a program called mingetty. This program creates that infamous login prompt as show in a screenshot:

You can see how server calls the mingetty program by looking at /etc/inittab. You will see a block like below:

# Run gettys in standard runlevels
1:2345:respawn:/sbin/mingetty tty1
2:2345:respawn:/sbin/mingetty tty2
3:2345:respawn:/sbin/mingetty tty3

[Read more]
Showing entries 1 to 1