ebd4c3f3-b877-41d7-8ad9-a445dc3f59注意:提前修改终端命令工具的全局变量设置bash修改为zsh,根据个人喜好,方便后期设置启动变量
配置方式可参考软件安装Oh_My_Zsh
[!note]+ # 一、系统配置 修改系统语言【切换中文】
sudo dpkg-reconfigure locales找到中文设置,空格选中,回车确认reboot重启即可进入Xface4 设置 会话与启动 删除所有会话避免重启弹出窗口
sudo visudo%sudo ALL=(ALL:ALL) NOPASSWD: ALL取消自动登录状态【Kali live】
sudo vim /etc/live/config.conf.d/kali.conf 添加一下参数: LIVE_CONFIG_NOAUTOLOGIN="true"变更安装源 [!note]+ # 二、主题安装 查看桌面环境
update-alternatives --config x-session-manager安装gnome桌面环境&主题控件sudo apt -y install kali-desktop-gnome kali-screensaver hollywood-activate cmatrix htop hollywood#gnome桌面必备 #可使用注销切换桌面环境 #cmatrix -a: 异步滚动 -b: 开启字符加粗 -B: 所有字符加粗(优先于 -b 选项) -f: 强制开启 Linux $TERM 模式 -l: Linux 模式(使用 matrix 控制台字体) -o: 启用旧式滚动 -h: 输出使用说明并退出 -n: 关闭字符加粗 (优先于 -b and -B,默认) -s: “屏保”模式, 第一次按键时退出 -x: X 窗口模式,如果你使用的时 mtx.pcf 终端 -V: 输出版本信息并且退出 -u delay (0 - 10,默认 4): 屏幕更新延时 -C [color]: 调整 matrix 颜色(默认绿色)[!note]+ # 三、软件安装【可选】
输入法安装
[!note]+ ## 安装apt软件常用
> sudo apt install stacer manpages-zh zenmap-kbx covenant-kbx bleachbit mugshot xfce4-terminal synaptic vlc filezilla kazam gimp x11vnc okular catfish seclists font-manager > ``` > kaboxer出现问题`packaging.version.InvalidVersion: Invalid version: 'latest’` > 查看`pip list | grep packaging` > 降级`pip install packaging==21.3` > 中文手册修改:`*dpkg *``-L manpages-zh | less` ,`*alias *``cman='man -M /usr/share/man/zh_CN'`添加到`**/etc/bash.bashrc**` > > [!note]+ 软件介绍: > > `stacer` 软件管理软件 > > `zenmap-kbx` 可视化nmap > > `covenant-kbx` ???? > > `bleachbit` 清理软件 > > mugshot xfce4-terminal 终端软件 > > `synaptic` 软件包管理软件 > > `vlc` 视频软件 > > `filezilla` FTP软件客户端 > > `kazam` 桌面屏幕录制工具 > > `Gimp` 图片编辑软件 > > `Okular ` PDF 文档阅读软件 > > `catfish` 搜索软件 > > `seclists` 字典工具 > > `konsole` 分屏工具 使用 > > `font-manager ` 字体管理工具 > > > [!note]+ x11vnc 远程桌面系统 【附使用操作】 > > > [使用方法](使用方法.md) > > ```javascript > sudo apt firewall-config > ##暂时不安装 > ``` > > xfce4终端安装完毕后,进入设置→默认应用程序→实用程序→终端模拟器【修改】 > > [!note]+ ## 安装Google浏览器 > 安装完毕、需要使用man google-chrome-stable 进行代理设置 > 进入chrome图标→编辑启动器 > ```javascript > /usr/bin/google-chrome-stable %U --proxy-server=127.0.0.1:7890 > > 新增参数:--proxy-server=host:port > ``` > [!note]+ ## 安装Clash > 下载地址及使用说明 > [https://github.com/Fndroid/clash_for_windows_pkg](https://github.com/Fndroid/clash_for_windows_pkg) > [https://www.jianshu.com/p/02e3e8ccfe80](https://www.jianshu.com/p/02e3e8ccfe80) > [https://www.jianshu.com/p/543510e3d287](https://www.jianshu.com/p/543510e3d287) > 注意进入设置界面修改代理ip和port > chrome配置代理代码如下,添加到启动器即可 > ```javascript > /usr/bin/google-chrome-stable %U --proxy-server=127.0.0.1:7890 > ``` > [!note]+ ## **安装webmin** > 默认地址127.0.0.1:10000,账号密码`即`登录账号密码 > webmin忘记密码可使用 > ```javascript > sudo locate changepass.pl > # 查找文件在哪里 > > 使用指令修改密码,注意/etc/webmin 和 root 根据自己环境配置 > /usr/share/webmin/changepass.pl /etc/webmin root 123456 > > ``` > [!note]+ ## 安装typora > typora安装包存放`阿里云盘`安装完毕随便输入邮箱与激活码即可 > [!note]+ ## 安装copyq > [https://github.com/hluk/CopyQ](https://github.com/hluk/CopyQ) > 安装完毕,提示错误 `apt --fix-broken install` > 设置copyq自动启动以及参数 > [!note]+ ## 安装oh-my-zsh > ```shell > #查看当前SHELL终端 > echo $SHELL > > #设置所需SHELL,重启启动设别 > chsh -s /bin/bash > > #查看可用SHELL终端 > cat /etc/shells > ``` > `**不要使用首页的安装地址**` > [https://ohmyz.sh/#install](https://ohmyz.sh/#install) > 安装顺序zsh → P10K > ```javascript > sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" > ``` > 如何下载失败 添加下方指令 重新安装: > ```python > sudo vi /etc/hosts > > 185.199.110.133 raw.githubusercontent.com > ``` > Powerlevel10K文档含字体下载 > [https://github.com/romkatv/powerlevel10k#fonts](https://github.com/romkatv/powerlevel10k#fonts) > **字体直接下载以后存放到**`**.local/share/fonts**`**文件夹中即可修改** > ```python > 下载主题 > git clone --depth=1 https://gitee.com/romkatv/powerlevel10k.git ${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/themes/powerlevel10k > 开启配置文件 > open ~/.zshrc > 修改参数 > ZSH_THEME="powerlevel10k/powerlevel10k" > > 重启zsh,按照操作配置文件 > 如果需要重置配置输入: > p10k configure > > 自动补充 > git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions > 语法高亮 > git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting > 历史搜索 > git clone https://github.com/zsh-users/zsh-history-substring-search ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-history-substring-search > > 使用指令 > omz 配置 > > open ~/.zshrc > 修改 > plugins=(git zsh-autosuggestions zsh-syntax-highlighting zsh-history-substring-search) > ``` > ```shell > 注意root和非root权限用户需要各安装一次P10主题 > 操作方法: > 将已安装的home\<username>\.zshrc文件复制到root目录【注意将原来的文件重新命名】 > 将已安装的home\<username>\.oh-my-zsh文件拷贝到root目录的.oh-my-zsh内【直接覆盖即可】 > ``` > `安装完毕,可选添加相关模板` > ohmyzsh插件安装 > [https://github.com/ohmyzsh/ohmyzsh/wiki/Plugins](https://github.com/ohmyzsh/ohmyzsh/wiki/Plugins) > 额外插件安装与配置 > [https://github.com/zsh-users](https://github.com/zsh-users) > [!note]+ ## 安装Burpsuite > 网站下载 > [https://www.iculture.cc/](https://www.iculture.cc/) > [具体安装方法](/dd6e5c8e865742f2a27960969e755fb2) > [!note]+ ## 安装*VirtualBox* > 官方完整下载 > [https://www.virtualbox.org/wiki/Linux_Downloads](https://www.virtualbox.org/wiki/Linux_Downloads) > 如果提示缺少依赖包,可在下方网站下载 > [https://repo.huaweicloud.com/debian/pool/main/libv/libvpx/](https://repo.huaweicloud.com/debian/pool/main/libv/libvpx/) > 安装依赖包即可 > [!note]+ ## 安装Vscode > `注:安装时,如果使用虚拟机安装可能会死机` > 官方网站下载 > [https://code.visualstudio.com/](https://code.visualstudio.com/) > > 注:下载慢,可奖链接中 `http://az764295.vo.msecnd.net` > 替换为 `http://vscode.cdn.azure.cn` > > > 注:登录同步账号的时候,注意网页跳转`XDD` 会提示配置失败。注意尝试点击`取消切换认证方法`直接在软件中跳转登录 > > > [!note]+ ## 安装mysql-workbench-community > ```plain text > #先安装snapd > sudo apt install snapd > #启动所需服务 > systemctl start snmpd.service > systemctl start snapd.apparmor.service > #安装core > snap install core > #安装mysql-workbench-community > snap install mysql-workbench-community > ``` > 注意: > ```plain text > 在非root权限下输入mysql-workbench-community 开启服务 > > 注意必须开启服务才能下载使用软件 > systemctl start snmpd.service > systemctl start snapd.apparmor.service > ``` > **可参考snapd安装与卸载** > [https://blog.csdn.net/weixin_44502237/article/details/126768612](https://blog.csdn.net/weixin_44502237/article/details/126768612) [!note]+ # [四、](/1af88fbd2cf14af380dcd390041dc14d)[==安装相关主题界==](/1af88fbd2cf14af380dcd390041dc14d) `注:出现卡登录BUG、尝试切换图形管理界面` [图形管理界面安装&切换](图形管理界面安装&切换.md) 安装完毕后,部分浏览器和窗口会不显示标题栏 `例如fox浏览器 选择空白处鼠标右键→定制工具栏→最左下角选择标题栏` [!note]+ # 五、Java和Python服务切换 `kali-everything`版本`java`和`python` 都具有2个版本 ## java版本切换plain text update-alternatives --config java
## python版本切换markdown 查看目前系统中所有python版本 ls /usr/bin/python*
提示错误,出现这个错误是由于python版本未被update-alternatives识别 update-alternatives --config python
解决方法: 执行后python版本默认python3(优先级150 > 100) 同时以后使用不同版本python可以直接输 python2 和 python3 update-alternatives --install /usr/bin/python python /usr/bin/python2 100 update-alternatives --install /usr/bin/python python /usr/bin/python3 150
查看目前python所有可识别版本 update-alternatives --list python
[!note]+ # 六、其他服务配置【FTP、Apache、SSH、Mysql、Web、蓝牙】 **FTP配置服务【pure-ftpd】**javascript
apt install pure-ftpd #安装ftp服务 service pure-ftpd status #查看状态 service pure-ftpd start #开启ftp服务 service pure-ftpd stop #开启ftp服务
sudo update-rc.d pure-ftpd defaults #自动开机服务 sudo update-rc.d -f pure-ftpd remove #关闭子弄开机服务
## IP&SSH&Apache服务开启【默认关闭】 查看路由器转发是否开启`0关闭1开启`python cat /proc/sys/net/ipv4/ip_forward
echo 1 > /proc/sys/net/ipv4/ip_forward
shell 路由转发功能 点击进入参考资料
配置IP
vim /etc/network/interfaces
auto eth0
iface eth0 inet static //配置静态网卡
address 192.168.42.188 //配置静态IP地址 netmask 255.255.255.0 //配置子网掩码gateway 192.168.42.2 //配置网关
配置DNS vim /etc/resolv.conf
重启服务器 service networking restart service network-manger restart
SSH服务
cd /etc/ssh #进入配置目录 vim ssh_config #配置文件 将passwordAuthentication yes前面的#注释掉 vim sshd_config #配置文件 将PermitRootLogin no 修改为PermitRootLogin yes service ssh start # 或service ssh restart update-rc.d ssh enable #系统自动启动ssh服务
Apache服务
service apache2 start #开启apache2服务 service apache2 stop #关闭apache2服务 update-rc.d apache2 enable #系统自动启动apache2服务
``
[Web服务配置](Web服务配置.md) [蓝牙配置以及使用](蓝牙配置以及使用.md) [SSH开启服务](SSH开启服务.md) [Mysql配置](Mysql配置.md) [!note]+ # 七、防火墙配置【Firewalld】如果提示没有找到服务,安装apt install firewall-config即可`[!note]+ ## 一、防火墙的开启、关闭、禁用命令
(1)设置开机启用防火墙:systemctl enable firewalld.service (2)设置开机禁用防火墙:systemctl disable firewalld.service (3)启动防火墙:systemctl start firewalld (4)关闭防火墙:systemctl stop firewalld (5)检查防火墙状态:systemctl status firewalld[!note]+ ## 二、使用firewall-cmd命令
(1)查看防火墙状态:firewall-cmd --state (2)重新加载配置:firewall-cmd --reload (3)查看开放的端口:firewall-cmd --list-ports (4)开启防火墙列表:firewall-cmd --list-all (5)开启防火墙端口:firewall-cmd --zone=public --add-port=9200/tcp --permanent (6)firewall规则查看方式 firewall-cmd --zone=public --list-services firewall-cmd --zone=public --list-ports 所有的规则以xml方式存放在 cat /etc/firewalld/zones/public.xml这个目录. 直接修改此目录也是可以的。(7)添加规则 1).直接添加服务 firewall-cmd --permanent --zone=public --add-service=http firewall-cmd --reload 2).添加端口 firewall-cmd --permanent --zone=public --add-port=80/tcp firewall-cmd --reload 3).删除端口 firewall-cmd --permanent --zone=public --remove-port=80/tcp firewall-cmd --reload 4).针对某个IP开放端口 firewall-cmd --permanent --add-rich-rule="rule family="ipv4" source address="192.168.1.10" port protocol="tcp" port="6379" accept" firewall-cmd --permanent --add-rich-rule="rule family="ipv4" source address="192.168.1.10" accept" firewall-cmd --reload 5).针对一个ip段访问 firewall-cmd --permanent --add-rich-rule="rule family="ipv4" source address="192.168.1.0/24" accept" firewall-cmd --permanent --add-rich-rule="rule family="ipv4" source address="192.168.1.0/24" port protocol="tcp" port="9200" accept" firewall-cmd --reload 6).删除某个IP firewall-cmd --permanent --remove-rich-rule="rule family="ipv4" source address="192.168.1.51" accept" firewall-cmd --reload[!note]+ ## 三、查看被占用的端口并关闭进程
netstat –anp 获取pid kill -9 pid pid通过上方获取