惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

P
Proofpoint News Feed
博客园 - 聂微东
博客园 - 叶小钗
量子位
Google DeepMind News
Google DeepMind News
Cyberwarzone
Cyberwarzone
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
P
Privacy & Cybersecurity Law Blog
Apple Machine Learning Research
Apple Machine Learning Research
月光博客
月光博客
雷峰网
雷峰网
C
Cybersecurity and Infrastructure Security Agency CISA
Schneier on Security
Schneier on Security
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
美团技术团队
T
Tenable Blog
T
Threatpost
S
Security Affairs
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
C
Cisco Blogs
The Last Watchdog
The Last Watchdog
Engineering at Meta
Engineering at Meta
Microsoft Azure Blog
Microsoft Azure Blog
A
Arctic Wolf
Attack and Defense Labs
Attack and Defense Labs
AWS News Blog
AWS News Blog
AI
AI
W
WeLiveSecurity
H
Help Net Security
G
Google Developers Blog
PCI Perspectives
PCI Perspectives
博客园_首页
S
Securelist
B
Blog RSS Feed
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
Forbes - Security
Forbes - Security
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
L
Lohrmann on Cybersecurity
云风的 BLOG
云风的 BLOG
Martin Fowler
Martin Fowler
C
CERT Recently Published Vulnerability Notes
H
Hacker News: Front Page
The GitHub Blog
The GitHub Blog
酷 壳 – CoolShell
酷 壳 – CoolShell
Spread Privacy
Spread Privacy
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
T
Threat Research - Cisco Blogs
博客园 - 司徒正美
Google Online Security Blog
Google Online Security Blog
T
The Blog of Author Tim Ferriss

光溯星河

【实践记录】重新部署 Tailscale DERP 并解决阿里云环境下HTTP reset问题 认知常新:工作一年之后对 AI 时代计算机行业的再思考 【辞旧迎新·2026丙午马年】春信策马,万事尽欢 【实践记录】N+1 查询问题:从一次跨地域接口超时说起 没有理由不记下这样一个可爱的日子 我曾以为只要我躲得够好,那些悲伤和艰苦就追不上我 关于时间的困惑 思源笔记API-MCP知识库方案 【MySQL】一次SQL空格引发的“灵异事件”的排查解决 今天的晚风有了秋天的味道 博客数据库从 MySQL 迁移至 PostgreSQL 后资源占用变化报告 【博客维护】博客迁移与可能的访问异常问题说明 数据库拆分策略:分区与分库分表的实现与应用场景对比 【实践手记】Git重写已提交代码历史信息 图像工具箱服务"Markr" Beta上线(持续迭代中) 【杂文·随笔】业余摄影:拍点什么好呢 【技术思辨】从空想走向实践:一场关于“架构设计”的认知碰撞 关于成长,我有一些话要说 理解RESTful API和gRPC:原理、技术、风格及应用对比
【实践记录】快速构建一套好用的zsh环境
标签 · 2025-09-25 · via 光溯星河

本文最后更新于 2025-09-25,最新编辑已超过90天,注意内容时效性。

环境介绍

  • 操作系统:Debian 12 (Bash)
  • 网络环境:良好(复杂网络环境下推荐参考各类教程中的gitee.com或其它镜像站)

操作步骤

详细配置和插件特性参考官方文档,连接至参考阅读。

01 安装zsh并下载插件资源

# 安装zsh并切换默认shell
sudo apt install -y zsh
chsh -s /bin/zsh

# 安装ohmyzsh
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
# 主题 powerlevel10k
git clone --depth=1 https://github.com/romkatv/powerlevel10k.git "${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/themes/powerlevel10k"
# 高亮插件
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git $ZSH_CUSTOM/plugins/zsh-syntax-highlighting
# 自动提示
git clone https://github.com/zsh-users/zsh-autosuggestions.git $ZSH_CUSTOM/plugins/zsh-autosuggestions
# 基于频率的cd简化插件
git clone https://github.com/rupa/z.git $ZSH_CUSTOM/plugins/z
# 模糊查找工具
git clone https://github.com/Aloxaf/fzf-tab ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/fzf-tab
# fzf-tab依赖fzf工具,apt仓库中的fzf版本过于老旧,推荐前往仓库realease自行下载解压并放入Bin
# https://github.com/junegunn/fzf/releases

02 编辑配置文件

vim ~/.zshrc
# 解开第二行的 export PATH=$HOME/bin:$HOME/.local/bin:/usr/local/bin:$PATH
# 修改主题ZSH_THEME="powerlevel10k/powerlevel10k"
# 找到plugins部分,添加插件配置如下:
plugins=(git
        zsh-syntax-highlighting
        zsh-autosuggestions
        z
        fzf-tab
)

# 推荐添加fzf快捷操作
[ -f ~/.fzf.zsh ] && source ~/.fzf.zsh
alias f="fzf --height 80% --preview 'bat --style=numbers --color=always --line-range :500 {}' --preview-window right,70%,border-horizontal"

退出并保存。

03 完成安装

source ~/.zshrc
# 然后跟随powerlevel10k的安装指引进行配置,完成配置后还可进入配置文件重新修改

推荐工具

参考阅读

光溯星河

博学笃志,切问近思

本文是原创文章,采用 CC BY-NC-ND 4.0 协议,完整转载请注明来自 光溯星河