macOS 使用命令(networksetup)设置 PAC 代理 作者: Chuwen 时间: 2022-10-14 分类: macOS 评论 因为手动在网络设置里,设置的 PAC  可能会因为其它软件给关掉,如 ClashX 设置为系统代理替换掉  然后自己手动替换又比较麻烦,所以想着用命令去替换一下 ## 解决方案 所以在网上找到了一篇问答 [https://apple.stackexchange.com/a/166443](https://apple.stackexchange.com/a/166443 "https://apple.stackexchange.com/a/166443"),使用 `networksetup -setautoproxyurl` 命令即可 ### networksetup -setautoproxyurl 语法如下 ```shell networksetup -setautoproxyurl ``` #### 问题 1:怎么拿到 `` ? 可以通过 `networksetup -listallnetworkservices` 命令拿到(只是猜测,因为我的是黑苹果,并且是有以太网网卡)  #### 示例 1 给以太网网卡设置 PAC 地址 ```shell networksetup -setautoproxyurl "Ethernet" "http://192.168.30.87/autoproxy.pac" ``` 然后检查下设置状态 : ```shell networksetup -getautoproxyurl "Ethernet" ``` 
macOS 桌面不能操作、无文件 解决办法 作者: Chuwen 时间: 2021-05-13 分类: macOS 评论 执行以下命令即可: ```shell defaults write com.apple.finder CreateDesktop true;killall Finder ```
【使用 HoRNDIS】Android 手机通过 USB 网络共享给 macOS 上网 作者: Chuwen 时间: 2020-12-04 分类: macOS 评论 # 安装一个驱动 HoRNDIS 即可 > GitHub:https://github.com/jwise/HoRNDIS/releases > GitHub Release:https://github.com/jwise/HoRNDIS/releases > > 本人使用的(**蓝奏云网盘链接**):[HoRNDIS-9.2-catalina_install.pkg.zip][1] 按照提示安装,安装完成后,**重启系统**即可。 然后手机打开 **设置** -> **个人热点与网络共享** -> **USB 网络共享** ![MIUI 12 个人热点 截图][2] ### 一切顺利的话,会在你 macOS -> 系统设置 -> 网络 自动新增一个接口 ![一切顺利的话,会在你 macOS -> 系统设置 -> 网络 自动新增一个接口][3] # 发现的缺点 当你手机关闭 USB 网络共享/拔除 USB 线缆(数据线),再插入,打开 USB 网络共享,又会自动新增一个接口 如果你观察仔细的话,你可以看到有 `...(en3)`、`...(en4)` 这两个接口。没错,`...(en4)` 是我之前开启 USB网络共享 自动新增的,但现在我重新开启,又新增了 # Catalina 10.15.7 (19H15) 测试安装能够正常使用 ![Catalina 10.15.7 (19H15) ][4] --- 想查询更为详细?的内容,请访问:https://cloud-atlas.readthedocs.io/zh_CN/latest/android/hack/android_usb_tethering.html [1]: https://nowtime.lanzous.com/i1xLAj1r4ij [2]: https://cdn.nowtime.cc/2020/12/04/849199925.png [3]: https://cdn.nowtime.cc/2020/12/04/1599352426.jpg [4]: https://cdn.nowtime.cc/2020/12/04/1308725480.jpg
mac 下设置别名来用 ssh 连接 作者: Chuwen 时间: 2020-11-27 分类: macOS 评论 # 先创建文件夹/文件(如果没有的话) ``` mkdir ~/.ssh touch ~/.ssh/config ``` # 然后编辑文件 `vim ~/.ssh/config` ``` # 服务器1 Host 别名 HostName IP地址 Port 22 User 用户名 # 服务器2 Host 别名 HostName IP地址 Port 22 User 用户名 ``` # 连接 ``` ssh 别名 ```
macOS 使用 Homebrew 安装 Python 3 作者: Chuwen 时间: 2020-11-24 分类: macOS 评论 # 首先搜索可用 Python 版本 ```shell brew search python ``` > 啪的一下很快啊,搜到了: ```shell chuwen@Chuwen-MBP ~ % brew search python ==> Formulae app-engine-python micropython python@3.9 boost-python python-markdown reorder-python-imports boost-python3 python-yq wxpython gst-python python@3.7 ipython python@3.8 ==> Casks awips-python kk7ds-python-runtime mysql-connector-python If you meant "python" specifically: It was migrated from homebrew/cask to homebrew/core. ``` # 我这里需要安装 3.7 版本的,所以: ```shell brew install python@3.7 ``` # 安装完成,验证安装(查看版本号?) ```shell chuwen@Chuwen-MBP ~ % python3 --version Python 3.8.2 ```