Skip to content

Instantly share code, notes, and snippets.

@yogendra
Created April 14, 2015 15:32
Show Gist options
  • Save yogendra/cf83dcfec61e8a7b7759 to your computer and use it in GitHub Desktop.
Save yogendra/cf83dcfec61e8a7b7759 to your computer and use it in GitHub Desktop.
Vagrant Ubuntu Box Init
#Add vagrant as sudo user with no password required
# vagrant ALL=(ALL) NOPASSWD: ALL >> /etc/
sudo visudo
wget -qO .ssh/vagrant.pub https://raw.githubusercontent.com/mitchellh/vagrant/master/keys/vagrant.pub
cat .ssh/vagrant.pub >> .ssh/authorized_keys
export RELEASE=$(lsb_release -cs)
cat >/tmp/sources.list << EOL
deb mirror://mirrors.ubuntu.com/mirrors.txt $RELEASE main restricted universe multiverse
deb mirror://mirrors.ubuntu.com/mirrors.txt $RELEASE-updates main restricted universe multiverse
deb mirror://mirrors.ubuntu.com/mirrors.txt $RELEASE-backports main restricted universe multiverse
deb mirror://mirrors.ubuntu.com/mirrors.txt $RELEASE-security main restricted universe multiverse
EOL
sudo mv /tmp/sources.list /etc/apt/sources.list
sudo chmod 644 /etc/apt/sources.list
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment