Skip to content

Instantly share code, notes, and snippets.

@josephabrahams
Last active September 6, 2018 18:28
Show Gist options
  • Save josephabrahams/1ee0386dd7555e6a36f7326e58cab242 to your computer and use it in GitHub Desktop.
Save josephabrahams/1ee0386dd7555e6a36f7326e58cab242 to your computer and use it in GitHub Desktop.
Setup Ubuntu on VirtualBox for C Development over SSH
!/bin/sh
# only require sudo password once during this script
sudo -v
while true; do sudo -n true; sleep 60; kill -0 "$$" || exit; done 2>/dev/null &
# remove need for typing sudo password in the future
echo -e "\nubuntu ALL=(ALL) NOPASSWD: ALL" | sudo tee -a /etc/sudoers
# allow access to vm shared folders
sudo usermod -aG vboxsf ubuntu
# install SSH
sudo apt-get update
sudo apt-get -y install openssh-client=1:6.6p1-2ubuntu1
sudo apt-get -y install openssh-server
mkdir -pm 700 ~/.ssh
# install GDB dashboard
wget -P ~ git.io/.gdbinit
@josephabrahams
Copy link
Author

josephabrahams commented Sep 6, 2018

sh -c "$(wget https://joseph.is/c_init -O -)"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment