Before logging on to the Ubuntu console, the IP address is displayed. to log on to Ubuntu in VMware through PuTTY in Windows, you must first know the IP address of Ubuntu. If DHCP is used, the IP address may be different from the previous login. Is there a way to display the IP address in the prompt before logon? The answer is yes. The prompt message before logon is from the/ertc/issue file. The system version, host name, and logon port are displayed by default. The file content is as follows: Ubuntu 12.04.2 LTS \ n \ l is shown as follows: Ubuntu 12.04.2 LTS ubuntu tty1 we can modify this file to display other information, for example, kernel version, current date and time, and computer domain name. These are all very simple. You only need to insert a corresponding conversion code. However, it is not so easy to display the IP address of a computer. We must find a way to get the IP address information. The following command can get the IP Address: /sbin/ifconfig | grep "inet addr" | grep-v "127.0.0.1" | awk '{print $2}' | awk-F: '{print $2}' but how can I add the obtained IP address to the/etc/issue file? First copy the original/etc/issue file and save it $ sudo cp/etc/issue-ori and then create a new one under the/etc/network/if-up.d/directory script file, the content is as follows :#! /Bin/sh if ["$ METHOD" = loopback]; then exit 0fi if ["$ MODE "! = Start]; then exit 0fi cp/etc/issue-ori/etc/issue/sbin/ifconfig | grep "inet addr" | grep-v "127.0.0.1" | awk '{print $2 }' | awk-F: '{print $2}'>/etc/issueecho "">/etc/issue. This is done. The next time you start Ubuntu, the IP address is displayed before the logon prompt. With this IP address, you can log on through PuTTY.