Setup a windows desktop computer

This is written on March 2021.

I set up Windows for the 1st time since several years ago and there was a lot of difference between recent version and the version I used. This page collects information for something it would have been helpful for setting up windows for me.

Setup for software development

Join Windows Insider Program

Windows Insider Program provides users to access applications from their dev, beta, or preview releases. This is helpful to use some applications before it becomes stable releases, like WSL, and many documents on the Internet is also written for these pre-stable versions.

Once you joined, you wanna make sure turnning on automatic updates for OS version. See this page to turn it on.

Windows Subsystem for Linux (WSL)

WSL is to run Linux on a windows as a native Windows application, unlike running a virtual machine or dual boot. It’s really helpful for developers to develop their applications on Windows like running apt or git. You can find some Linux distributions on Microsoft Store.

Enable copy and paste

As a default, copy and paste isn’t enabled, but you can easily do it on Properties > Options > Edit Options > User Ctrl+Shirt+C/V as Copy/Paste. See this article for more details.

Update Fonts to solve garbled text

The default font might not support showing your languages. In that case, updating a font might solve your issue. You can update it by Properties > Font > Font.

Limitations or issues I haven’t been solved yet

  1. The directory of a home directory on WSL (/home/$USER) is different from one of Windows (C:\Users$USER), and if I put something like a git repository under Windows directory, then permissions of it was changed to 777 and all changes are changed and hard to check each change by git.
    • I wanted to develop an application using IDE on Windows but manage it by tools like git on WSL. I couldn’t do it because of this.
  2. Supporting GUI of Linux is under development and I haven’t tried, though there is an article to do it.

Troubleshootings

  1. How to upgrade WSL from 1 to 2?
  2. Network speed on WSL 2 is terribly slow.
    • You have to do disable “Large Send Offload”. You can do it on Device Manager > Network adapters > Hyper-V Virtual Ethernet Adapter > Properties > Advanced. See this comment on GitHub issue for more details.

winget

winget is a CLI to install and manage applications, just like HomeBrew on Mac, apt or yum on Linux. You need to install App Installer to use this tool, and also need to join Windows Insider Program to install it.

Setup for daily use

UI

Enable night light

You can enable a night light under Settings > System > Display to reduce blue light and also can set a schedule.

Enable Dark mode

You can enable Dark mode under Settings > Personalization > Colors. See this article for more details.

To turn on Dark mode at night automatically

Unfortunately, there is no built-in feature to switch a light and dark mode automatically. In order to enable Dark mode only during sunset, you need to set up something. The way I did was using a Task Scheduler to enable Dark mode automatically at night and disable it on the morning, by following this article.

Languages and keyboards

Install Japanese IME and change a shortcut key

You can use Google Japanese Input to use Japanese in your computer. In order to change the shortcut key to Ctrl+space to switch an input method, go to Propertites of Google Japanese Input Settings, click Customize of Keymap style under General tab, and update Key column to Ctrl Space on each command of Activate/Deactivate IMEI of every mode. See this post, written in Japanese, for more details.

Use shortcut keys of Emacs

There is a disadvantage for this configuration, like Ctrl-k works twice on Emacs on WSL unexpectedly. So I may disable this in the future.

First of all, in order to customize short cut keys on Windows, AutoHotKey might be useful. Then you might wanna use a few shortcut keys of Emacs on most of applications such as moving cursors by Ctrl-f, but you do not need full Emacs customization like Ctrl-x and doing something else, like Mac. In this case, gtk-emacs-theme-like, tiny AutoHotKey configuration, can be used to do it.

Also, you can also set this configuration on every boot. At first, you have to run shell:startup after you type Win+R and you can see a folder on your explorer. Then right click and select “Paste shortcut” in the folder. Now the script run every time you start your computer. See this FAQ for more details.

2024

Back to Top ↑

2023

Follow Kubernetes the Hard way

4 minute read

This article was written by just following Kelsey Hightower’s Kubernetes Hardway document to understand Kubernetes internal architecture.

Gcp Billing Analyze

less than 1 minute read

There are a few documents to manage billing data in BigQuery Attribution of committed use discount fees and credits How to export to BigQuery Structur...

Prometheus Metrics Overview on Grafana

1 minute read

In this post, some variables defined in Grafana are used for Prometheus metrics, including $__rate_interval: This article describes the benefit of this va...

Use Google Secret Manager in a GKE cluster

3 minute read

There are an awesome article about the options to use the Google Secret Manager and their pros and cons. In this article, use Secrets Store CSI Driver by fol...

Working around MySQL lock metadata

2 minute read

There are multiple documents about innodb locks on MySQL 5.7: InnoDB locking Locks Set by Different SQL Statements in InnoDB Using InnoDB Transaction ...

Upgrade Windows 10 to Windows 11

3 minute read

I used to use Windows 11, but for some reasons, the OS stopped working and I needed to clean-install it from Windows 10 from windows recovery environment.

Back to Top ↑

2022

MySQL backup and restore

1 minute read

In this article, explain how to backup MySQL database using Percona Xtrabackup. There are two binaries, innobackupex and xtrabackup. innobackupex is a wrappe...

tmux

1 minute read

Basic configuration

Back to Top ↑

2021

MySQL Replication

1 minute read

This configuration is for the version 5.7 and it’s minimum configuration in the official document.

jq cheetsheet

less than 1 minute read

jq is used to parse JSON result, format and output on the cli.

Compare static site generator

less than 1 minute read

There are many web sites to compare static site generator, but they miss some explanations that require to me. For some people, these features are important ...

Back to Top ↑

2020

Getting Started with Kubernetes Deployment

less than 1 minute read

The deployment is many use cases and in this page, they’re not described. For the details for those use cases or the concept of deployment, see official page.

Overview about MySQL Lock

2 minute read

This document is written for MySQL 5.7, so these contents may be not correct for other versions.

MySQL Performance

2 minute read

This document is written for MySQL 5.7, so these contents may be not correct for other versions. In this page, performance_schema is mainly discussed.

Git hooks

less than 1 minute read

Configurations

gitHub pages

3 minute read

Getting Started See Official tutorial for detail steps.

Gitconfig

1 minute read

Configuration The detail for gitconfig is written in official page.

git cli

less than 1 minute read

Written in March 2020.

MySQL Tuner

less than 1 minute read

MySQL Tuner tool This is a tool to review a configuration for MySQL server.

kubectl cheetsheet

less than 1 minute read

Collect recent error logs If the logs are outputted by zap, error messages are aggregated by checking level = error. This log does not work very well if the ...

Introduction to GCP Cloud endpoints

less than 1 minute read

The Cloud endpoint is actually the NGINX proxy which offers the following features on GCP. Authentication and validation Logging and monitoring in GCP

HTTP/2 for Go

1 minute read

http package in golang supports HTTP/2 protocols. It’s automatically configured.

Back to Top ↑

2019

Terraform overview

1 minute read

Basic concepts There are some basic components for terraform.

Protocol Buffers for Go with Gadgets

less than 1 minute read

gogo/protobuf is the library to store some extensions from golang/protobuf in this repository. There are some useful packages that golang/protobuf does not p...

Introduction to GCP Cloud CDN

less than 1 minute read

Target upstream services Cloud CDN can have only GCP load balancer as the upstream services. And GCP load balancer can configure one of followings for backen...

Getting Started with Google closure library

less than 1 minute read

Some JavaScript library depends on Google Closure. If you need to understand the behavior of such a library, you have to know closure. The official document ...

Back to Top ↑