适用于 Linux 的 Windows 子系统可让开发人员按原样运行 GNU/Linux 环境 - 包括大多数命令行工具、实用工具和应用程序 - 且不会产生传统虚拟机或双启动设置开销。
您可以:
在 Microsoft Store 中选择你偏好的 GNU/Linux 分发版。运行常用的命令行软件工具(例如 grep、sed、awk)或其他 ELF-64 二进制文件。运行 Bash shell 脚本和 GNU/Linux 命令行应用程序,包括:
工具:vim、emacs、tmux语言:NodeJS、Javascript、Python、Ruby、C/C++、C# 与 F#、Rust、Go 等服务:SSHD、MySQL、Apache、lighttpd、MongoDB、PostgreSQL。
使用自己的 GNU/Linux 分发包管理器安装其他软件。使用类似于 Unix 的命令行 shell 调用 Windows 应用程序。在 Windows 上调用 GNU/Linux 应用程序。**加粗样式**
Windows11环境下安装WSL2非常简单,首先确保虚拟化选项开启。这个如果没有开启的话,需要进电脑的BIOS设置里开启,因为intel和AMD平台的不一样,具体可以搜索下。我这台电脑18年买的,这个设置都是默认开启的。
3)系统设置
控制面板->程序->启用或关闭 windows 功能,开启 Windows 虚拟化和 Linux 子系统(WSL2)以及Hyper-V
勾选完成后,Windows11 会自己下载些东西,并提示你重启。等电脑彻底重启完以后,进行后续操作
打开Power Shell 以管理员命令输入下方代码:
bcdedit /set hypervisorlaunchtype auto
检测WSL更新
wsl --update
WSL安装
wsl --install // 安装wslg
安装记录
安装最新的 PowerShell,了解新功能和改进!https://aka.ms/PSWindows
PS C:\Users\lgk> bcdedit /set hypervisorlaunchtype auto
无法打开启动配置数据存储。
拒绝访问。
PS C:\Users\lgk> wsl --update
正在检查更新。
已安装最新版本的适用于 Linux 的 Windows 子系统。
PS C:\Users\lgk> wsl --install // 安装wslg
版权所有 (c) Microsoft Corporation。保留所有权利。
有关此产品的隐私信息,请访问 https://aka.ms/privacy。
用法: wsl.exe [参数] [选项...] [命令行]
用于运行 Linux 二进制文件的参数:
如果未提供命令行,wsl.exe 将启动默认 shell。
--exec, -e <命令行>
在不使用默认 Linux shell 的情况下执行指定的命令。
-shell-类型 <类型>-
使用提供的 shell 类型执行指定的命令。
类型:
标准
使用默认 Linux shell 执行指定的命令。
登录
使用默认的 Linux shell 作为登录 shell 执行指定的命令。
无
在不使用默认 Linux shell 的情况下执行指定的命令。
--
按当前方式传递剩余的命令行。
选项:
--cd <目录>
将指定目录设置为当前工作目录。
如果使用 ~ ,则将使用 Linux 用户的主路径。如果路径
以 / 字符开头,则将该路径解释为绝对 Linux 路径。
否则,该值必须为绝对 Windows 路径。
--发行版, -d <发行版>
运行指定的发行版。
--用户, -u <用户名>
以指定的用户身份运行。
--系统
为系统分发启动 shell。
用于管理 Linux 的 Windows 子系统的参数:
--帮助
显示使用情况信息。
--安装 <发行版> [选项...]
安装适用于 Linux 发行版的 Windows 子系统。
对于有效发行版的列表,请使用“wsl.exe --list --online”。
选项:
--不启动, -n
安装后不启动发行版。
--web-download
从 Internet 而不是 Microsoft Store 下载发行版。
--mount <磁盘>
在所有 WSL 2 发行版中附加并安装物理或虚拟磁盘。
选项:
--vhd
指定<磁盘>是指虚拟硬盘。
--bare
将磁盘附加到 WSL2,但不进行安装。
--name <名称>
使用安装点的自定义名称安装磁盘。
--type <类型>
安装磁盘时要使用的文件系统,如果未指定,则默认为 ext4。
--options <选项>
其他安装选项。
--partition <索引>
要安装的分区索引,如果未指定,则默认为整个磁盘。
--set-default-version <版本>
更改新发行版的默认安装版本。
--shutdown
立即终止所有正在运行的发行版和 WSL 2
轻型实用程序虚拟机。
--status
显示适用于 Linux 的 Windows 子系统的状态。
--unmount [磁盘]
从所有 WSL2 发行版中卸载并分离磁盘。
如果在没有参数的情况下调用,则卸载和分离所有磁盘。
--update
更新适用于 Linux 包的 Windows 子系统。
--version, -v
显示版本信息。
用于在适用于 Linux 的 Windows 子系统中管理发行版参数:
--export <发行版> [选项]
将发行版导出为 tar 文件。
对于标准输出,文件名可以为 -。
选项:
--vhd
指定该发行版应导出为 .vhdx 文件。
--import <发行版> [选项]
将指定的 tar 文件作为新发行版导入。
对于标准输入,文件名可以为 -。
选项:
--version <版本>
指定新发行版要使用的版本。
--vhd
指定提供的文件是 .vhdx 文件,而不是 tar 文件。
此操作会在指定的安装位置复制 .vhdx 文件。
--import-in-place
将指定的 .vhdx 文件导入为新发行版。
此虚拟硬盘必须以 ext4 文件系统类型格式化。
--list, -l [选项]
列出各个发行版。
选项:
--all
列出所有发行版,包括
当前正在安装或卸载的发行版。
--running
仅列出当前正在运行的发行版。
--quiet, -q
仅显示发行版名称。
--verbose, -v
显示有关所有发行版的详细信息。
--online, -o
显示可使用“wsl.exe --install”安装的发行版列表。
--set-default, -s <发行版>
将发行版设置为默认。
--set-version <发行版> <版本>
更改指定发行版的版本。
--terminate, -t <发行版>
终止指定的发行版。
--unregister <发行版>
注销发行版并删除根文件系统。
PS C:\Users\lgk>
在微软官方商店安装就行
┏━(Message from Kali developers)
┃
┃ This is a minimal installation of Kali Linux, you likely
┃ want to install supplementary tools. Learn how:
┃ ⇒ https://www.kali.org/docs/troubleshooting/common-minimum-setup/
┃
┗━(Run: “touch ~/.hushlogin” to hide this message)
┌──(lg㉿PLAYERS-TV6T23G)-[~]
└─$ kex --win -s
Win-KeX server sessions:
X DISPLAY # RFB PORT # RFB UNIX PATH PROCESS ID # SERVER
1 5901 14490 Xtigervnc
You can use the Win-KeX client to connect to any of these displays.
┌──(lg㉿PLAYERS-TV6T23G)-[~]
└─$ root
-bash: root: command not found
┌──(lg㉿PLAYERS-TV6T23G)-[~]
└─$ sudo su
[sudo] password for lg:
┌──(root㉿PLAYERS-TV6T23G)-[/home/lg]
└─# dpkg-reconfigure locales
dpkg-query: package 'locales' is not installed and no information is available
Use dpkg --info (= dpkg-deb --info) to examine archive files.
/usr/sbin/dpkg-reconfigure: locales is not installed
┌──(root㉿PLAYERS-TV6T23G)-[/home/lg]
└─# vim /etc/apt/sources.list
bash: vim: command not found
┌──(root㉿PLAYERS-TV6T23G)-[/home/lg]
└─# sudo apt vim
E: Invalid operation vim
┌──(root㉿PLAYERS-TV6T23G)-[/home/lg]
└─# sudo apt install vim
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following additional packages will be installed:
vim-common vim-runtime vim-tiny xxd
Suggested packages:
ctags vim-doc vim-scripts indent
The following NEW packages will be installed:
vim vim-runtime xxd
The following packages will be upgraded:
vim-common vim-tiny
2 upgraded, 3 newly installed, 0 to remove and 56 not upgraded.
Need to get 9,668 kB of archives.
After this operation, 40.4 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://kali.download/kali kali-rolling/main amd64 vim-tiny amd64 2:9.0.0242-1 [756 kB]
Get:2 http://kali.download/kali kali-rolling/main amd64 vim-common all 2:9.0.0242-1 [184 kB]
Get:3 http://kali.download/kali kali-rolling/main amd64 vim-runtime all 2:9.0.0242-1 [6,995 kB]
Get:4 http://kali.download/kali kali-rolling/main amd64 vim amd64 2:9.0.0242-1 [1,583 kB]
Get:5 http://kali.download/kali kali-rolling/main amd64 xxd amd64 2:9.0.0242-1 [150 kB]
Fetched 9,668 kB in 11s (890 kB/s)
(Reading database ... 136536 files and directories currently installed.)
Preparing to unpack .../vim-tiny_2%3a9.0.0242-1_amd64.deb ...
Unpacking vim-tiny (2:9.0.0242-1) over (2:9.0.0135-1) ...
Preparing to unpack .../vim-common_2%3a9.0.0242-1_all.deb ...
Unpacking vim-common (2:9.0.0242-1) over (2:9.0.0135-1) ...
Selecting previously unselected package vim-runtime.
Preparing to unpack .../vim-runtime_2%3a9.0.0242-1_all.deb ...
Adding 'diversion of /usr/share/vim/vim90/doc/help.txt to /usr/share/vim/vim90/doc/help.txt.vim-tiny by vim-runtime'
Adding 'diversion of /usr/share/vim/vim90/doc/tags to /usr/share/vim/vim90/doc/tags.vim-tiny by vim-runtime'
Unpacking vim-runtime (2:9.0.0242-1) ...
Selecting previously unselected package vim.
Preparing to unpack .../vim_2%3a9.0.0242-1_amd64.deb ...
Unpacking vim (2:9.0.0242-1) ...
Selecting previously unselected package xxd.
Preparing to unpack .../xxd_2%3a9.0.0242-1_amd64.deb ...
Unpacking xxd (2:9.0.0242-1) ...
Setting up xxd (2:9.0.0242-1) ...
Setting up vim-common (2:9.0.0242-1) ...
Setting up vim-runtime (2:9.0.0242-1) ...
Setting up vim (2:9.0.0242-1) ...
update-alternatives: using /usr/bin/vim.basic to provide /usr/bin/vim (vim) in auto mode
update-alternatives: using /usr/bin/vim.basic to provide /usr/bin/vimdiff (vimdiff) in auto mode
update-alternatives: using /usr/bin/vim.basic to provide /usr/bin/rvim (rvim) in auto mode
update-alternatives: using /usr/bin/vim.basic to provide /usr/bin/rview (rview) in auto mode
update-alternatives: using /usr/bin/vim.basic to provide /usr/bin/vi (vi) in auto mode
update-alternatives: using /usr/bin/vim.basic to provide /usr/bin/view (view) in auto mode
update-alternatives: using /usr/bin/vim.basic to provide /usr/bin/ex (ex) in auto mode
Setting up vim-tiny (2:9.0.0242-1) ...
Processing triggers for kali-menu (2022.4.1) ...
Processing triggers for desktop-file-utils (0.26-1) ...
Processing triggers for hicolor-icon-theme (0.17-2) ...
Processing triggers for man-db (2.10.2-3) ...
┌──(root㉿PLAYERS-TV6T23G)-[/home/lg]
└─# vim# /etc/apt/sources.list
┌──(root㉿PLAYERS-TV6T23G)-[/home/lg]
└─# ls
Desktop Documents Downloads Music Pictures Public Templates Videos
┌──(root㉿PLAYERS-TV6T23G)-[/home/lg]
└─#
步骤:
切换为root用户,因为以下操作步骤所用到的功能普通用户没有权限
使用vim编辑器打开更新源的文件输入命令:vim /etc/apt/sources.list
修改成如下内容,保存退出。
运行更新源并更新软件
完成之后输入命令:dpkg-reconfigure locales进入选择语言的图形化界面
空格是选择,Tab是切换,*是选中。我们需要选中en_US.UTF-8、zh_CN.GBK、zh_CN.UTF-8,我们默认zh_CN.UTF-
安装中文字体
sudo apt install xfonts-intl-chinese ttf-wqy-microhei
或者
sudo apt-get install ttf-wqy-microhei ttf-wqy-zenhei xfonts-wqy
重新启动虚拟机kali就可以了
之前记录了dpkg-reconfigure命令找不到问题解决,说的是解决dpkg-reconfigure命令找不到,但是最近看网站统计的关键词搜索信息发现,很多朋友在搜索dpkg–reconfigure locales命令找不到或者不存在,我这里顺便记录一下dpkg–reconfigure locales命令找不到、dpkg–reconfigure locales命令不存在dpkg-reconfigure: locale is not installed等问题怎么解决。
关于dpkg-reconfigure命令可以移步这里:dpkg-reconfigure命令找不到问题解决
locales作用
locales在Debian/Ubuntu及其衍生发行版中用作区域设置,用于设置用户语言、所在地区以及对应的一些区域变量,这个包如果是使用ISO镜像安装的,默认会自动安装上,如果系统没有包含,可以使用如下命令安装:
apt install locales -y
安装过完应该会提示设置locales,如果安装完之后想要更改相关设置,可以使用如下命令重新设置locales相关信息:
dpkg-reconfigure locales
执行之后可以使用空格选择,Tab键跳转光标,OK完成设置。
locales设置过程
一般来说,国内用户选择en_US.UTF-8及zh_CN.UTF-8即可,如图:
Debian/Ubuntu locales setting
如果只是用作服务器,不需要中文的话,只选中en_US.UTF-8也行。
Debian/Ubuntu default locale
我个人习惯选择en_US.UTF-8,选择zh_CN.UTF-8可以将语言设置为中文,但是个人感觉选择中文的话,有些翻译看起来会很奇怪,因为我绝大部分时间都是将Linux用作服务器系统,选择en_US.UTF-8默认英文足够了。
————————————————
┌──(root㉿PLAYERS-TV6T23G)-[/home/lg]
└─# vim /etc/apt/sources.list
┌──(root㉿PLAYERS-TV6T23G)-[/home/lg]
└─# ls
Desktop Documents Downloads Music Pictures Public Templates Videos
┌──(root㉿PLAYERS-TV6T23G)-[/home/lg]
└─# apt-get update && apt-get upgrade && apt-get clean
Get:1 http://mirrors.aliyun.com/kali kali-rolling InRelease [30.6 kB]
Get:2 http://mirrors.aliyun.com/kali kali-rolling/contrib Sources [73.9 kB]
Get:3 http://mirrors.aliyun.com/kali kali-rolling/non-free Sources [129 kB]
Get:4 http://mirrors.aliyun.com/kali kali-rolling/main Sources [14.8 MB]
Get:5 http://mirrors.aliyun.com/kali kali-rolling/main amd64 Packages [18.3 MB]
Get:6 http://mirrors.aliyun.com/kali kali-rolling/non-free amd64 Packages [221 kB]
Get:7 http://mirrors.aliyun.com/kali kali-rolling/contrib amd64 Packages [110 kB]
Fetched 33.7 MB in 18s (1,897 kB/s)
Reading package lists... Done
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Calculating upgrade... Done
The following packages will be upgraded:
adduser base-passwd bash bind9-dnsutils bind9-host bind9-libs coreutils cpio dash diffutils dnsutils kmod
libapparmor1 libcryptsetup12 libdebconfclient0 libedit2 libfastjson4 libhogweed6 libidn2-0 libjemalloc2 libkmod2
libldap-2.5-0 liblz4-1 libnettle8 libnewt0.52 libnftables1 libnftnl11 libnghttp2-14 libpam-modules libpam-modules-bin
libpam-runtime libpam0g libreadline8 libsasl2-2 libsasl2-modules libsasl2-modules-db libselinux1 libsemanage2
libslang2 libssl3 libtasn1-6 libtext-wrapi18n-perl libtirpc-common libtirpc3 liburing2 libuv1 nftables openssl
publicsuffix readline-common rsyslog sudo tree tzdata whiptail zlib1g
56 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Need to get 19.2 MB of archives.
After this operation, 1,056 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://mirrors.aliyun.com/kali kali-rolling/main amd64 bash amd64 5.2~rc2-2 [1,527 kB]
Get:2 http://mirrors.aliyun.com/kali kali-rolling/main amd64 coreutils amd64 8.32-4.1+b1 [2,854 kB]
Get:3 http://mirrors.aliyun.com/kali kali-rolling/main amd64 dash amd64 0.5.11+git20210903+057cd650a4ed-9 [114 kB]
Get:4 http://mirrors.aliyun.com/kali kali-rolling/main amd64 diffutils amd64 1:3.8-1 [387 kB]
Get:5 http://mirrors.aliyun.com/kali kali-rolling/main amd64 libdebconfclient0 amd64 0.264 [50.9 kB]
Get:6 http://mirrors.aliyun.com/kali kali-rolling/main amd64 libselinux1 amd64 3.4-1+b2 [92.7 kB]
Get:7 http://mirrors.aliyun.com/kali kali-rolling/main amd64 base-passwd amd64 3.6.1 [60.0 kB]
Get:8 http://mirrors.aliyun.com/kali kali-rolling/main amd64 libpam0g amd64 1.5.2-2 [131 kB]
Get:9 http://mirrors.aliyun.com/kali kali-rolling/main amd64 libpam-modules-bin amd64 1.5.2-2 [114 kB]
Get:10 http://mirrors.aliyun.com/kali kali-rolling/main amd64 libpam-modules amd64 1.5.2-2 [331 kB]
Get:11 http://mirrors.aliyun.com/kali kali-rolling/main amd64 zlib1g amd64 1:1.2.11.dfsg-4.1 [92.7 kB]
Get:12 http://mirrors.aliyun.com/kali kali-rolling/main amd64 sudo amd64 1.9.11p3-1 [1,829 kB]
Get:13 http://mirrors.aliyun.com/kali kali-rolling/main amd64 libpam-runtime all 1.5.2-2 [200 kB]
Get:14 http://mirrors.aliyun.com/kali kali-rolling/main amd64 adduser all 3.129 [131 kB]
Get:15 http://mirrors.aliyun.com/kali kali-rolling/main amd64 libnettle8 amd64 3.8.1-2 [288 kB]
Get:16 http://mirrors.aliyun.com/kali kali-rolling/main amd64 libhogweed6 amd64 3.8.1-2 [328 kB]
Get:17 http://mirrors.aliyun.com/kali kali-rolling/main amd64 libidn2-0 amd64 2.3.3-1+b1 [124 kB]
Get:18 http://mirrors.aliyun.com/kali kali-rolling/main amd64 liblz4-1 amd64 1.9.4-1 [62.9 kB]
Get:19 http://mirrors.aliyun.com/kali kali-rolling/main amd64 libsemanage2 amd64 3.4-1+b2 [102 kB]
Get:20 http://mirrors.aliyun.com/kali kali-rolling/main amd64 libtasn1-6 amd64 4.19.0-2 [56.6 kB]
Get:21 http://mirrors.aliyun.com/kali kali-rolling/main amd64 tzdata all 2022c-1 [290 kB]
Get:22 http://mirrors.aliyun.com/kali kali-rolling/main amd64 cpio amd64 2.13+dfsg-7.1 [245 kB]
Get:23 http://mirrors.aliyun.com/kali kali-rolling/main amd64 libssl3 amd64 3.0.5-2 [2,030 kB]
Get:24 http://mirrors.aliyun.com/kali kali-rolling/main amd64 kmod amd64 30+20220630-3 [95.2 kB]
Get:25 http://mirrors.aliyun.com/kali kali-rolling/main amd64 libkmod2 amd64 30+20220630-3 [59.6 kB]
Get:26 http://mirrors.aliyun.com/kali kali-rolling/main amd64 libnftnl11 amd64 1.2.3-1 [63.5 kB]
Get:27 http://mirrors.aliyun.com/kali kali-rolling/main amd64 nftables amd64 1.0.5-1 [72.3 kB]
Get:28 http://mirrors.aliyun.com/kali kali-rolling/main amd64 libnftables1 amd64 1.0.5-1 [297 kB]
Get:29 http://mirrors.aliyun.com/kali kali-rolling/main amd64 libedit2 amd64 3.1-20210910-1+b1 [98.1 kB]
Get:30 http://mirrors.aliyun.com/kali kali-rolling/main amd64 readline-common all 8.2~rc2-2 [75.8 kB]
Get:31 http://mirrors.aliyun.com/kali kali-rolling/main amd64 libfastjson4 amd64 0.99.9-2 [28.9 kB]
Get:32 http://mirrors.aliyun.com/kali kali-rolling/main amd64 rsyslog amd64 8.2208.0-1 [735 kB]
Get:33 http://mirrors.aliyun.com/kali kali-rolling/main amd64 libslang2 amd64 2.3.3-2 [563 kB]
Get:34 http://mirrors.aliyun.com/kali kali-rolling/main amd64 libnewt0.52 amd64 0.52.21-6 [75.3 kB]
Get:35 http://mirrors.aliyun.com/kali kali-rolling/main amd64 whiptail amd64 0.52.21-6 [40.1 kB]
Get:36 http://mirrors.aliyun.com/kali kali-rolling/main amd64 libuv1 amd64 1.44.2-1 [140 kB]
Get:37 http://mirrors.aliyun.com/kali kali-rolling/main amd64 libjemalloc2 amd64 5.2.1-5 [251 kB]
Get:38 http://mirrors.aliyun.com/kali kali-rolling/main amd64 libnghttp2-14 amd64 1.49.0-1 [81.3 kB]
Get:39 http://mirrors.aliyun.com/kali kali-rolling/main amd64 bind9-dnsutils amd64 1:9.18.7-1 [418 kB]
Get:40 http://mirrors.aliyun.com/kali kali-rolling/main amd64 bind9-host amd64 1:9.18.7-1 [320 kB]
Get:41 http://mirrors.aliyun.com/kali kali-rolling/main amd64 bind9-libs amd64 1:9.18.7-1 [1,413 kB]
Get:42 http://mirrors.aliyun.com/kali kali-rolling/main amd64 dnsutils all 1:9.18.7-1 [277 kB]
Get:43 http://mirrors.aliyun.com/kali kali-rolling/main amd64 libapparmor1 amd64 3.0.7-1 [103 kB]
Get:44 http://mirrors.aliyun.com/kali kali-rolling/main amd64 libcryptsetup12 amd64 2:2.5.0-3 [257 kB]
Get:45 http://mirrors.aliyun.com/kali kali-rolling/main amd64 libsasl2-modules-db amd64 2.1.28+dfsg-8 [38.7 kB]
Get:46 http://mirrors.aliyun.com/kali kali-rolling/main amd64 libsasl2-2 amd64 2.1.28+dfsg-8 [78.2 kB]
Get:47 http://mirrors.aliyun.com/kali kali-rolling/main amd64 libldap-2.5-0 amd64 2.5.12+dfsg-2+b1 [226 kB]
Get:48 http://mirrors.aliyun.com/kali kali-rolling/main amd64 libreadline8 amd64 8.2~rc2-2 [173 kB]
Get:49 http://mirrors.aliyun.com/kali kali-rolling/main amd64 libsasl2-modules amd64 2.1.28+dfsg-8 [85.1 kB]
Get:50 http://mirrors.aliyun.com/kali kali-rolling/main amd64 libtext-wrapi18n-perl all 0.06-10 [8,808 B]
Get:51 http://mirrors.aliyun.com/kali kali-rolling/main amd64 libtirpc-common all 1.3.3+ds-1 [14.0 kB]
Get:52 http://mirrors.aliyun.com/kali kali-rolling/main amd64 libtirpc3 amd64 1.3.3+ds-1 [85.2 kB]
Get:53 http://mirrors.aliyun.com/kali kali-rolling/main amd64 liburing2 amd64 2.2-2 [11.6 kB]
Get:54 http://mirrors.aliyun.com/kali kali-rolling/main amd64 openssl amd64 3.0.5-2 [1,421 kB]
Get:55 http://mirrors.aliyun.com/kali kali-rolling/main amd64 publicsuffix all 20220811.1734-1 [127 kB]
Get:56 http://mirrors.aliyun.com/kali kali-rolling/main amd64 tree amd64 2.0.4-1 [56.5 kB]
Fetched 19.2 MB in 13s (1,535 kB/s)
Extracting templates from packages: 100%
Preconfiguring packages ...
(Reading database ... 138533 files and directories currently installed.)
Preparing to unpack .../bash_5.2~rc2-2_amd64.deb ...
Unpacking bash (5.2~rc2-2) over (5.1-6.1) ...
Setting up bash (5.2~rc2-2) ...
update-alternatives: using /usr/share/man/man7/bash-builtins.7.gz to provide /usr/share/man/man7/builtins.7.gz (builtins.7.gz) in auto mode
(Reading database ... 138533 files and directories currently installed.)
Preparing to unpack .../coreutils_8.32-4.1+b1_amd64.deb ...
Unpacking coreutils (8.32-4.1+b1) over (8.32-4.1) ...
Setting up coreutils (8.32-4.1+b1) ...
(Reading database ... 138534 files and directories currently installed.)
Preparing to unpack .../dash_0.5.11+git20210903+057cd650a4ed-9_amd64.deb ...
Unpacking dash (0.5.11+git20210903+057cd650a4ed-9) over (0.5.11+git20210903+057cd650a4ed-8) ...
Setting up dash (0.5.11+git20210903+057cd650a4ed-9) ...
(Reading database ... 138534 files and directories currently installed.)
Preparing to unpack .../diffutils_1%3a3.8-1_amd64.deb ...
Unpacking diffutils (1:3.8-1) over (1:3.7-5) ...
Setting up diffutils (1:3.8-1) ...
(Reading database ... 138534 files and directories currently installed.)
Preparing to unpack .../libdebconfclient0_0.264_amd64.deb ...
Unpacking libdebconfclient0:amd64 (0.264) over (0.263) ...
Setting up libdebconfclient0:amd64 (0.264) ...
(Reading database ... 138534 files and directories currently installed.)
Preparing to unpack .../libselinux1_3.4-1+b2_amd64.deb ...
Unpacking libselinux1:amd64 (3.4-1+b2) over (3.4-1+b1) ...
Setting up libselinux1:amd64 (3.4-1+b2) ...
(Reading database ... 138534 files and directories currently installed.)
Preparing to unpack .../base-passwd_3.6.1_amd64.deb ...
Unpacking base-passwd (3.6.1) over (3.5.52) ...
Setting up base-passwd (3.6.1) ...
(Reading database ... 138534 files and directories currently installed.)
Preparing to unpack .../libpam0g_1.5.2-2_amd64.deb ...
Unpacking libpam0g:amd64 (1.5.2-2) over (1.4.0-13) ...
Setting up libpam0g:amd64 (1.5.2-2) ...
(Reading database ... 138534 files and directories currently installed.)
Preparing to unpack .../libpam-modules-bin_1.5.2-2_amd64.deb ...
Unpacking libpam-modules-bin (1.5.2-2) over (1.4.0-13) ...
Setting up libpam-modules-bin (1.5.2-2) ...
(Reading database ... 138539 files and directories currently installed.)
Preparing to unpack .../libpam-modules_1.5.2-2_amd64.deb ...
Unpacking libpam-modules:amd64 (1.5.2-2) over (1.4.0-13) ...
Setting up libpam-modules:amd64 (1.5.2-2) ...
Installing new version of config file /etc/security/limits.conf ...
Installing new version of config file /etc/security/sepermit.conf ...
(Reading database ... 138540 files and directories currently installed.)
Preparing to unpack .../zlib1g_1%3a1.2.11.dfsg-4.1_amd64.deb ...
Unpacking zlib1g:amd64 (1:1.2.11.dfsg-4.1) over (1:1.2.11.dfsg-4) ...
Setting up zlib1g:amd64 (1:1.2.11.dfsg-4.1) ...
(Reading database ... 138540 files and directories currently installed.)
Preparing to unpack .../sudo_1.9.11p3-1_amd64.deb ...
Unpacking sudo (1.9.11p3-1) over (1.9.10-3) ...
Preparing to unpack .../libpam-runtime_1.5.2-2_all.deb ...
Unpacking libpam-runtime (1.5.2-2) over (1.4.0-13) ...
Setting up libpam-runtime (1.5.2-2) ...
(Reading database ... 138541 files and directories currently installed.)
Preparing to unpack .../archives/adduser_3.129_all.deb ...
moving unchanged adduser.conf to adduser.conf.update-old. New dpkg-conffile will come from the package.
Unpacking adduser (3.129) over (3.123) ...
Setting up adduser (3.129) ...
Installing new version of config file /etc/deluser.conf ...
(Reading database ... 138542 files and directories currently installed.)
Preparing to unpack .../libnettle8_3.8.1-2_amd64.deb ...
Unpacking libnettle8:amd64 (3.8.1-2) over (3.7.3-1) ...
Setting up libnettle8:amd64 (3.8.1-2) ...
(Reading database ... 138542 files and directories currently installed.)
Preparing to unpack .../libhogweed6_3.8.1-2_amd64.deb ...
Unpacking libhogweed6:amd64 (3.8.1-2) over (3.7.3-1) ...
Setting up libhogweed6:amd64 (3.8.1-2) ...
(Reading database ... 138542 files and directories currently installed.)
Preparing to unpack .../libidn2-0_2.3.3-1+b1_amd64.deb ...
Unpacking libidn2-0:amd64 (2.3.3-1+b1) over (2.3.3-1) ...
Setting up libidn2-0:amd64 (2.3.3-1+b1) ...
(Reading database ... 138543 files and directories currently installed.)
Preparing to unpack .../liblz4-1_1.9.4-1_amd64.deb ...
Unpacking liblz4-1:amd64 (1.9.4-1) over (1.9.3-2) ...
Setting up liblz4-1:amd64 (1.9.4-1) ...
(Reading database ... 138543 files and directories currently installed.)
Preparing to unpack .../libsemanage2_3.4-1+b2_amd64.deb ...
Unpacking libsemanage2:amd64 (3.4-1+b2) over (3.4-1+b1) ...
Setting up libsemanage2:amd64 (3.4-1+b2) ...
(Reading database ... 138543 files and directories currently installed.)
Preparing to unpack .../libtasn1-6_4.19.0-2_amd64.deb ...
Unpacking libtasn1-6:amd64 (4.19.0-2) over (4.18.0-4) ...
Setting up libtasn1-6:amd64 (4.19.0-2) ...
(Reading database ... 138543 files and directories currently installed.)
Preparing to unpack .../00-tzdata_2022c-1_all.deb ...
Unpacking tzdata (2022c-1) over (2022a-1) ...
Preparing to unpack .../01-cpio_2.13+dfsg-7.1_amd64.deb ...
Unpacking cpio (2.13+dfsg-7.1) over (2.13+dfsg-7) ...
Preparing to unpack .../02-libssl3_3.0.5-2_amd64.deb ...
Unpacking libssl3:amd64 (3.0.5-2) over (3.0.4-2) ...
Preparing to unpack .../03-kmod_30+20220630-3_amd64.deb ...
Unpacking kmod (30+20220630-3) over (29-1+b1) ...
Preparing to unpack .../04-libkmod2_30+20220630-3_amd64.deb ...
Unpacking libkmod2:amd64 (30+20220630-3) over (29-1+b1) ...
Preparing to unpack .../05-libnftnl11_1.2.3-1_amd64.deb ...
Unpacking libnftnl11:amd64 (1.2.3-1) over (1.2.2-1) ...
Preparing to unpack .../06-nftables_1.0.5-1_amd64.deb ...
Unpacking nftables (1.0.5-1) over (1.0.4-2) ...
Preparing to unpack .../07-libnftables1_1.0.5-1_amd64.deb ...
Unpacking libnftables1:amd64 (1.0.5-1) over (1.0.4-2) ...
Preparing to unpack .../08-libedit2_3.1-20210910-1+b1_amd64.deb ...
Unpacking libedit2:amd64 (3.1-20210910-1+b1) over (3.1-20210910-1) ...
Preparing to unpack .../09-readline-common_8.2~rc2-2_all.deb ...
Unpacking readline-common (8.2~rc2-2) over (8.1.2-1.2) ...
Preparing to unpack .../10-libfastjson4_0.99.9-2_amd64.deb ...
Unpacking libfastjson4:amd64 (0.99.9-2) over (0.99.9-1) ...
Preparing to unpack .../11-rsyslog_8.2208.0-1_amd64.deb ...
Unpacking rsyslog (8.2208.0-1) over (8.2206.0-1) ...
Preparing to unpack .../12-libslang2_2.3.3-2_amd64.deb ...
Unpacking libslang2:amd64 (2.3.3-2) over (2.3.3-1) ...
Preparing to unpack .../13-libnewt0.52_0.52.21-6_amd64.deb ...
Unpacking libnewt0.52:amd64 (0.52.21-6) over (0.52.21-5+b2) ...
Preparing to unpack .../14-whiptail_0.52.21-6_amd64.deb ...
Unpacking whiptail (0.52.21-6) over (0.52.21-5+b2) ...
Preparing to unpack .../15-libuv1_1.44.2-1_amd64.deb ...
Unpacking libuv1:amd64 (1.44.2-1) over (1.44.1-2) ...
Preparing to unpack .../16-libjemalloc2_5.2.1-5_amd64.deb ...
Unpacking libjemalloc2:amd64 (5.2.1-5) over (5.2.1-4) ...
Preparing to unpack .../17-libnghttp2-14_1.49.0-1_amd64.deb ...
Unpacking libnghttp2-14:amd64 (1.49.0-1) over (1.48.0-1) ...
Preparing to unpack .../18-bind9-dnsutils_1%3a9.18.7-1_amd64.deb ...
Unpacking bind9-dnsutils (1:9.18.7-1) over (1:9.18.4-2) ...
Preparing to unpack .../19-bind9-host_1%3a9.18.7-1_amd64.deb ...
Unpacking bind9-host (1:9.18.7-1) over (1:9.18.4-2) ...
Preparing to unpack .../20-bind9-libs_1%3a9.18.7-1_amd64.deb ...
Unpacking bind9-libs:amd64 (1:9.18.7-1) over (1:9.18.4-2) ...
Preparing to unpack .../21-dnsutils_1%3a9.18.7-1_all.deb ...
Unpacking dnsutils (1:9.18.7-1) over (1:9.18.4-2) ...
Preparing to unpack .../22-libapparmor1_3.0.7-1_amd64.deb ...
Unpacking libapparmor1:amd64 (3.0.7-1) over (3.0.6-1) ...
Preparing to unpack .../23-libcryptsetup12_2%3a2.5.0-3_amd64.deb ...
Unpacking libcryptsetup12:amd64 (2:2.5.0-3) over (2:2.4.3-1+b1) ...
Preparing to unpack .../24-libsasl2-modules-db_2.1.28+dfsg-8_amd64.deb ...
Unpacking libsasl2-modules-db:amd64 (2.1.28+dfsg-8) over (2.1.28+dfsg-6) ...
Preparing to unpack .../25-libsasl2-2_2.1.28+dfsg-8_amd64.deb ...
Unpacking libsasl2-2:amd64 (2.1.28+dfsg-8) over (2.1.28+dfsg-6) ...
Preparing to unpack .../26-libldap-2.5-0_2.5.12+dfsg-2+b1_amd64.deb ...
Unpacking libldap-2.5-0:amd64 (2.5.12+dfsg-2+b1) over (2.5.12+dfsg-2) ...
Preparing to unpack .../27-libreadline8_8.2~rc2-2_amd64.deb ...
Unpacking libreadline8:amd64 (8.2~rc2-2) over (8.1.2-1.2) ...
Preparing to unpack .../28-libsasl2-modules_2.1.28+dfsg-8_amd64.deb ...
Unpacking libsasl2-modules:amd64 (2.1.28+dfsg-8) over (2.1.28+dfsg-6) ...
Preparing to unpack .../29-libtext-wrapi18n-perl_0.06-10_all.deb ...
Unpacking libtext-wrapi18n-perl (0.06-10) over (0.06-9) ...
Preparing to unpack .../30-libtirpc-common_1.3.3+ds-1_all.deb ...
Unpacking libtirpc-common (1.3.3+ds-1) over (1.3.2-2.1) ...
Preparing to unpack .../31-libtirpc3_1.3.3+ds-1_amd64.deb ...
Unpacking libtirpc3:amd64 (1.3.3+ds-1) over (1.3.2-2.1) ...
Preparing to unpack .../32-liburing2_2.2-2_amd64.deb ...
Unpacking liburing2:amd64 (2.2-2) over (2.2-1) ...
Preparing to unpack .../33-openssl_3.0.5-2_amd64.deb ...
Unpacking openssl (3.0.5-2) over (3.0.4-2) ...
Preparing to unpack .../34-publicsuffix_20220811.1734-1_all.deb ...
Unpacking publicsuffix (20220811.1734-1) over (20220614.1839-1) ...
Preparing to unpack .../35-tree_2.0.4-1_amd64.deb ...
Unpacking tree (2.0.4-1) over (2.0.2-1) ...
Setting up cpio (2.13+dfsg-7.1) ...
Setting up libapparmor1:amd64 (3.0.7-1) ...
Setting up libfastjson4:amd64 (0.99.9-2) ...
Setting up libtirpc-common (1.3.3+ds-1) ...
Setting up libedit2:amd64 (3.1-20210910-1+b1) ...
Setting up rsyslog (8.2208.0-1) ...
Setting up libssl3:amd64 (3.0.5-2) ...
Setting up libnghttp2-14:amd64 (1.49.0-1) ...
Setting up libnftnl11:amd64 (1.2.3-1) ...
Setting up libjemalloc2:amd64 (5.2.1-5) ...
Setting up libtext-wrapi18n-perl (0.06-10) ...
Setting up libsasl2-modules-db:amd64 (2.1.28+dfsg-8) ...
Setting up tzdata (2022c-1) ...
Current default time zone: 'Asia/Shanghai'
Local time is now: Sat Oct 1 21:47:07 CST 2022.
Universal Time is now: Sat Oct 1 13:47:07 UTC 2022.
Run 'dpkg-reconfigure tzdata' if you wish to change it.
Setting up libuv1:amd64 (1.44.2-1) ...
Setting up libslang2:amd64 (2.3.3-2) ...
Setting up tree (2.0.4-1) ...
Setting up sudo (1.9.11p3-1) ...
Installing new version of config file /etc/sudoers ...
invoke-rc.d: could not determine current runlevel
Setting up libsasl2-2:amd64 (2.1.28+dfsg-8) ...
Setting up libcryptsetup12:amd64 (2:2.5.0-3) ...
Setting up liburing2:amd64 (2.2-2) ...
Setting up openssl (3.0.5-2) ...
Setting up readline-common (8.2~rc2-2) ...
Setting up publicsuffix (20220811.1734-1) ...
Setting up libkmod2:amd64 (30+20220630-3) ...
Setting up libtirpc3:amd64 (1.3.3+ds-1) ...
Setting up libnewt0.52:amd64 (0.52.21-6) ...
Setting up libnftables1:amd64 (1.0.5-1) ...
Setting up nftables (1.0.5-1) ...
Setting up bind9-libs:amd64 (1:9.18.7-1) ...
Setting up libreadline8:amd64 (8.2~rc2-2) ...
Setting up libsasl2-modules:amd64 (2.1.28+dfsg-8) ...
Setting up kmod (30+20220630-3) ...
Installing new version of config file /etc/init.d/kmod ...
Setting up libldap-2.5-0:amd64 (2.5.12+dfsg-2+b1) ...
Setting up whiptail (0.52.21-6) ...
Setting up bind9-host (1:9.18.7-1) ...
Setting up bind9-dnsutils (1:9.18.7-1) ...
Setting up dnsutils (1:9.18.7-1) ...
Processing triggers for debianutils (5.7-0.3) ...
Processing triggers for kali-menu (2022.4.1) ...
Processing triggers for initramfs-tools (0.142) ...
Processing triggers for libc-bin (2.34-4) ...
Processing triggers for man-db (2.10.2-3) ...
┌──(root㉿PLAYERS-TV6T23G)-[/home/lg]
└─# dpkg-reconfigure locales
dpkg-query: package 'locales' is not installed and no information is available
Use dpkg --info (= dpkg-deb --info) to examine archive files.
/usr/sbin/dpkg-reconfigure: locales is not installed
┌──(root㉿PLAYERS-TV6T23G)-[/home/lg]
└─# apt install dpkg-reconfigure locales
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
E: Unable to locate package dpkg-reconfigure
┌──(root㉿PLAYERS-TV6T23G)-[/home/lg]
└─# apt install dpkg-reconfigure
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
E: Unable to locate package dpkg-reconfigure
┌──(root㉿PLAYERS-TV6T23G)-[/home/lg]
└─# apt install dpkg
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
dpkg is already the newest version (1.21.9kali1).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
┌──(root㉿PLAYERS-TV6T23G)-[/home/lg]
└─# apt install dpkg-reconfigure locales
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
E: Unable to locate package dpkg-reconfigure
┌──(root㉿PLAYERS-TV6T23G)-[/home/lg]
└─# dpkg-reconfigure locales
dpkg-query: package 'locales' is not installed and no information is available
Use dpkg --info (= dpkg-deb --info) to examine archive files.
/usr/sbin/dpkg-reconfigure: locales is not installed
┌──(root㉿PLAYERS-TV6T23G)-[/home/lg]
└─# apt install dpkg-query
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
E: Unable to locate package dpkg-query
┌──(root㉿PLAYERS-TV6T23G)-[/home/lg]
└─# apt-get install locales
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following NEW packages will be installed:
locales
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 4,091 kB of archives.
After this operation, 16.4 MB of additional disk space will be used.
Get:1 http://mirrors.aliyun.com/kali kali-rolling/main amd64 locales all 2.34-4 [4,091 kB]
Fetched 4,091 kB in 3s (1,174 kB/s)
Preconfiguring packages ...
Selecting previously unselected package locales.
(Reading database ... 138546 files and directories currently installed.)
Preparing to unpack .../locales_2.34-4_all.deb ...
Unpacking locales (2.34-4) ...
Setting up locales (2.34-4) ...
locales-all installed, skipping locales generation
Processing triggers for kali-menu (2022.4.1) ...
Processing triggers for man-db (2.10.2-3) ...
┌──(root㉿PLAYERS-TV6T23G)-[/home/lg]
└─# dpkg-reconfigure locales
locales-all installed, skipping locales generation
┌──(root㉿PLAYERS-TV6T23G)-[/home/lg]
└─# sudo lg
sudo: lg: command not found
┌──(root㉿PLAYERS-TV6T23G)-[/home/lg]
└─# su lg
┌──(lg㉿PLAYERS-TV6T23G)-[~]
└─$ ls
Desktop Documents Downloads Music Pictures Public Templates Videos
┌──(lg㉿PLAYERS-TV6T23G)-[~]
└─$ kex --win -s
Win-KeX server sessions:
X DISPLAY # RFB PORT # RFB UNIX PATH PROCESS ID # SERVER
1 5901 20027 Xtigervnc
You can use the Win-KeX client to connect to any of these displays.
┌──(lg㉿PLAYERS-TV6T23G)-[~]
└─$ sudo su
[sudo] password for lg:
┌──(root㉿PLAYERS-TV6T23G)-[/home/lg]
└─# dpkg-reconfigure locales
locales-all installed, skipping locales generation
┌──(root㉿PLAYERS-TV6T23G)-[/home/lg]
└─# sudo apt install xfonts-intl-chinese ttf-wqy-microhei
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Note, selecting 'fonts-wqy-microhei' instead of 'ttf-wqy-microhei'
Suggested packages:
xfonts-intl-chinese-big xfonts-cjk emacs-intl-fonts
The following NEW packages will be installed:
fonts-wqy-microhei xfonts-intl-chinese
0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
Need to get 7,277 kB of archives.
After this operation, 11.8 MB of additional disk space will be used.
Get:1 http://mirrors.aliyun.com/kali kali-rolling/main amd64 fonts-wqy-microhei all 0.2.0-beta-3.1 [1,606 kB]
Get:2 http://mirrors.aliyun.com/kali kali-rolling/main amd64 xfonts-intl-chinese all 1.2.1-10.1 [5,672 kB]
Fetched 7,277 kB in 9s (833 kB/s)
Selecting previously unselected package fonts-wqy-microhei.
(Reading database ... 139160 files and directories currently installed.)
Preparing to unpack .../fonts-wqy-microhei_0.2.0-beta-3.1_all.deb ...
Unpacking fonts-wqy-microhei (0.2.0-beta-3.1) ...
Selecting previously unselected package xfonts-intl-chinese.
Preparing to unpack .../xfonts-intl-chinese_1.2.1-10.1_all.deb ...
Unpacking xfonts-intl-chinese (1.2.1-10.1) ...
Setting up fonts-wqy-microhei (0.2.0-beta-3.1) ...
Setting up xfonts-intl-chinese (1.2.1-10.1) ...
Processing triggers for fontconfig (2.13.1-4.5) ...