Display IP address in console login screen
2018-04-30
88 words
1 min read
Here is one liner that will add the current IP address in the console login screen (if you are not running X as is case for servers):
(ip -o -4 a| awk '$2 !="lo" {print "\nIP Address ::"$4}' |tr '\n' ',';echo)>>/etc/issue
Just execute the above command as root. It will add the required code in “/etc/issue” to display the IP address. BTW, you can also use “\4” or “\6” instead of that command to get the IP but that will not work with some old versions of Linux.
Related Articles:
- 2017/03/20 flatpak – get latest libreoffice
- 2017/03/13 systemd – start service when you enable it
- 2010/08/26 Gmail Videochat Comes to Linux
- 2018/04/09 Linked clone with qemu-img
- 2018/04/02 Monitor progress of coreutils commad like mv, cp etc
Authored By Amit Agarwal
Amit Agarwal, Linux and Photography are my hobbies.Creative Commons Attribution 4.0 International License.