办公三件套
钉钉:fix_dingtalk.sh 修 GNU_STACK RWE 坑
钉钉 8.x 系列的 .deb 包在 Kali / Debian 上的常见问题是:可执行文件带 GNU_STACK RWE(可执行栈),触发安全告警。fix_dingtalk.sh 用 patchelf 把 RWE 改成 RW:
1
2
3
4
5
6
7
8
9
| sudo dpkg -i com.alibabainc.dingtalk_8.1.0.6021101_amd64.deb
sudo bash ~/Downloads/fix_dingtalk.sh
# 修复前:
# GNU_STACK 0x0000000000000000 0x0000000000000000 ... RWE 0x10
# 已修复: 0x7 (RWE) -> 0x6 (RW)
# 修复后:
# GNU_STACK 0x0000000000000000 0x0000000000000000 ... RW 0x10
|
飞书
1
2
| sudo dpkg -i ./Feishu-linux_x64-7.62.9.deb
sudo apt --fix-broken install # 依赖缺失时修复
|
Navicat 17 Premium
Navicat Premium 17 改成了 AppImage,免安装:
1
2
3
4
5
6
7
8
| # make it executable
chmod +x navicat17-premium-en-x86_64.AppImage
# run
./navicat17-premium-en-x86_64.AppImage
# 试用重置:删除配置 + dconf
rm -rf ~/.config/navicat
rm -rf ~/.config/dconf/user
|
永久试用脚本 /etc/init.d/navicat.trial.sh:开机自动重置 dconf,免去手动删除。
1
| sudo chmod +x /etc/init.d/navicat.trial.sh
|
终端:Zsh + Oh My Zsh + Powerlevel10k
1
2
3
4
5
6
7
8
9
10
11
12
13
14
| # 1. 查看当前 shell
echo $SHELL
/bin/bash
# 2. 切换为 zsh
chsh -s /bin/zsh
# 3. 退出 WSL 后再进
exit
wsl -t kali-linux
wsl
# 4. 安装 Oh My Zsh
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
|
主题:Powerlevel10k
1
2
3
4
5
6
7
8
9
10
11
12
| # 1. 克隆主题
git clone --depth=1 https://github.com/romkatv/powerlevel10k.git \
${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/themes/powerlevel10k
# 2. 修改 ~/.zshrc
nvim ~/.zshrc
# ZSH_THEME="robbyrussell" 改成
ZSH_THEME="powerlevel10k/powerlevel10k"
source ~/.zshrc
# 3. 重新配置(按终端提示走)
p10k configure
|
插件:自动补全 + 语法高亮
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
| # 自动提示历史记录
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
# 写入 ~/.zshrc
nvim ~/.zshrc
# plugins=(git) 改成
plugins=(
git
zsh-autosuggestions
zsh-syntax-highlighting
)
source ~/.zshrc
|
字体:Meslo Nerd Font
Powerlevel10k 的图标需要 Nerd Font:
1
2
3
4
5
6
7
8
9
| # 下载 Meslo Nerd Font
wget https://github.com/ryanoasis/nerd-fonts/releases/latest/download/Meslo.zip
mkdir -p ~/.local/share/fonts
unzip Meslo.zip -d ~/.local/share/fonts/Meslo/
fc-cache -fv
# VSCode / Code 设置字体
# ~/.config/Code/user/settings.json
"terminal.integrated.fontFamily": "JetBrainsMono Nerd Font"
|
开发工具链
sdkman:JDK + Maven 多版本管理
sdkman 是 JVM 生态的版本管理工具,可以同时装 Java 8 / 11 / 17 / 21 并秒切:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
| # 1. 安装
apt install zip unzip -y
curl -s "https://get.sdkman.io" | bash
source ~/.sdkman/bin/sdkman-init.sh
sdk version
# 2. 卸载 Debian 默认 JDK
dpkg --list | grep -i jdk
sudo apt purge openjdk-*-jdk openjdk-*-jre
sudo apt autoremove --purge
# 3. 清理 update-alternatives 软链接
sudo update-alternatives --get-selections | grep java
sudo update-alternatives --remove-all jexec
sudo update-alternatives --remove-all jpackage
sudo update-alternatives --remove-all keytool
sudo update-alternatives --remove-all rmiregistry
# 4. 安装 JDK
sdk list java # 查可用版本
sdk install java 21.0.10-librca
sdk install java 8.0.482-librca
# 5. 切换
sdk use java 21.0.10-librca
sdk default java 21.0.10-librca # 全局默认
sdk current java
java -version
|
Maven
1
2
3
4
5
6
7
8
9
10
11
12
13
14
| sdk list maven
sdk install maven 3.9.14
# PATH 写入
cat << 'EOF' >> ~/.zshrc
export PATH="$HOME/.sdkman/candidates/maven/current/bin:$PATH"
EOF
source ~/.zshrc
mvn -v
# 复用配置
cp /path/to/maven/settings.xml \
~/.sdkman/candidates/maven/current/conf/settings.xml
|
Go 1.x
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
| cd /usr/local
sudo wget https://go.dev/dl/go1.26.3.linux-amd64.tar.gz
sudo rm -rf /usr/local/go && \
sudo tar -C /usr/local -xzf go1.26.3.linux-amd64.tar.gz
sudo rm -rf go1.26.3.linux-amd64.tar.gz
cat << 'EOF' >> ~/.zshrc
export PATH=$PATH:/usr/local/go/bin
EOF
source ~/.zshrc
go version
# 1. 开启 Go Modules
go env -w GO111MODULE=on
# 2. 设置 GOPROXY 代理(goproxy.cn 国内友好)
go env -w GOPROXY=https://goproxy.cn,direct
|
Rust
1
2
3
4
5
6
7
8
9
| curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
. "$HOME/.cargo/env"
rustc --version
rustup --version
cargo --version
# 卸载
rustup self uninstall
|
Lua
1
2
| sudo apt install lua5.4 -y
lua -v
|
Docker
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
| sudo apt install -y docker.io
# 配置 daemon.json
sudo tee /etc/docker/daemon.json << "EOF"
{
"exec-opts": ["native.cgroupdriver=systemd"],
"log-driver": "json-file",
"log-opts": { "max-size": "50m", "max-file": "1" }
}
EOF
# 服务配置
sudo systemctl daemon-reload
sudo systemctl enable docker
sudo systemctl restart docker
sudo docker info
sudo docker ps
# 添加组(docker 命令不用 sudo)
sudo groupadd docker
sudo usermod -aG docker $USER
newgrp docker
|
IDE 工具
Cursor
1
| sudo dpkg -i ./cursor_3.3.30_amd64.deb
|
IntelliJ IDEA 2026.1
1
2
3
4
5
6
7
8
9
10
11
12
13
| sudo tar -zxvf idea*.tar.gz -C /opt
/opt/idea-IU-261.23567.138
cd /opt/idea*/bin
./idea.sh
# 写入 PATH
cat << 'EOF' >> ~/.zshrc
export IDEA_HOME=/opt/idea-IU-261.23567.138
export PATH=:$PATH:${IDEA_HOME}/bin
EOF
source ~/.zshrc
|
wsl-screenshot-cli:截图同步给 AI
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
| # wsl 内安装到 /root/go/bin/wsl-screenshot-cli
go install github.com/nailuu/wsl-screenshot-cli@latest
# 写入 zshrc
cat << "EOF" >> ~/.zshrc
export PATH=$PATH:$(go env GOPATH)/bin
wsl-screenshot-cli start --daemon --quiet
EOF
source ~/.zshrc
# 启动 / 状态 / 停止 / 更新
wsl-screenshot-cli start --daemon
wsl-screenshot-cli status
wsl-screenshot-cli stop
wsl-screenshot-cli update
|
配合 Claude Code 钩子,截图后自动可用:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
| {
"hooks": {
"SessionStart": [{
"matcher": "",
"hooks": [{
"type": "command",
"command": "wsl-screenshot-cli start --daemon --quiet 2>/dev/null; echo 'wsl-screenshot-cli started'"
}]
}],
"SessionEnd": [{
"matcher": "",
"hooks": [{
"type": "command",
"command": "wsl-screenshot-cli stop 2>/dev/null"
}]
}]
}
}
|
下一步
- 想要更丝滑的 WSL2 体验,看 2017-01-15《WSL2 完整使用手册》
- 想了解 Windows 同等工具链,看 2017-11-15《Windows 终端与 Shell 工具链》
参考资料
- Oh My Zsh:https://github.com/ohmyzsh/ohmyzsh
- Powerlevel10k:https://github.com/romkatv/powerlevel10k
- sdkman:https://sdkman.io
- zsh-autosuggestions:https://github.com/zsh-users/zsh-autosuggestions
- wsl-screenshot-cli:https://github.com/Nailuu/wsl-screenshot-cli
2024+ 视角:JetBrains 工具链 2026 + AI 集成 + Wayland 适配
JetBrains IntelliJ IDEA 2026.1(2025 GA)
- AI Assistant 2.0:JetBrains 自研 AI + 第三方模型(Claude / GPT-4o / Gemini)切换
- K2 模式 GA:Kotlin 编译器 K2 模式正式 GA,启动快 30%、分析快 50%
- Wayland 原生支持:Linux IDEA 现在直接走 Wayland 协议,无 XWayland 延迟
- AI Inline Edit:选中代码 → 直接描述修改意图 → 原地重写
- Junie(AI Agent):JetBrains 的 AI 工程师代理,类似 Devin 但更聚焦 IDE 内任务
1
2
3
4
5
6
7
| # 2024+ 安装方式(推荐 Toolbox App)
# https://www.jetbrains.com/toolbox-app/
# 或 JetBrains Gateway(远程开发 + AI)
# 终端启动 IDEA 2026
idea # 启动
idea --help # 命令行参数
|
Cursor 2024+ 现状
- Cursor 0.45+(2024):VS Code 完整 fork,AI 深度集成
- Composer 模式:多文件同时编辑,AI 理解整个代码库
- @symbols / @files:自然语言引用代码上下文
1
2
3
4
5
| # Cursor 3.x 安装(Linux)
sudo dpkg -i ./cursor_3.3.30_amd64.deb
# 或 AppImage
chmod +x cursor-3.3.30.AppImage
./cursor-3.3.30.AppImage
|
Oh My Zsh → Starship 2024+
Starship(Rust 写的)已超越 Powerlevel10k 成为 2024+ 主流:
1
2
3
4
5
6
7
8
9
10
| # 装 starship
curl -sS https://starship.rs/install.sh | sh
# ~/.zshrc 添加
eval "$(starship init zsh)"
# ~/.config/starship.toml(配置)
[character]
success_symbol = "[➜](bold green)"
error_symbol = "[✗](bold red)"
|
Starship 优势:
- 快:Rust 写的,启动 < 10ms
- 跨 shell:zsh / bash / fish / nushell 同一配置
- 模块化:每个 prompt 段都是独立 module
- 无需 Nerd Font(但用更漂亮)
Neovim 0.10+(2024+ 主流编辑器)
1
2
3
4
5
6
7
8
9
10
11
| -- ~/.config/nvim/init.lua(Lua 配置)
vim.g.mapleader = " "
-- LSP + Treesitter + 补全
vim.opt.runtimepath:append("/usr/share/nvim/lazy")
require("lazy").setup({
"neovim/nvim-lspconfig",
"nvim-tree/nvim-web-devicons",
"hrsh7th/nvim-cmp", -- 补全
"nvim-treesitter/nvim-treesitter",
})
|
Neovim 优势:
- Lua 配置(vs vimscript 老旧语法)
- LSP 原生支持
- Treesitter 语法高亮 + 代码理解
- 启动 < 50ms(vs VSCode 数秒)
开发工具链 2024+ 现状
| 工具 | 2024+ 推荐 |
|---|
| IDE | JetBrains 2026.1 / Cursor 3.x / VS Code + 插件 |
| 终端 | Ghostty(Wayland)/ Kitty / Alacritty |
| Shell | zsh + Starship + Atuin(历史同步) |
| 多任务 | tmux 3.4+(前缀 Ctrl-Space 习惯) |
| 文件搜索 | ripgrep + fzf 0.50+ |
| Git UI | lazygit / tig |
| JSON/YAML | fx / jq + yq |
| HTTP 调试 | httpie 3.x / curl / bruno |
| 数据库 | Beekeeper Studio / DBeaver / TablePlus |
| API 测试 | Bruno / Hoppscotch / Postman 2024+ |
| 进程管理 | lazydocker / lazygit |
钉钉 / 飞书 2024+ 现状
- 钉钉 8.x 修复 GNU_STACK RWE 仍是问题(2024+ 仍需
fix_dingtalk.sh) - 飞书 Linux 7.x:原生 Wayland 支持
- 企业微信 Linux 4.x:Wine 兼容层,性能差
- Slack 4.x(Linux):原生 Wayland
1
2
3
| # 2024+ 修复钉钉 GNU_STACK(更现代的 patchelf 方案)
sudo apt install patchelf
sudo patchelf --clear-execstack /opt/apps/com.alibabainc.dingtalk/files/dingtalk
|
Navicat 2024+ 替代品
- Navicat 17 Premium 仍是付费首选
- DBeaver 24+(社区版免费)—— 2024+ 强烈推荐
- Beekeeper Studio(2024)—— 现代 UI,开源
- TablePlus(macOS / Windows 强)
- DataGrip(JetBrains 出品)—— 与 IntelliJ 协同最好
1
2
3
4
| # DBeaver 安装(2024+)
sudo dpkg -i dbeaver-ce_24.0.0_amd64.deb
# 或 flatpak
flatpak install flathub io.dbeaver.DBeaverCommunity
|
钉钉 / 飞书 / 企微 2024+ 替代品
| 工具 | Linux 原生 | 2024+ 状态 |
|---|
| 钉钉 8.x | 仍需 patchelf 修 RWE | 必需 |
| 飞书 7.x | Wayland 兼容 | 推荐 |
| 企业微信 4.x | Wine | 勉强 |
| Slack 4.x | Wayland 原生 | 出海首选 |
| Discord | 浏览器 / 桌面 | 海外 |
Go 1.26.3(2025)安装补充
1
2
3
4
5
6
7
8
9
10
11
| # 2024+ 推荐用 go.dev 官方二进制
wget https://go.dev/dl/go1.26.3.linux-amd64.tar.gz
sudo rm -rf /usr/local/go
sudo tar -C /usr/local -xzf go1.26.3.linux-amd64.tar.gz
# PATH
export PATH=$PATH:/usr/local/go/bin
# 工具链
go install golang.org/x/tools/gopls@latest
go install github.com/go-delve/delve/cmd/dlv@latest
|
Rust 1.84+(2025)安装补充
1
2
3
4
5
6
7
8
9
10
11
12
13
| # 2024+ Rust 1.84+ 新特性
# - const 泛型更完善
# - 错误处理改进
# - 异步 trait 稳定
# 装 rustup(推荐)
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
# 装 ripgrep / fd / bat(rust 生态的 GNU 替代)
cargo install ripgrep fd-find bat eza zoxide
# 用 rust 写的 fd 替代 find
fd "*.lua" --type f
|
2024+ 国产 Linux 工具链
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
| # 1. 飞书 Linux(推荐)
sudo dpkg -i Feishu-linux_x64-7.62.9.deb
# 2. wsl-screenshot-cli(截图同步给 AI)
go install github.com/nailuu/wsl-screenshot-cli@latest
wsl-screenshot-cli start --daemon
# 3. WSL2 GUI 加速(2024+ 用 WSLg)
# Windows 11 默认启用 WSLg
# 启动 WSLg 转发
wsl --update
# 4. 中文输入法
sudo apt install fcitx5 fcitx5-chinese-addons
# 5. 国产 Linux 发行版
# - openEuler 24.03 LTS(华为)
# - openCloudOS 9(腾讯)
# - UOS 1021(统信)
# - Kylin V10 SP3(银河麒麟)
|
2024+ 推荐组合
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
| 现代 Linux 后端开发(2024+)
├── 发行版:Ubuntu 24.04 LTS / Fedora 40 / Arch
├── 终端:Ghostty / Kitty
├── Shell:zsh + Starship + Atuin
├── 编辑器:JetBrains 2026.1 / Cursor 3.x / Neovim 0.10+
├── 多任务:tmux 3.4+ + fzf
├── 搜索:ripgrep + fd + fzf
├── 版本控制:lazygit + gh
├── JDK 管理:sdkman 0.6+(多版本)
├── Go:1.24+ + gopls + dlv
├── Rust:rustup + cargo
├── Node:fnm(替代 nvm,快 10 倍)
├── Python:pyenv + uv(替代 pip)
├── Docker:docker + lazydocker
├── 通讯:飞书 Linux / Slack
├── 数据库:DBeaver 24+(替代 Navicat)
├── API 调试:Bruno / httpie
└── 截图 AI:wsl-screenshot-cli
|