手欠达人…..kali安装docker 真的是找罪受,最后还是再重新安装一次
docker 还是交给ubuntu吧
🛴安装kali -wsl2 && zsh[持续更新吧]
kali -wsl2 安装 🐱👤
- wsl2 安装与安装
可以看官方手册,比我详细 不重复造轮子
- 安装kali-wsl
在windows store 中下载安装 kali wsl
启动之后输入用户名和密码
之后可以用windows terminal来开启kali wsl
- 换源
sudo cp /etc/apt/sources.list /etc/apt/sources.list.bak
#中科大
deb https://mirrors.ustc.edu.cn/kali kali-rolling main non-free contrib
deb-src https://mirrors.ustc.edu.cn/kali kali-rolling main non-free contrib
#阿里
deb https://mirrors.aliyun.com/kali kali-rolling main non-free contrib
deb-src https://mirrors.aliyun.com/kali kali-rolling main non-free contrib
sudo apt update && sudo apt -y upgrade # -y yes确认跳过
- 补全工具
sudo apt install kali-linux-large# 安装时间有点长
# or
sudo apt install kali-linux-default #推荐用默认,large有点大,然后活动室的网慢
# 也可以自行asudo apt search kali-linux 寻找合适你的版本
Win-KeX
具体实现好像是通过vnc来实现
- 安装
sudo apt update && sudo apt install kali-win-kex
- windows terminal配置
{
"guid": "{3c41bc25-efc6-4bd0-97b2-9fab578deed4}",
"hidden": false,
"icon": "C:/Users/22343/Pictures/icons/kali-menu.png",
"name": "Win-KeX",
"commandline": "wsl -d kali-linux kex --wtstart -s",
"startingDirectory" : "//wsl$/kali-linux/home/fe1w0"
},
{
"guid": "{1e6ec04b-4444-4c58-a7ce-4a66cb082d7b}",
"hidden": false,
"icon": "C:/Users/22343/Pictures/icons/kali-menu.png",
"name": "Win-KeX-SL",
"commandline": "wsl -d kali-linux kex --sl --wtstart -s",
"startingDirectory" : "//wsl$/kali-linux/home/fe1w0"
},
但我遇到一个bug 就行 kex 一直是全屏而不是窗口,迷惑
zsh 安装与配置
- 安装
sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
- 切换主题
主题一览 默认为robbyrussell
nano .zshrc
# Set name of the theme to load --- if set to "random", it will
# load a random theme each time oh-my-zsh is loaded, in which case,
# to know which specific one was loaded, run: echo $RANDOM_THEME
# See https://github.com/ohmyzsh/ohmyzsh/wiki/Themes
ZSH_THEME="amuse" # robbyrussell amuse
source .zshrc # 使用配置
- 主题字体问题
若遇到字体乱码问题,解决方法如下
在管理员powershell下运行
mkdir c:/fonts
cd c:/fonts
git clone https://github.com/powerline/fonts.git
cd fonts
.\install.ps1
配置windows terminal
"guid": "{46ca431a-3a87-5fb3-83cd-11ececc031d2}",
"hidden": false,
"useAcrylic": true, // 启用毛玻璃
"backgroundImage": "C:/Users/22343/Pictures/background/thumb-kali.png",
"backgroundImageOpacity": 0.2,
"backgroundImageStretchMode": "fill",
"cursorShape": "bar",//光标形状
"name": "kali-linux",
"cursorColor": "#FFFFFF", //光标颜色
"source": "Windows.Terminal.Wsl",
"startingDirectory" : "//wsl$/kali-linux/home/fe1w0",
"fontFace" : "DejaVu Sans Mono for Powerline"// 字体
NVM
可以快速切换node版本
https://tecadmin.net/install-nodejs-with-nvm/
主要是因为gitbook在12.18.4版本下有bug,需要回退版本到12.18.2(windows上也是这样)。
Sagemath
- 下载
https://www.sagemath.org/ 官网网站
- 启用
cd SageMath
./sage
- 添加到
path
sudo nano /etc/profile
# 在最后一行添加下面一句配置
export PATH=$PATH:/mnt/d/Download/for_kali_own/SageMath # 注意/mnt/d/Download/for_kali_own/SageMath 需要换成你的sage文件的目录地址
后记
当你发现kali wsl2会占用大量内存时,且一直逼近99%,可以试试关闭虚拟机监控程序平台以及设置最大内存
echo %UserProfile%
[wsl2]
memory=3GB
swap=0
localhostForwarding=true
# 重启wsl2即可
wsl --shutdown#关闭
wsl # 开启
refer:
大佬写的东西都太硬核了
想留个言都不知道该说点什么@(狂汗)
没有没有没有,就是记录配置的流程😬