hostname "${hostname}" echo "${hostname}" > /etc/hostname sed -i "s|^127\.0\.0\.1.*$|127.0.0.1 localhost ${hostname}|" /etc/hosts