MacBook总结
HomeBrew Address
/opt/homebrew
Redis
启动方式 1
启动
- redis-server /opt/homebrew/etc/redis.conf
查看 redis 控制台
- redis-cli
如果出现127.0.0.1:6379>
则成功
启动方式 2
还有一种启动方法就是
brew services start redis
我的redis持久化文件在哪里?
/opt/homebrew/var/db/redis
主要是在 opt/homebrew/var 这个文件夹里面
关于Home-brew
使用的指令
brew docotr
brew cleanup 清理包
which -a git 查看所有git路径
1 | brew安装软件的目录 |
运行brew doctor
Warning: Unbrewed header files were found in /usr/local/include.
If you didn’t put them there on purpose they could cause problems when
building Homebrew formulae, and may need to be deleted.
会有以上的警告
Stack overflow 上说是没有用homebrew安装node 所有忽略就行了吧
brew 安装py3
1 | brew update |
切换terminal
1 | 切换 zsh |
Mac环境变量
zsh 配置文件 zshrc
bash 配置文件 bash_profile
zsh 比 bash 牛逼
zshrc 优先加载
我会在 zshrc 最后一行添加 source ~/.bash_profile
1 | vim ~/.zshrc |
source ~/.bash_profile
NPM
- 换淘宝的源
1 | npm config set registry https://registry.npmmirror.com |
- 更新node
1 | sudo npm cache clean -f //清除nodejs的cache: |
更新cnpm:直接重装
1
cnpm -v
下载telnet,ping指定端口号
Brew install telnet
1 | brew install telnet |
ping某一个端口
1 | telnet amberzxh.com 8848 |
Connected 表示连接完成
查看jdk的安装目录
$ /usr/libexec/java_home -V
隐藏/显示桌面
1 | 隐藏桌面 |
本博客所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明来自 到处皆诗境,随时有物华!
评论