Ssh to Ubuntu on VirtualBox on your Mac and do it until you install Docker

1. Install VirtualBox on your Mac

Check the script on the Homebrew site and run it on the terminal

As of October 25, 2020, the script below

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"

Install VirtualBox on your Mac with Homebrew

brew update && brew upgrade && brew upgrade --cask
brew cask install virtualbox

2. Install Ubuntu in VirtualBox

Download the Ubuntu image

Install Ubuntu in virtualbox

――LIFESTYLE LAB ―― Finally done! How to install Ubuntu on VirtualBox on Mac

Install Guest Additions on Ubuntu

--Qiita-Comfortable use of Ubuntu on Mac

3. Set up an SSH connection to Ubuntu

--with FPGA --Ssh access to Ubuntu in Virtual Box on Mac and X transfer

Set up a host-only adapter on Ubuntu

--Turn off Ubuntu on VirtualBox --Select VirtualBox> File> Host Network Manager ... --Press the Create button to create vboxnet0 --DHCP Server checks Enable --Close the Host Network Manager window --Press the VirtualBox Settings button --Select the Network tab --Select Adapter 2 (if not, restart VirtualBox once) --Check Enable Network Adapter -Select Host-only Adapter with Attached to: --Press the OK button

Install openssh-server on Ubuntu

Start Ubuntu on VirtualBox, open terminal and execute the following code

sudo apt update && sudo apt upgrade
sudo apt install openssh-server
sudo systemctl enable ssh
sudo systemctl restart ssh
ip address

Check the IP address of ʻinetassigned to3: enp0s8`.

Establish an SSH connection from your Mac

Execute code in the following format on the terminal of Mac and make an SSH connection However, <user> is the username on Ubuntu and <ip> is the IP address confirmed above. Example: ssh [email protected]

ssh <user>@<ip>

After that, operate everything from the terminal of the Mac connected to Ubuntu by SSH.

4. Install Docker on Ubuntu

Uninstall old versions

sudo apt-get remove docker docker-engine docker.io containerd runc

SET UP THE REPOSITORY

Update the apt package index and install packages to allow apt to use a repository over HTTPS:

sudo apt-get update
sudo apt-get install \
    apt-transport-https \
    ca-certificates \
    curl \
    gnupg-agent \
    software-properties-common

Add Docker’s official GPG key:

curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -

Verify that you now have the key with the fingerprint 9DC8 5822 9FC7 DD38 854A E2D8 8D81 803C 0EBF CD88, by searching for the last 8 characters of the fingerprint.

sudo apt-key fingerprint 0EBFCD88

Use the following command to set up the stable repository.

sudo add-apt-repository \
   "deb [arch=amd64] https://download.docker.com/linux/ubuntu \
   $(lsb_release -cs) \
   stable"

INSTALL DOCKER ENGINE

Update the apt package index, and install the latest version of Docker Engine and containerd, or go to the next step to install a specific version:

sudo apt-get update
sudo apt-get install docker-ce docker-ce-cli containerd.io

Verify that Docker Engine is installed correctly by running the hello-world image.

sudo docker run hello-world

Handle docker without sudo

sudo usermod -aG docker $USER
newgrp docker
docker run hello-world

Recommended Posts

Ssh to Ubuntu on VirtualBox on your Mac and do it until you install Docker
Install Ubuntu Server 20.04 in VirtualBox on Mac and connect with SSH
What to do if you enable UFW on Ubuntu VM on GCP and you can't connect to SSH
Until you put Ubuntu 20 on Windows 10 Home and WSL2 and run Docker
Steps to install Maven on Mac and use it in Eclipse
Until you run apache on ubuntu on docker
What to do if you install Ubuntu
How to install NVIDIA driver on Ubuntu ssh destination
Install Eclipse on Mac and translate it into Japanese
Install Docker on Ubuntu Server 20.04
Until you start nginx on CentOS using Docker on Mac OS
Until you run Quarkus and run docker image on Amazon ECS
Install docker and docker-compose on ubuntu in the shortest process
How to Install Elixir and Phoenix Framework on Ubuntu 20.04 LTS
How to install and use Composer on an ECS instance on Ubuntu 16.04
How to uninstall if you have updated to Java 9 on your Mac
Install JDK and JRE on Ubuntu 16.10
How to install and configure the monitoring tool "Graphite" on Ubuntu
Until you build the docker environment and start / stop the Ubuntu container
Use Docker on your M1 Mac
How to install WildFly on Ubuntu 18.04
Install Ubuntu20.04 on RaspberryPi 4 and build Kubernetes to run the container
Challenge to install WSL2 and docker
Install Docker on Ubuntu and set up remote connection using tls
Install docker and docker-compose on Alpine Linux
How to install Eclipse (Photon) on Mac
How to install production Metabase on Ubuntu
I want to install PHP 7.2 on Ubuntu 20.04.
Until you run CuPy (v11.1) on Ubuntu 20.04
Run Ubuntu + ROS with Docker on Mac
What to do if Docker Desktop fails to launch on your M1 MacBook Pro
Install java and android-sdk on Mac using homebrew
Install Docker on Raspberry Pi 4 and Raspberry Pi OS 64bit
Until you start developing android apps on mac
How to install network drivers on standalone Ubuntu
How to install NVIDIA driver on Ubuntu 18.04 (Note)
I installed Docker on EC2 and started it
Install SonarQube on Mac and challenge source analysis
Until you install Gradle and output "Hello World"
How to install multiple JDKs on Ubuntu 18.04 LTS
Install and switch between multiple Javas on Ubuntu
Docker on Ubuntu18.04 on WSL2 and VSCode installation instructions
What to do when booting Ubuntu on WSL2 and getting "Process terminated with code 1"
Install Ubuntu 20.04 in virtual box on windows10 and build a development environment using docker
Steps to set up Jenkins on your local Mac, create one job and succeed
Until you build a Nuxt.js development environment with Docker and touch it with VS Code
Until you create a Spring Boot project in Intellij and push it to Github
How to quit Docker for Mac and build a Docker development environment with Ubuntu + Vagrant
Eh !? Run Linux on Windows? I can do it! !! (I set WSL2 and put Ubuntu)
[Even beginners can do it! ] How to install Eclipse on Windows 10 (Java environment construction)
What to do if you get a port error when docker-compose up on Mac
Install mecab-ipadic-neologd on Sakura VPS (ubuntu18.04) with low memory and use it from python
Install java and maven using brew on new mac
Command memo to install xeyes in ubuntu docker environment
Install rbenv with apt on ubuntu and put ruby
How to install Gradle and Kotlin with SDKMAN (Mac)
Install ag (the silver searcher) [on CentOS / Ubuntu / Mac]
[Rails] What to do if you accidentally install bundle in the production environment in your local environment
[It takes 3 minutes] When I tried to install VS Code on Ubuntu 18.04, it was unexpectedly easy.
How to create an environment that uses Docker (WSL2) and Vagrant (VirtualBox) together on Windows