[LINUX] Install Ubuntu 20.04 with GUI and prepare the development environment

Purpose of this article

This article is a record of a Mac user who was inspired by the release of Ubuntu 20.04 and tried to build an environment. I've installed Ubuntu 20.04 on both my laptop and VirtualBox on my Mac and found that it works. I think that there is a setting that does not receive everyone, so I hope that you can read it as much as there are people who do this kind of thing.

Specifically, we did the following:

--[Install Ubuntu](Install #ubuntu) -[Install Google Chrome](Install # google-chrome) -[Abandon ibus and install fcitx-mozc](Abandon #ibus and install fcitx-mozc) -[Crush caps lock and change to ctrl](Crush #caps lock and change to ctrl) -[Install Regolith Linux and try using i3](Install # regolith-linux and try using i3)

By the way, this article is written from the installed Ubuntu.

Until you boot Ubuntu from iso

Download the Ubuntu 20.04 iso from the following page. https://jp.ubuntu.com/download

I wrote a rough explanation for both the case of physically installing on a computer and the case of installing as a VM, so please read the one you like. If you are familiar with installing Linux, skip to [Detailed settings after installation](#Detailed settings after installation).

Those who install on laptops

Insert a USB memory etc. into your Mac and use the following command to find the location where the USB memory is recognized.

$ diskutil list

Unmount the USB stick

$ diskutil unmountDisk /dev/disk2

Burn the iso to a USB stick with dd. All the contents of USB will be erased.

$ sudo dd if=./ubuntu-20.04-desktop-amd64.iso of=/dev/disk2 bs=4028

Stick it in the laptop you want to install it on and reboot. If you hit ESC or something repeatedly when the BIOS screen appears, it will boot from USB. I don't explain in detail how to boot from USB because I think there are many other commentary articles.

When installing in VirtualBox

Create a new VM with a nice touch. 8GB of memory and 30GB of disk are allocated.

スクリーンショット 2020-05-05 21.37.54.png

After creating the VM, I increased the CPU allocation to 4 Core,

スクリーンショット 2020-05-05 21.39.44.png

I set the iso I downloaded earlier as the optical drive.

スクリーンショット 2020-05-05 21.39.07.png

Install ubuntu

The screens from here are all VirtualBox screens because it is difficult to take screenshots during installation.

When you start Ubuntu, a screen like this will appear, so select Japanese at the bottom from the language column on the left and press Install Ubuntu. スクリーンショット 2020-05-05 21.49.20.png

Select the Keyboard you are using now. スクリーンショット 2020-05-05 21.49.11.png

This area is your choice. I proceeded as it was. スクリーンショット 2020-05-05 21.49.50.png

Select how to install on the disk. With VirtualBox, don't worry about it. When installing on a normal computer, you will be asked what to do with the existing OS. I think there is a way to live with Windows, but I won't explain it this time because the story goes awry. Proceed by erasing everything. スクリーンショット 2020-05-05 21.50.12.png

Select Tokyo for Timezone. スクリーンショット 2020-05-05 21.51.16.png

Please enter your favorite user name. Password too. スクリーンショット 2020-05-05 21.51.36.png

The installation has started. In my environment it took about 5 minutes. The code name of Ubuntu 20.04 is Focal Fossa, but the screen shows Fossa as if you were staring at it. スクリーンショット 2020-05-05 21.51.54.png

The installation is completed successfully. VirtualBox will be restarted if you just press Enter. If you are installing directly on your computer, unplug the USB and press Enter. スクリーンショット 2020-05-05 21.57.59.png

After restarting, this screen will appear, so select your user name, enter your password, and log in. スクリーンショット 2020-05-05 21.58.31.png

Various initial settings will come out, so proceed as you please. スクリーンショット 2020-05-05 21.59.47.png

Detailed settings after installation

Install Guest Additions for VirtualBox.

It's only VirtualBox, but it's sad if the screen remains narrow, so let's install Guest Additions so that you can expand the screen. From the menu bar on the Host side, press "Devices"-> "Insert Guest Additions CD image" and install as told.

スクリーンショット 2020-05-05 22.03.11.png

When you see this, you're done, so press Enter to exit. After that, if you resize the window of VirtualBox, the screen will expand properly. スクリーンショット 2020-05-05 22.03.42.png

Convert files in your home directory back to English

By default, some directories under your home directory look like download, and it's hard to choose from the console, so I'll switch back to English.

You can start the console by pressing the dots at the bottom left and scrolling down to find a terminal. スクリーンショット 2020-05-05 22.04.03.png

$ LANG=C xdg-user-dirs-gtk-update

Install Google Chrome

I like Chrome so I'll say goodbye to FireFox early.

Download the .deb file for debian / ubuntu from the following page. https://www.google.com/intl/ja_jp/chrome/

If you don't normally use FireFox like me, be aware that it will be downloaded as a temporary file in a place you don't understand unless you choose to save it instead of opening it.

スクリーンショット 2020-05-05 22.18.20.png

Install with the following command. (As an aside, I didn't know until today that I could install .deb files with the apt-get command. I've always used dpkg -i.)

$ sudo apt-get install ~/Downloads/google-chrome-stable_current_amd64.deb

Discard ibus and install fcitx-mozc

Various settings didn't work, so I decided to abandon ibus and install fcitx.

$ sudo apt-get install fcitx fcitx-mozc -y
$ sudo apt-get purge ibus

After executing the above command, open the input tool, press OK and select fcitx.

スクリーンショット 2020-05-05 22.26.30.png

スクリーンショット 2020-05-05 22.26.48.png

Reboot once here. Then, I think that you can enter Japanese with ctrl + space. I like the feeling of using a Mac, so from Fcitx Settings, go to" Global Settings "->" Hotkeys "->" Show Advanced Options "->" Turn Input Methods On / Off ", but with the conversion key A non-conversion key is set.

In Virtualbox, for some reason in my environment, even if I press the conversion key and the non-conversion key, they are all recognized as full-width and half-width keys. If you install it directly, it will be recognized properly, so I think that either the Mac or Virtualbox settings are bad, but I have not found it yet.

(Figure where conversion / no conversion is not recognized) スクリーンショット 2020-05-05 22.33.31.png

Crush caps lock and change to ctrl

I'm not using the CapsLock key, so I'll crush the CapsLock key so that it can be used as a Ctrl key.

$ sudo vi /etc/default/keyboard

Rewrite the line XKBOPTIONS =" " to XKBOPTIONS = "ctrl: nocaps" `. Now when you reboot, you should see the Caps Lock key treated as the Ctrl key.

In my environment, for some reason, only Google Chrome does not recognize Caps Lock as Ctrl at the time of tab transition with Ctrl + Tab. I am looking for an expert.

Install Regolith Linux and try using i3

On my Mac, I use a software called Alfred to open and switch apps. https://www.alfredapp.com/

I also use software called Spectacle to display the window in full screen or split it into left and right. https://www.spectacleapp.com/

Ubuntu wants a similar feeling of operation, and a similar one is called a tiled window manager. This time I would like to try out i3, which seems to be particularly famous.

You can do the initial settings yourself, but the default settings are published as a distribution under the name Regolith Linux, so I will try using this. https://regolith-linux.org/

It's a distribution, so you can install it from the beginning instead of Ubuntu, but this time I'll add it later. You can add it to Ubuntu later with the following command.

$ sudo add-apt-repository ppa:regolith-linux/release
$ sudo apt install regolith-desktop i3xrocks-net-traffic i3xrocks-cpu-usage i3xrocks-time

Reboot and log in by selecting Regolith from the bottom right when logging in.

スクリーンショット 2020-05-05 22.49.01.png

Almost nothing is displayed when you start it, but please read the following pages etc. to learn how to use it. I'm sure it's fun. Or I think that help is on the right side of the screen, so even if you read it, you can understand how to use it. https://regolith-linux.org/docs/getting-started/basics/

The minimum usage is as follows, using the Mod key as the Windows key.

Mod + Space :Open Launcher
Mod + Enter :Open Terminal
Mod + 1,2... :Switch Workspace

The following is the Launcher displayed with Google Chrome and Terminal open. It's very cool. スクリーンショット 2020-05-05 22.50.34.png

Summary

I think that the environment where Ubuntu can be used is somehow created.

After that, please install your favorite language, insert VS Code, and install IntelliJ IDEA.

Recommended Posts

Install Ubuntu 20.04 with GUI and prepare the development environment
Prepare the development environment with anyenv
Prepare Python development environment on Ubuntu
Prepare Python development environment with Atom
Install CaboCha in Ubuntu environment and call it with Python.
Prepare the development environment for keyhac for Mac
Introduction to Python Let's prepare the development environment
Note: Prepare the environment of CmdStanPy with docker
Prepare the execution environment of Python3 with Docker
Install pip and pandas with Ubuntu or VScode
Prepare the development environment for Python on AWS Cloud9 (pip install & time change)
Prepare a development environment that is portable and easy to duplicate without polluting the environment with Python embeddable (Windows)
Install the latest stable Python with pyenv (both 2 and 3)
Manage Python runtime packages and development environment packages with Poetry
Make it easy to install the ROS2 development environment with pip install on Python venv
Build python3 environment with ubuntu 16.04
Prepare python3 environment with Docker
Ubuntu18.04 Development environment creation memo
[Day 1] Prepare Django's development environment
Unify the environment of the Python development team starting with Poetry
Build a machine learning scikit-learn environment with VirtualBox and Ubuntu
Prepare Python development environment with Mac + Windows + VisualStudio Code (Windows version)
Prepare Python development environment with Mac + Windows + VisualStudio Code (Mac version)
How to get into the python development environment with Vagrant
Prepare pipenv environment with amazon Linux 2
Install Python 2.7.9 and Python 3.4.x with pip.
Get the strongest environment with VS Code, Remote-Containers and remote docker-daemon
Install Mecab and mecab-python3 on Ubuntu 14.04
Install and run dropbox on Ubuntu 20.04
Install OpenCV and Chainer on Ubuntu
(Windows10) Install Linux environment and gnuplot.
GUI development with Fyne by Go
Install CUDA 8.0 and Chainer on Ubuntu 16.04
Prepare your first Python development environment
[GUI with Python] PyQt5-Drag and drop-
Install the data files with setup.py
Install fabric on Ubuntu and try
Prepare an environment to use OpenCV and Pillow with AWS Lambda
Install pip in Serverless Framework and AWS Lambda with Python environment
Install Python development environment on Windows 10
Prepare a distributed load test environment with the Python load test tool Locust
Checking the NAOqi Python development environment
Ubuntu Desktop 20.04 development environment construction memo
Until you build the environment with ABCI and run MaskTrack RCNN
Create a simple Python development environment with VS Code and Docker
Rebuild Django's development environment with Docker! !! !! !!
Prepare the environment for Atom for Pythonista
[DynamoDB] [Docker] Build a development environment for DynamoDB and Django with docker-compose
Environment construction with pyenv and pyenv-virtualenv
Install Chrome on the command line on Sakura VPS (Ubuntu) and launch Chrome with python from virtual display and selenium
I set the environment variable with Docker and displayed it in Python
Prepare the environment of Chainer on EC2 spot instance with AWS Lambda
[Pyenv] Building a python environment with ubuntu 16.04
[Ubuntu 18.04] Python environment construction with pyenv + pipenv
Easily build a development environment with Laragon
[Development environment] Python with Xcode [With screen transition]
Build Python3 and OpenCV environment on Ubuntu 18.04
Python virtual environment and packages on Ubuntu
Execute Google Translate and DeepL Translate with GUI
How to prepare Python development environment [Mac]
Install by specifying the version with pip