Up and running Ubuntu VM with Vagrant

$ brew install --cask virtualbox
$ brew install --cask vagrant
$ brew install —-cask vagrant-manager
$ brew install vagrant-completion
(prepare whole new environment)
$ mkdir -p ~/workspace/vagrantenv/testserver
$ cd ~/workspace/vagrantenv/testserver
$ vagrant box add bionic64 https://app.vagrantup.com/ubuntu/boxes/bionic64/versions/20210125.0.0/providers/virtualbox.box
==> box: Box file was not detected as metadata. Adding it directly...
==> box: Adding box 'bionic64' (v0) for provider:
box: Downloading: https://app.vagrantup.com/ubuntu/boxes/bionic64/versions/20210125.0.0/providers/virtualbox.box
Download redirected to host: cloud-images.ubuntu.com
Progress: 40% (Rate: 9.9M/s, Estimated time remaining: 0:00:29)
...
==> box: Successfully added box 'bionic64' (v0) for 'virtualbox'!$ vagrant box list
bionic64 (virtualbox, 0)
$ vagrant init bionic64
A `Vagrantfile` has been placed in this directory. You are now
ready to `vagrant up` your first virtual environment! Please read
the comments in the Vagrantfile as well as documentation on
`vagrantup.com` for more information on using Vagrant.
Vagrant.configure("2") do |config|
config.vm.box = "bionic64"
config.vm.provider "virtualbox" do |vb|
vb.name = "testserver"
vb.cpus = 2
vb.memory = "8192"
end
config.vm.provision "shell", inline: <<-SHELL
snap install hello-world
apt-get update
apt-get install -y vim tmux jq curl wget
SHELL
end
$ vagrant up
$ vagrant ssh
$ vagrant halt

--

--

--

🏃Leisure Runner (completed full marathon * 12), 🤓Fullstack, 🐵 React Native / Golang / Node Practitioner, 🐧 Flutter Starter, Life-Hacker, DevOps Starter

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

What is Solidity?

A Step-By-Step Guide To Building a Trading Bot In Any Programming Language

Escaping the Game (Game Dev Day 32)

Agile in Action — Big Data Projects

Shell Script Workshop

Programming, a way of Life.

Learn the fundamentals of functional programming

Basic Ruby- Debugging with Pry

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Jimmy Liao

Jimmy Liao

🏃Leisure Runner (completed full marathon * 12), 🤓Fullstack, 🐵 React Native / Golang / Node Practitioner, 🐧 Flutter Starter, Life-Hacker, DevOps Starter

More from Medium

How to connect your pc to Gitlab with ssh

Install Inkscape 1.2 On Ubuntu / LinuxMint / Debian

inkscape

The basic Terminal commands you should know.

Building your command line interface (CLR) tool with vlang on Windows