I like VMware Fusion a lot. It’s a great tool to run various OS’s on my Mac. Even though the Mac underlying BSD like system works well for most of what I do, every once in a while having access to a native Linux environment is hard to beat. One issue that can be annoying is working in a bare bones Linux VM via the VMware console. It is not much fun, requiring manual mouse release and lacking cut and paste between host and VM. The easiest way to resolve this is to use ssh. However, what is the IP address of the VM? And oh, after months of not having used it, what is the login?
Here it comes, /etc/issue to the rescue! Let’s display our IP address and login credentials at the login prompt. I am using the Linux VM in a walled garden environment, security is of little concern here. I am using this in Debian Wheezy. Other dittos may require slight changes…
Make a copy of our /etc/issue file.
Create the file /etc/network/if-up.d/show-ip
Make sure the file is executable
And that’s it. Now lease, if your login credentials are root/test and user/test you may really want to consider updating the /etc/network/if-up.d/show-ip script with your actual values.