winehq
https://www.sysgeek.cn/ubuntu-wine/
winetricks cjkfonts
winetricks riched20 riched30
winecfg
sudo apt install winetricks
winetricks vcrun2022
winetricks allfonts corefonts cjkfonts
winetricks d3dx9 d3dx10 d3dx11
找到HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Session Manager\Environment 位置
双击PATH
https://www.freebuf.com/articles/system/346955.html
https://werat.dev/blog/how-wine-works-101
ls a || echo fail
sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
1 前言
回想上大学以前第一次玩linux很上头,各种配置各种花里胡哨。
从arch linux
,manjaro
,debian
,ubuntu
,deepin
,甚至到后面够了一下网安的kali linux
。除了kali
外大同小异,几乎所有开源的主流发行版都折腾了遍,年少不懂事,统统上真机,环境docker乱成一锅粥的时候直接重装系统,备着七八个u盘的安装镜像启动盘。
热度期》平淡期〉高效期
mac和linux是师出同门unix的,后面前者走商业化,后者走开源化仅此而已,终端bash的运行逻辑是一样的,都可用。
2 安装和配置homebrew
App store
是苹果官方的应用商店,但是其实发不上去的软件要获得苹果验证是需要定期交钱的;homebrew
[1]是包管理软件,相比于linux的yum、apt等这是Mac必备神器。可以理解为前者是一座大超市,后者是一个精品小铺。
##install
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
##若龟速下载或github:443报错用镜像安装
##中科大镜像源
/usr/bin/ruby -e "$(curl -fsSL https://cdn.jsdelivr.net/gh/ineo6/homebrew-install/install)"
##国内佬做的,有其他国内源
/bin/zsh -c "$(curl -fsSL https://gitee.com/cunkai/HomebrewCN/raw/master/Homebrew.sh)"
###国内镜像源下载的需完成以下配置
##替换 brew.git:
git -C "$(brew --repo)" remote set-url origin https://mirrors.ustc.edu.cn/brew.git
##替换 homebrew-core.git:
git -C "$(brew --repo homebrew/core)" remote set-url origin https://mirrors.ustc.edu.cn/homebrew-core.git
若有报错也绕不开就网络和路径两个问题,无法解决的可以+v私信。基本语法跟linux的那些包管理工具一样:
##查询
brew search name
##安装
brew install name
##卸载
brew uninstall name
##更新
brew updata
##查看配置信息
brew config
##查看已安装的包
brew list
3 安装和配置oh-my-zsh
##查看本地内置了几种shell:
cat /etc/shells
##设置zsh为默认shell
chsh -s /bin/zsh
![](https://pic3.zhimg.com/v2-fa4c025bcce6bf3945dfd61e316f034e_b.webp?consumer=ZHI_MENG)
安装oh-my-zsh:(两种方法都行,二选一)
##github sh脚本安装
sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
##手动安装
git clone --depth=1 https://github.com/ohmyzsh/ohmyzsh.git ~/.oh-my-zsh
##创建zsh配置文件
cp ~/.oh-my-zsh/templates/zshrc.zsh-template ~/.zshrc
![](https://pic2.zhimg.com/v2-ec28f04250b7afca21e002a4f4adc029_b.webp?consumer=ZHI_MENG)
4 安装zsh插件
4.1 oh-my-zsh内置自动补全
- 自动列出目录:输入 cd 按 tab 键,目录将自动列出,在按 tab 可以切换。
- 自动补全目录:例如 /opt/local/bin 这个长路径,只需要 cd /o/l/b 按 tab 键自动补全
4.2 zsh-completions:额外补全
(两种安装方法都行,二选一)
##下载安装
git clone --depth=1 https://github.com/zsh-users/zsh-completions ${ZSH_CUSTOM:-${ZSH:-~/.oh-my-zsh}/custom}/plugins/zsh-completions
##添加目录
fpath+=${ZSH_CUSTOM:-${ZSH:-~/.oh-my-zsh}/custom}/plugins/zsh-completions/src
##激活
source "$ZSH/oh-my-zsh.sh"
##brew下载安装
brew install zsh-completions
4.3 zsh-autosuggestions:历史补全
##下载安装
git clone --depth=1 https://github.com/zsh-users/zsh-autosuggestions.git ${ZSH_CUSTOM:-${ZSH:-~/.oh-my-zsh}/custom}/plugins/zsh-autosuggestions
##vi ~/.zshrc进去配置zsh-autosuggestions
plugins=(
git
# other plugins...
zsh-autosuggestions
)
![](https://pic1.zhimg.com/v2-ced3da3f7af21a2f0e20350f500d4a18_b.webp?consumer=ZHI_MENG)
4.4 Incremental completion on zsh:实时补全
![](https://pic2.zhimg.com/v2-63cad42da4101cdb5317fd46e787f899_b.webp?consumer=ZHI_MENG)
##创建文件夹
mkdir $ZSH_CUSTOM/plugins/incr
##下载
curl -fsSL https://mimosa-pudica.net/src/incr-0.2.zsh -o $ZSH_CUSTOM/plugins/incr/incr.zsh
##配置
echo 'source $ZSH_CUSTOM/plugins/incr/incr.zsh' >> ~/.zshrc
##激活
source ~/.zshrc
4.5 zsh-syntax-highlighting:语法高亮
命令错误显示红色,直至正确才为绿色,路径正确会添加下划线
##下载安装
git clone --depth=1 https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting
##vi进去配置zsh-syntax-highlighting
plugins=([plugins...]
zsh-syntax-highlighting)
5 主题配置
github有公开的所有内置主题样式,外置的也有要自己下载。主题这个因人而异了,一般是初期有新鲜感,过后哪个方便用哪个。常用philips
,alien-minimal
,dst
,duellj
几个,又想要时间,又想简约,又想要行数,还有主题高亮颜色....还没笔者缝合了一下自己写了一个主题,还是有一点小问题这里就不开源了。。
- 内置主题[3]
- 外部主题[4]
##配置文件
cd ~
vi ~/.zshrc
## 默认主题,修改引号内内容即可
ZSH_THEME="robbyrussell"
![](https://pic2.zhimg.com/v2-275e65c5aded386a40db3c47f6075625_b.webp?consumer=ZHI_MENG)
参考资料
[1]homebrew: https://brew.sh/
[2]zsh: https://github.com/zsh-users
[3]内置主题: https://github.com/ohmyzsh/ohmyzsh/wiki/Themes
[4]外部主题: https://github.com/ohmyzsh/ohmy