ubuntu环境下重装linux系统(103.Windows11系统安装Linux子系统)

虽然Windows很强大,但难免有时还是要了解、学习、使用,甚至依赖Linux系统,从Windows 10起,微软也开始拥抱Linux,对于普通用户来说是一件很好的事情,可以减少时间和精力成本,让普通用户很容易学习和接受Linux,下面我们就来聊聊关于ubuntu环境下重装linux系统?接下来我们就一起去了解一下吧!

ubuntu环境下重装linux系统(103.Windows11系统安装Linux子系统)

ubuntu环境下重装linux系统

虽然Windows很强大,但难免有时还是要了解、学习、使用,甚至依赖Linux系统,从Windows 10起,微软也开始拥抱Linux,对于普通用户来说是一件很好的事情,可以减少时间和精力成本,让普通用户很容易学习和接受Linux。

本文主要从普通用户的角度来演示一下如何在Windows 11安装Linux子系统。

以管理员身份运行命令行

1、升级更新wsl内核版本

wsl --update

2、查看有效分发的列表

wsl --list -o

C:\WINDOWS\system32>wsl --list -o 以下是可安装的有效分发的列表。 请使用“wsl --install -d <分发>”安装。 NAME FRIENDLY NAME Ubuntu Ubuntu Debian Debian GNU/Linux kali-linux Kali Linux Rolling openSUSE-42 openSUSE Leap 42 SLES-12 SUSE Linux Enterprise Server v12 Ubuntu-16.04 Ubuntu 16.04 LTS Ubuntu-18.04 Ubuntu 18.04 LTS Ubuntu-20.04 Ubuntu 20.04 LTS

3、安装

C:\WINDOWS\system32>wsl --install -d Ubuntu-20.04

正在下载: Ubuntu 20.04 LTS [= 3.3% ] C:\WINDOWS\system32>wsl --install -d Ubuntu-20.04 正在下载: Ubuntu 20.04 LTS 安装过程中出现错误。分发名称: 'Ubuntu 20.04 LTS' 错误代码: 0x80072eff

安装下载中

##换个分发名称再安装 C:\WINDOWS\system32>wsl --install -d ubuntu 正在下载: Ubuntu 正在安装: Ubuntu 已安装 Ubuntu。 正在启动 Ubuntu…

输入用户名和密码:

安装成功

  • 3.1、设置root用户密码

    youufis@LiuYuJun-K3:~$ sudo passwd root New password: Retype new password: passwd: password updated successfully

  • 3.2、查看网络配置

    youufis@LiuYuJun-K3:~$ ifconfig Command 'ifconfig' not found, but can be installed with: sudo apt install net-tools youufis@LiuYuJun-K3:~$ sudo apt install net-tools Reading package lists... Done Building dependency tree Reading state information... Done The following NEW packages will be installed: net-tools 0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded. Need to get 196 kB of archives. After this operation, 864 kB of additional disk space will be used. Get:1 http://archive.ubuntu.com/ubuntu focal/main amd64 net-tools amd64 1.60 git20180626.aebd88e-1ubuntu1 [196 kB] Fetched 196 kB in 4s (54.4 kB/s) Selecting previously unselected package net-tools. (Reading database ... 31836 files and directories currently installed.) Preparing to unpack ../net-tools_1.60 git20180626.aebd88e-1ubuntu1_amd64.deb ... Unpacking net-tools (1.60 git20180626.aebd88e-1ubuntu1) ... Setting up net-tools (1.60 git20180626.aebd88e-1ubuntu1) ... Processing triggers for man-db (2.9.1-1) ... youufis@LiuYuJun-K3:~$

    youufis@LiuYuJun-K3:~$ ifconfig eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500 inet 172.26.158.186 netmask 255.255.240.0 broadcast 172.26.159.255 inet6 fe80::215:5dff:fe6e:50ca prefixlen 64 scopeid 0x20<link> ether 00:15:5d:6e:50:ca txqueuelen 1000 (Ethernet) RX packets 208 bytes 245306 (245.3 KB) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 129 bytes 10858 (10.8 KB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536 inet 127.0.0.1 netmask 255.0.0.0 inet6 ::1 prefixlen 128 scopeid 0x10<host> loop txqueuelen 1000 (Local Loopback) RX packets 0 bytes 0 (0.0 B) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 0 bytes 0 (0.0 B) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 youufis@LiuYuJun-K3:~$

    ##检查网络连通性,ping一个百度 youufis@LiuYuJun-K3:~$ ping www.baidu.com PING www.a.shifen.com (14.215.177.38) 56(84) bytes of data. 64 bytes from 14.215.177.38 (14.215.177.38): icmp_seq=1 ttl=55 time=11.5 ms 64 bytes from 14.215.177.38 (14.215.177.38): icmp_seq=2 ttl=55 time=9.09 ms 64 bytes from 14.215.177.38 (14.215.177.38): icmp_seq=3 ttl=55 time=8.71 ms 64 bytes from 14.215.177.38 (14.215.177.38): icmp_seq=4 ttl=55 time=9.29 ms 64 bytes from 14.215.177.38 (14.215.177.38): icmp_seq=5 ttl=55 time=8.87 ms 64 bytes from 14.215.177.38 (14.215.177.38): icmp_seq=6 ttl=55 time=8.87 ms ^C --- www.a.shifen.com ping statistics --- 6 packets transmitted, 6 received, 0% packet loss, time 9068ms rtt min/avg/max/mdev = 8.711/9.395/11.548/0.980 ms

    4、安装完毕,启动ubuntu

    #管理员身份运行CMD C:\WINDOWS\system32>wsl youufis@LiuYuJun-K3:/mnt/c/WINDOWS/system32$

    至此,可以在Linux系统下折腾和学习了。

  • 免责声明:本文仅代表文章作者的个人观点,与本站无关。其原创性、真实性以及文中陈述文字和内容未经本站证实,对本文以及其中全部或者部分内容文字的真实性、完整性和原创性本站不作任何保证或承诺,请读者仅作参考,并自行核实相关内容。文章投诉邮箱:anhduc.ph@yahoo.com

      分享
      投诉
      首页