Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to configure Linux on Windows

2025-02-05 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)05/31 Report--

This article mainly introduces "how to configure Linux on Windows". In daily operation, I believe many people have doubts about how to configure Linux on Windows. The editor consulted all kinds of materials and sorted out simple and easy-to-use methods of operation. I hope it will be helpful to answer the doubts of "how to configure Linux on Windows". Next, please follow the editor to study!

Install Windows Terminal

When connecting to other Linux remotely, I usually use Xshell because it is beautiful and good-looking.

On Windows, you can install Windows Terminal. Somewhat similar to iTerm on MacOS, it can be said to be the most comfortable terminal under Windows.

To install Windows Terminal, you need to get it from the app store, which is the button below.

Search the Windows Terminal in the search box to find the software. What's more humane is that unlike Mac's app store, it requires you to prepare an account first. WT does not need to be logged in to obtain.

It doesn't matter if your page keeps spinning around, just close it and reopen it a few times. Due to well-known reasons, there are few foreign websites that do not turn around.

Install the Ubuntu subsystem

At this point, we only have a command-line terminal installed, which is one section short of our goal of throwing away Linux. Don't worry, here's how to install Ubuntu on Windows.

Plan 1. Install Linux through the virtual machine, and then the terminal accesses it. This scheme is too low-level, is the way I have been using in the past, full of frustrations.

Second, divide a partition to install Linux, and then switch when you restart. Just kidding, this approach is even more backward and is the product of antique-level players.

We just need to turn on the subsystem function on the system and install Linux in the app store.

How simple is it? It's so simple that you may not spend as much time as I nag.

As shown in the following figure, in the control panel, find the program options and click "enable or disable Windows function".

From the pop-up dialog box, go to the bottom, and then tick "Windows subsystem for Linux", and it's done!

Install the Ubuntu system from the app store and the system will exist in the form of software. I chose the LTS version here, and I can see that there are not many people who grade it, and most of them are tourists who don't have a Microsoft account like me.

Ex post configuration

At this point, something amazing happened. In the upper-right corner of our Windows Terminal, there is a down arrow. Click on it and you can see the Ubuntu you just installed.

There is only one click away from Linux on Windows.

After entering the Linux system, we can configure this machine as if we were configuring a normal Linux.

First of all, replace the software source of ubuntu. Edit the / etc/apt/sources.list file and replace its contents with the following source.

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

Then, install the best-used oh-my-zsh. Install the shell terminal with sudo apt install zsh, and then run the following command.

Sh-c "$(curl-fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"

After waiting for a short period of time, our terminal appearance will please climb to another tall building.

If you want your terminal to be more beautiful, you can refer to the topic page below. After all, the command terminal is something you have to face every day, longer than you face your girlfriend, and being ugly affects your mood.

Https://terminalsplash.com/

There's just one last question. How to access the files in our Linux system in Windows?

This is a little magical. Execute the following command under Linux.

Cd / home explorer.exe.

The above command opens the Windows directory corresponding to the Linux directory, which we can access from the file manager.

For ease of operation, I mapped this long directory to Z disk. As shown in the figure, the next time you visit Linux, you can access Z disk directly.

At this point, the study on "how to configure Linux on Windows" is over. I hope to be able to solve your doubts. The collocation of theory and practice can better help you learn, go and try it! If you want to continue to learn more related knowledge, please continue to follow the website, the editor will continue to work hard to bring you more practical articles!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report