Skip to content

Instantly share code, notes, and snippets.

@notionparallax
Last active February 1, 2017 20:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save notionparallax/a8172e329e8c4b77dfa05a2c8bf4dbe3 to your computer and use it in GitHub Desktop.
Save notionparallax/a8172e329e8c4b77dfa05a2c8bf4dbe3 to your computer and use it in GitHub Desktop.
An attempt to make changing configuration of a virtual machine easy.
#!/bin/bash
clear
toilet " CODE1161 " --metal --font future
echo ""
toilet "Let's get started!" --metal --font future
echo ""
echo "We need to make this computer be YOURS"
echo "We need a name for you and your computer, make it short or it'll take up a lot of space."
echo "My computer is called um and my name is ben, so I get ben@um:~$ as my command prompt."
echo ""
read -p "Enter a name for your computer:" compname
read -p "Enter your name: " username
echo ""
toilet "$username@$compname~$" --gay --font wideterm
echo ""
echo "What do you think? If you hate it, press ctrl+c and do this again"
read -p "otherwise, just press enter." sacrificial
# set the host name, in a million places, for some unknown reason.
echo "1"
sed -i "/127\.0\.1\.1\s*vc/ { c \
127.0.1.1 $compname
}" /etc/hosts
echo "2"
sudo hostname -b $compname
echo "3"
sudo hostnamectl set-hostname $compname
echo "4"
sudo groupadd $username
echo "5"
sudo usermod -d /home/$username -m -g $username -l $username ben
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment