Virtual machines enable us to have various operating systems in store for testing or support purposes. Rather than installing each of these systems, one can download the respective virtual appliance and use it instantaneously with the free VMware Player. Alternatively, one may download a virtualbox image and use it in VirtualBox. Now, these appliances often have rather funny sounding host- and usernames, which at least I really want to change to avoid confusion. Here's how.
The hostname is simple...
That's, however, just temporary.;) A permanent change is achieved by editing /etc/hostname for Debian and Ubuntu, /etc/HOSTNAME for Suse and Slackware, and /etc/sysconfig/network on Redhat, Fedora and Mandriva. Don't forget to check /etc/hosts either.
Changing the username from, say, "Jim" to "John" is not difficult either, but can also be done in a few seconds:
init 3 killall -u Jim usermod -l John Jim groupmod -n John Jim //if required...check before with "id Jim" usermod -d /home/John -m John usermod -c “Johnnie Walker” John id John //just for checking shutdown -r now
A consistent naming scheme really helps. 😉