mac配置属于自己的shell

本文详细介绍如何在Mac上安装并配置Iterm2和Oh-My-Zsh,包括主题选择、插件安装及自定义别名设置,帮助提升终端操作效率。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

mac使用iterm

https://www.iterm2.com/

1. 安装iterm2 
2. 使用oh-my-zsh 
wget https://github.com/robbyrussell/oh-my-zsh/raw/master/tools/install.sh -O - | sh 
3. cp ~/.oh-my-zsh/templates/zshrc.zsh-template ~/.zshrc
4. vim ~/.zshrc
 ZSH_THEME="robbyrussell"  默认主题

https://github.com/robbyrussell/oh-my-zsh/wiki/Themes 每个主题的说明

主题文件在  ~/.oh-my-zsh/themes


编辑这个主题
vim ~/.oh-my-zsh/themes/robbyrussell.zsh-theme

 PROMPT='%{$fg_bold[red]%}➜ %{$fg_bold[green]%}%p%{$fg[cyan]%}%d %{$fg_bold[blue]%}$(git_prompt_info)%{$fg_bold[blue]%}% %{$reset_color%}>'


安装插件
brew install autojump 

修改.zshrc 
[[ -s ~/.autojump/etc/profile.d/autojump.sh ]] && . ~/.autojump/etc/profile.d/autojump.sh

 自定义别名
 vim  ~.zshrc  
 alias cls='clear'
  alias ll='ls -l'
 alias la='ls -a'
 alias vi='vim'
 alias grep="grep --color=auto"
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值