[LINUX] Ubuntu Desktop 20.04 development environment construction memo

Introduction

This is an installation memo of Ubuntu Desktop 20.04 LTS Japanese Remix as a development environment. Basically, it is almost the same as "Ubuntu Desktop 18.04 Development Environment Construction Memo".

The installation destination machine is as follows.

procedure

After installing Ubuntu Desktop 18.04, upgrade by following the steps below.

sudo apt update
sudo apt install update-manager
sudo apt dist-upgrade
sudo do-release-upgrade -d -f DistUpgradeViewGtk3

Change the Japanese directory name in your home directory to English

Execute the following command from "Terminal".

$ LANG=en_US.utf8 xdg-user-dirs-gtk-update

Then, after executing the above, the window "Update standard foloders to current language?" Appeared, so press the "Update Names" button.

Swapping the left Ctrl and Caps Lock keys

I installed it nicely while reading the following. Leave Emacs Input OFF.

Change system time from UTC management to LocalTime management

In the dual boot environment of Windows 10 and Ubuntu, the system time will be -9h when Windows is started as it is.

Execute the following command to set Ubuntu system time management to LocalTime.

$ timedatectl status | grep local
      RTC in local TZ: no
$ sudo timedatectl set-local-rtc true
$ timedatectl status | grep local
      RTC in local TZ: yes
Warning: The system is configured to read the RTC time in the local time zone.
     'timedatectl set-local-rtc 0'.

Install Google Chrome

$ wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
$ sudo dpkg -i google-chrome-stable_current_amd64.deb

Install Slack

Download the deb file from the following site

Then install below.

$ sudo apt install gconf2 gconf-service
$ sudo dpkg -i slack-desktop-4.0.2-amd64.deb

Hyper installation

Download the deb file from the following site

Then install below.

$ sudo apt install libappindicator1
$ sudo dpkg -i Downloads/hyper_3.0.2_amd64.deb

install fish

Reference article: A story about how good the fish shell was

$ sudo apt install fish
$ fish
$ fish_config

Since the fish shell configuration is displayed in the browser, set "Informative Vcs" in "prompt". And add the following to ~ / .bashrc.

exec fish

When you want to use bash interactively, if you make the above settings, fish will start even if you execute bash, so when you use bash interactively in fish, ~ / Add the following to ~ / .config / fish / config.fish so that .bashrc is not read.

alias bash="bash --norc"

Install fisher.

$ sudo apt install curl
$ curl https://git.io/fisher --create-dirs -sLo ~/.config/fish/functions/fisher.fish

Emacs installation

Install Emacs 27 as follows. (*)

$ sudo snap install --classic --beta emacs 
$ sudo apt install emacs-mozc-bin
$ sudo apt install silversearcher-ag

Set .emacs as follows.

; package.el
(require 'package)
;;Added MELPA
(add-to-list 'package-archives '("melpa" . "https://melpa.org/packages/"))
;; MELPA-Added stable
(add-to-list 'package-archives '("melpa-stable" . "https://stable.melpa.org/packages/"))
;;Added Marmalade
(add-to-list 'package-archives  '("marmalade" . "https://marmalade-repo.org/packages/"))
;;Add Org
(add-to-list 'package-archives '("org" . "http://orgmode.org/elpa/"))
;;Initialization
(package-initialize)


;Fine settings
;; site-lisp path
(add-to-list 'load-path "~/.emacs.d/site-lisp")
;;not make backup files
(setq make-backup-files nil)
;; tab width 2
(setq-default tab-width 2 indent-tabs-mode nil)


; twittering-mode
(load "twittering-mode")
(setq twittering-allow-insecure-server-cert t)
(setq twittering-use-master-password t)


; web-mode
;; https://qiita.com/kwappa/items/6bde1fe2bbeedc85023e
;;Which extension is web-Specify whether to open in mode
(add-to-list 'auto-mode-alist '("\\.php\\'" . web-mode))
(add-to-list 'auto-mode-alist '("\\.html$" . web-mode))
(add-to-list 'auto-mode-alist '("\\.css$" . web-mode))
(add-to-list 'auto-mode-alist '("\\.js[x]?$" . web-mode))
;;extension.JSX edit mode even with js
(setq web-mode-content-types-alist
      '(("jsx" . "\\.js[x]?\\'")))
;;Indent
(add-hook 'web-mode-hook
          '(lambda ()
             (setq web-mode-attr-indent-offset nil)
             (setq web-mode-markup-indent-offset 2)
             (setq web-mode-css-indent-offset 2)
             (setq web-mode-code-indent-offset 2)
             (setq web-mode-sql-indent-offset 2)
             (setq indent-tabs-mode nil)
             (setq tab-width 2)
          ))


;Japanese input
;; https://qiita.com/Maizu/items/fee34328f559c7dc59d8#emacs-mozc
;;If you enter Japanese with the half-width and full-width keys, you will be in Japanese input mode.`Ctrl + [Something]`Does not work well when doing.
;;Also,`Ctrl + \`In Japanese input mode in, it doesn't work when inputting "n".
;;To solve the above emacs-Install mozc.
(require 'mozc)                                 ;loading mozc
(set-language-environment "Japanese")           ;Language environment"japanese"To
(setq default-input-method "japanese-mozc")     ;IME japanes-to mozc
(prefer-coding-system 'utf-8)                   ;UTF the default character code-To 8(require 'mozc)
(custom-set-variables
 ;; custom-set-variables was added by Custom.
 ;; If you edit it by hand, you could mess it up, so be careful.
 ;; Your init file should contain only one such instance.
 ;; If there is more than one, they won't work right.
 '(package-selected-packages (quote (mozc))))
(custom-set-faces
 ;; custom-set-faces was added by Custom.
 ;; If you edit it by hand, you could mess it up, so be careful.
 ;; Your init file should contain only one such instance.
 ;; If there is more than one, they won't work right.
 )


; Helm
;; https://qiita.com/jabberwocky0139/items/86df1d3108e147c69e2c
(require 'helm-config)
(helm-mode 1)
(global-set-key (kbd "M-x") 'helm-M-x)
(global-set-key (kbd "C-x b") 'helm-mini)
(global-set-key (kbd "C-x C-f") 'helm-find-files)
;; rebind tab to run persistent action
(define-key helm-map (kbd "<tab>") 'helm-execute-persistent-action)
;; make TAB work in terminal
(define-key helm-map (kbd "C-i") 'helm-execute-persistent-action)
;; list actions using C-z
(define-key helm-map (kbd "C-z")  'helm-select-action)

; Helm-ag
;;Advance preparation: sudo apt install silversearcher-ag
;; M-x helm-ag

Install the following with M-x package-list-packages

nvm installation

Install nvm by running the following command.

$ curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.3/install.sh | bash
$ fisher add jorgebucaran/fish-nvm 

Install Node.js and npm.

$ nvm use 12.11.0
$ node -v
v12.11.0
$ npm -v
v6.11.3

Install Yarn

Install by referring to "Install | Yarn".

$ curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
$ echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
$ sudo apt-get update && sudo apt-get install yarn

Installing the tldr command

$ npm install -g tldr

Java installation

Installation of OpenJDK 11

$ sudo apt install openjdk-11-jdk

git settings

$ sudo apt install git
$ git config --global user.name "User name"
$ git config --global user.email "mail address"
$ git config --global core.editor "emacs"

ssh settings

Copy the GitHub private key from the file server to ~ / .ssh. After that, execute the following command to set only the read permission of the owner user as the private key.

$ chmod 400 ~/.ssh/id_rsa

Avoid having to enter your passphrase every time

$ ssh-add ~/.ssh/id_rsa
$ ssh-add -l

Install Docker

I installed it nicely while reading the following

PHP installation

$ sudo apt install php
$ php -v
PHP 7.4.3 (cli) (built: May 26 2020 12:24:22) ( NTS )
Copyright (c) The PHP Group
Zend Engine v3.4.0, Copyright (c) Zend Technologies
    with Zend OPcache v7.4.3, Copyright (c), by Zend Technologies

Install Peek

Install Peek for GIF capture of your desktop screen.

$ sudo add-apt-repository ppa:peek-developers/stable

$ sudo apt update
$ sudo apt install peek

Reference material Procedures and usage of installing Peek on Ubuntu for easy capture in GIF format

Ruby installation

$ apt install ruby
$ gem install bundler

Python installation

$ apt install python

Recommended Posts

Ubuntu Desktop 20.04 development environment construction memo
Django development environment construction memo
[MEMO] [Development environment construction] Python
Ubuntu18.04 Development environment creation memo
[MEMO] [Development environment construction] wine
[MEMO] [Development environment construction] Jupyter Notebook
Emacs Python development environment construction memo
Mac OS X development environment construction memo
ConoHa environment construction memo
Python development environment construction
python2.7 development environment construction
BigGorilla environment construction memo
Anaconda environment construction memo
[Memo] Django development environment
[Ubuntu 18.04] Tensorflow 2.0.0-GPU environment construction
Ubuntu14.04 + GPU + TensorFlow environment construction
django project development environment construction
Development environment load measurement memo
Python environment construction memo on Windows 10
Prepare Python development environment on Ubuntu
[For beginners] Django -Development environment construction-
Python environment construction memo on Mac
[Python3] Development environment construction << Windows edition >>
Star Cluster environment construction work memo
Environment construction memo of pyenv + conda
Python development environment construction on macOS
Vim + Python development environment setting memo
From Ubuntu 20.04 introduction to environment construction
Development environment construction (2020 version, WSL2 + VcXsrv)
Environment construction of "Tello_Video" on Ubuntu
OpenCV3 & Python3 environment construction on Ubuntu
[Ubuntu 18.04] Python environment construction with pyenv + pipenv
Mac OS X Mavericks 10.9.5 Development environment construction
Python (anaconda) development environment construction procedure (SpringToolsSuites) _2020.4
WEB application development using django-Development environment construction-
Python3 + venv + VSCode + macOS development environment construction
Environment construction procedure: Ubuntu + Apache2 + Python + Pyramid
Mac OS X Yosemite 10.10 Development environment construction
Construction of development environment for Choreonoid class
A memo packed with RADEX environment construction
Windows + gVim + Poetry python development environment construction
Django environment construction
DeepIE3D environment construction
Emacs-based environment construction
Python environment construction
linux (ubuntu) memo
Environment construction (python)
django environment construction
CodeIgniter environment construction
python environment construction
Python --Environment construction
Python environment construction
OpenLDAP construction memo
Golang environment construction
python environment construction
Word2vec environment construction
[0] TensorFlow-GPU environment construction built with Anaconda on Ubuntu
Kotlin / Native development environment construction & installation procedure & tutorial
Mac development environment construction (Ansible + Serverspec + Travis CI)
Build a Kubernetes environment for development on Ubuntu
Mac OS X Mountain Lion 10.8.5 Development environment construction