Run command or interactive shell with a new system hostname
chname hostname [command ...]
Create a new utsname namespace with a new system hostname
and execute command
. This is particularly useful for creating
a chroot that has a hostname independent of the rest of the system.
This capability requires Linux 2.6.19 or later with CONFIG_UTS_NS=y
.
chname newname chroot /chroot/dir /bin/bash
Written by Michael Marineau.