Last active
November 8, 2016 01:19
-
-
Save pascalandy/c6d10e8567e2c81d080c532ed7bbb762 to your computer and use it in GitHub Desktop.
Renames the host to have a suffix of alexellisio
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Renames the host to have a suffix of alexellisio | |
export NEW_HOST_NAME=N12-AMS1 | |
export ORIGINAL=$(cat /etc/hostname) | |
echo $NEW_HOST_NAME | |
echo $ORIGINAL | |
sudo hostname $NEW_HOST_NAME | |
echo $NEW_HOST_NAME | sudo tee /etc/hostname | |
reboot | |
— — — — — — — — — — — — — — — — | |
# Renames the host to have a suffix of alexellisio | |
export original=$(cat /etc/hostname) | |
sudo hostname $original-alexellisio | |
echo $original-alexellisio | sudo tee /etc/hostname |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment