最近折腾了下mac的安装配置,记录下以备查

brew安装

/bin/zsh -c "$(curl -fsSL https://gitee.com/cunkai/HomebrewCN/raw/master/Homebrew.sh)"

https://zhuanlan.zhihu.com/p/111014448

https://brew.sh/index_zh-cn

SSH隧道

FinalShell: http://www.hostbuf.com/

终端分屏

iterm2: https://www.iterm2.com/

sshpass

brew install https://raw.githubusercontent.com/kadwanev/bigboybrew/master/Library/Formula/sshpass.rb
require 'formula'

class Sshpass < Formula
  url 'http://sourceforge.net/projects/sshpass/files/sshpass/1.06/sshpass-1.06.tar.gz'
  homepage 'http://sourceforge.net/projects/sshpass'
  sha256 'c6324fcee608b99a58f9870157dfa754837f8c48be3df0f5e2f3accf145dee60'

  def install
    system "./configure", "--disable-debug", "--disable-dependency-tracking",
                          "--prefix=#{prefix}"
    system "make install"
  end

  def test
    system "sshpass"
  end
end

sshpass-1.06.tar.gz

git补全(相关指引)

# 更改登录shell
sudo chsh -s /bin/bash

# 
brew install bash-completion

# git clone https://github.com/git/git.git
cp git-completion.bash ~/.git-completion.bash

# .profile begin
if [ -f $(brew --prefix)/etc/bash_completion ]; then
  . $(brew --prefix)/etc/bash_completion
fi

source ~/.git-completion.bash
# .profile end

https://www.jianshu.com/p/7130a5c11d42

.profile文件

# 命令行提示符
PS1=\\u@\\h:\\w\\$

# brew 中科大源
export HOMEBREW_BOTTLE_DOMAIN=https://mirrors.ustc.edu.cn/homebrew-bottles

# git自动补全
[[ -r "/usr/local/etc/profile.d/bash_completion.sh" ]] && source "/usr/local/etc/profile.d/bash_completion.sh"

. ~/.git-completion.bash

# 去除默认shell告警
export BASH_SILENCE_DEPRECATION_WARNING=1

# 别名
alias grep='grep --color=auto'
alias fgrep='fgrep --color=auto'
alias egrep='egrep --color=auto'

# some more ls aliases
alias ll='ls -alhFG'
alias la='ls -a'
alias l='ls -CF'


export M2_HOME=/usr/local/mavenhome
export PATH=${M2_HOME}/bin:$PATH

列表

Aliwangwang-20180413-1510-8.00.44.dmg
QQ_6.6.2.dmg
TencentMeeting_0300000000_1.4.7.410.publish.dmg
WeChatMac.dmg
YoudaoNote.dmg
Zoom.pkg
apache-maven-3.6.3-bin.tar.gz
finalshell_install.pkg
googlechrome.dmg
iTerm2-3_3_9.zip
ideaIU-2020.1.dmg
jdk-8u251-macosx-x64.dmg
mysql-workbench-community-8.0.20-macos-x86_64.dmg
sogou_mac_57a.app
office365
The Unarchiver
iShot
ZenTermLite