How to Install Windows Terminal and Ubuntu Subsystem on Windows for a Seamless Linux Experience
This guide walks you through installing Windows Terminal, adding the Ubuntu subsystem via WSL, customizing the terminal with oh‑my‑zsh, and accessing Linux files from Windows, providing a unified development environment that blends Windows and Linux tools.
Install Windows Terminal
On Windows you can install
Windows Terminalfrom the Microsoft Store, similar to macOS's iTerm. Search for "Windows Terminal" in the Store and click install; no Microsoft account is required.
Install Ubuntu Subsystem
Enable the "Windows Subsystem for Linux" feature in the Control Panel (Programs → Turn Windows features on or off) and check the box for the subsystem.
Then install Ubuntu from the Microsoft Store (choose the LTS version). The Ubuntu system appears as an app.
Post‑configuration
After installation, click the down‑arrow in the Windows Terminal title bar to select the newly installed Ubuntu profile.
Inside Ubuntu, replace the default apt sources by editing
/etc/apt/sources.listwith the following lines:
<code>deb https://mirrors.ustc.edu.cn/ubuntu/ bionic main restricted universe multiverse
deb https://mirrors.ustc.edu.cn/ubuntu/ bionic-updates main restricted universe multiverse
deb https://mirrors.ustc.edu.cn/ubuntu/ bionic-backports main restricted universe multiverse
deb https://mirrors.ustc.edu.cn/ubuntu/ bionic-security main restricted universe multiverse
deb https://mirrors.ustc.edu.cn/ubuntu/ bionic-proposed main restricted universe multiverse
deb-src https://mirrors.ustc.edu.cn/ubuntu/ bionic main restricted universe multiverse
deb-src https://mirrors.ustc.edu.cn/ubuntu/ bionic-updates main restricted universe multiverse
deb-src https://mirrors.ustc.edu.cn/ubuntu/ bionic-backports main restricted universe multiverse
deb-src https://mirrors.ustc.edu.cn/ubuntu/ bionic-security main restricted universe multiverse
deb-src https://mirrors.ustc.edu.cn/ubuntu/ bionic-proposed main restricted universe multiverse</code>Install
zshand
oh‑my‑zshto enhance the shell appearance:
<code>sudo apt install zsh</code> <code>sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"</code>For additional themes, visit terminalsplash.com .
To access Linux files from Windows, run:
<code>cd /home
explorer.exe .</code>This opens the corresponding Windows directory in File Explorer. You can also map the Linux home to a drive letter (e.g., Z:).
End
The author reflects on the blurred lines between Windows and Linux after integrating the two, noting that commands from one environment can invoke the other, creating a deeply fused development platform.
macrozheng
Dedicated to Java tech sharing and dissecting top open-source projects. Topics include Spring Boot, Spring Cloud, Docker, Kubernetes and more. Author’s GitHub project “mall” has 50K+ stars.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.