I want to make when CentOS start in init 3 to show me my ip addr, before log in. For Example:
CentOS Realese 6.5(Final)
Kernel 2.6..
ip addr: 192.168.1.1
or something like that.
I make script which is:
#!/bin/bash
ifconfig eth0 | grep 'inet addr'
but, I don't know where I put it.
I try in rc.local (with "cat" and him path) but obviously it is not right place, or I make something wrong. And I try in /etc/issue , but and there maybe I make something wrong.
On CentOS 7 and Debian 8 (and maybe other as well), just append the following line to /etc/issue
My IP address: \4
and that will resolve to the machine's IPv4 address. If you have multiple network interfaces and you want to pick one specific, you can specify it with
My IP address: \4{eth0}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With