Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
executable file 168 lines (126 sloc) 4.98 KB
draft toc comments categories tags title wip snippet
Ubuntu Setup after Installation
Attempting to reproduce a .NET Remoting vulnerability.

Ubuntu Setup after Installation

Every once in a while I setup a new Ubuntu VM and I have to redo all these steps. This will help me speed things up.

VM Specifications

  • RAM: 4GB.
  • VGA memory: 128MB (max) in VirtualBox and 1GB in VMWare.
  • Enable 3D acceleration.
  • Disk space: 30 or 40GB.

Install Virtualization Plugins

These allow clipboard copy/paste and sometimes even drag/drop.


  1. If the VM does not have a CD-ROM, shut it down, add one and launch.
  2. Load the guest additions ISO: Devices > Insert Guest Additions CD Image....
  3. Navigate to the mounted drive.
  4. Run sudo ./
  5. Enable:
    • Devices > Shared Clipboard > Bidirectional.
    • Devices > Drag and Drop > Bidirectional.
      • Dropped files will be in /tmp/VirtualBox Dropped Files and the directory is deleted on boot.
  6. Restart.
  7. Profit.


  1. sudo open-vm-tools open-vm-tools-desktop.
  2. Restart.
  3. Shared clipboard will work, not sure about files.

Set Keyboard Shortcuts

Set at System Settings > Keyboard > Shortcuts.

  • Custom Shortcuts > New - Name: terminal - Command: gnome-terminal - Key: Super+R.
  • Navigation > Hide all normal windows - change to Super+D. Works after logout.

Install Useful Packages

Some packages are not installed by default.

sudo apt-get update
sudo apt-get install curl git libltdl-dev 

Disable Screenlock and Screensaver

No reason to have them in a VM.

Settings > Brightness & Lock:

  • Set lock to off.
  • Turn screen off when inactive for: Never.

Install Go 1.10

Current golang package is not up to date.

  1. sudo apt-get update.
  2. sudo apt-get install golang-1.10.
    • This will install go in /usr/lib/go-1.10/.
  3. I don't like the default GOPATH (/home/$USER/go). I prefer files to be on desktop.
    • mkdir -p /home/$USER/Desktop/Go/{src,bin,pkg}.

Edit .bashrc

Inb4 that's not the correct way to do this.

Set GOROOT and new GOPATH to PATH:

  • export PATH="/usr/lib/go-1.10/bin:/home/$USER/Desktop/Go/bin:$PATH".
  • export GOPATH="/home/$USER/Desktop/Go".

Navigate to Desktop in every new terminal (this will cause errors if terminals are opened in other paths):

  • cd Desktop.

Apply settings with:

  • source ~/.bashrc.

Install VS Code

Electron app, so be sure to download more RAM assign lots of RAM to VM.

Copied from official instructions:

curl | gpg --dearmor > microsoft.gpg
sudo mv microsoft.gpg /etc/apt/trusted.gpg.d/microsoft.gpg
sudo sh -c 'echo "deb [arch=amd64] stable main" > /etc/apt/sources.list.d/vscode.list'
sudo apt-get update
sudo apt-get install code

Install Docker - Optional

Instead of using the package through aptitude, use the official instructions at:

sudo apt-get install \
    apt-transport-https \
    ca-certificates \
    curl \

curl -fsSL | sudo apt-key add -

sudo apt-key fingerprint 0EBFCD88 # This might change in the future

sudo add-apt-repository \
   "deb [arch=amd64] \
   $(lsb_release -cs) \

sudo apt-get update

sudo apt-get install docker-ce docker-compose

# Test
sudo docker run hello-world

If docker-compose does not work after installation and you get this error message Couldn't connect to Docker daemon at http+unix://var/run/docker.sock or something similar, add yourself to the docker group, logout and login:

  • usermod -aG docker ${USER}