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

wget -qO- https://get.docker.com | sudo bash -
sudo usermod -aG docker $USER
sudo reboot

docker-compose

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 

Author: Hung-Lin, Chen
Reprint policy: All articles in this blog are used except for special statements CC BY 4.0 reprint policy. If reproduced, please indicate source Hung-Lin, Chen !
 Previous
How to use ncat or socat to map the remote port to local server How to use ncat or socat to map the remote port to local server
Introductionncat和socat都是linux的網路工具這次主題要達成的目標用這兩個都能達成 他們可以做到: 只要是能夠訪問到的port都可以把它映射到本機的port上 寫這篇也是要介紹之前寫reverse proxy的
2022-10-02
Next 
Building hexo blog using docker Building hexo blog using docker
Introduction目的是只需用docker-compose up -d就能快速佈署然後docker-compose restart就能更新內容與設定 爲了能夠直接在本機撰寫文章,需要將container內的USER設定成和本機一
2022-09-20
  TOC