Ubuntu 22.04 setup after installation

The following setup is my customization while ubuntu initialization

Operating System

Input method

fcitx5-rime

sudo apt install fctix5-*
im-config  

勉強適合Ubuntu22.04的中文輸入法

nfs-common

sudo apt install nfs-common
sudo mount -t nfs $remote_host:/remote/path /local/path

GNOME

window minimize

gsettings set org.gnome.shell.extensions.dash-to-dock click-action 'minimize'

circle windows

gsettings set org.gnome.shell.extensions.dash-to-dock scroll-action 'cycle-windows'

If the commands are not working, you can install dconf-editor to set.

Switching between windows with scroll wheel on Ubuntu Dock
Essential Guide: How to Enable ‘Minimize on Click’ on Ubuntu Quickly

time sync bwtween Windows and Ubuntu

sudo apt install ntpdate
sudo ntpdate time.windows.com 
sudo hwclock --systohc --localtime

google cloud SDK

curl https://sdk.cloud.google.com | bash
exec -l $SHELL
gcloud init  

login

gcloud compute --project 'project-name' ssh --zone  "server path" "host name"

Developement

VS Code

sudo apt install wget gpg
wget -qO- https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > packages.microsoft.gpg
sudo install -D -o root -g root -m 644 packages.microsoft.gpg /etc/apt/keyrings/packages.microsoft.gpg
sudo sh -c 'echo "deb [arch=amd64,arm64,armhf signed-by=/etc/apt/keyrings/packages.microsoft.gpg] https://packages.microsoft.com/repos/code stable main" > /etc/apt/sources.list.d/vscode.list'
rm -f packages.microsoft.gpg
sudo apt update
sudo apt install apt-transport-https
sudo apt install code

Visual Studio Code on Linux

Miniforge3

It’s an alternative of Miniconda3.
Conda and Mamba are installed during the installation.

curl -L -O "https://github.com/conda-forge/miniforge/releases/latest/download/Mambaforge-$(uname)-$(uname -m).sh"
bash Mambaforge-$(uname)-$(uname -m).sh

https://github.com/conda-forge/miniforge

If you don’t want to activate base env automatically

conda config --set auto_activate_base false

poetry

conda deactivate
curl -sSL https://install.python-poetry.org | python3 -
source $HOME/.poetry/env
poetry config virtualenvs.in-project true

tip: Python3 is required, Python2 is not supported.

R

conda create -n r_env r-essentials r-base

Docker

{% codeblock lang:sh %} wget -qO- https://get.docker.com | sudo bash - sudo usermod -aG docker $USER sudo reboot {% endcodeblock %}

docker-compose

{% codeblock lang:sh %} sudo curl -L $(curl -s https://api.github.com/repos/docker/compose/releases/latest | sed ’s/"//g’|grep -ioP -m 1 “https://github.com/docker/compose/releases/download/v[0-9]+.[0-9]+.[0-9]+/docker-compose-$(uname -s)-$(uname -m)”) -o /usr/local/bin/docker-compose sudo chmod a+x /usr/local/bin/docker-compose {% endcodeblock %}