Edit Commands.md & Snippets.md
Deploy / deploy (push) Successful in 50s

This commit is contained in:
cattom committed 2026-11-06 20:37:25 +08:00
1 parent 26ccbd09bc
commit 290876138a
2 files changed
+79

No files matched your search

@@ -385,6 +385,26 @@ lsmod | grep bbr
### Gitea Actions ### Gitea Actions
(待施工)
## TCP ping 与 UDP ping
**TCP ping**:
```bash
sudo apt install hping3
hping3 -S -p 80 -c 3 www.cisco.com
```
**UDP ping**:
```bash
sudo nmap -sU -p 161 itsfoss.com
netcat -v -u -z itsfoss.com 161
```
## SSH 隧道 ## SSH 隧道
``` bash ``` bash
@@ -441,6 +461,25 @@ rsync -avzP --delete /local/source/folder/ [server_id]:/remote/destination/folde
rsync -avzP --delete [server_id]:/local/source/folder/ /remote/destination/folder/ rsync -avzP --delete [server_id]:/local/source/folder/ /remote/destination/folder/
``` ```
## macOS 恢复挂载网络存储
macOS 完成更新后,依照以下流程恢复挂载 NFS:
- 添加挂载点:
```bash
sudo su
echo "/System/Volumes/Data/mnt/CTS2 auto_mount_config -nosuid,noowners" >> /etc/auto_master
```
- 确认挂载配置有效性:
```bash
cat /etc/auto_mount_config
```
- 恢复挂载并验证:
```bash
automount -vc
ls -al /System/Volumes/Data/mnt/CTS2
```
## 参考 ## 参考
[用于 GitHub Actions 的 SSH](https://github.com/appleboy/ssh-action/blob/master/README.zh-cn.md) [用于 GitHub Actions 的 SSH](https://github.com/appleboy/ssh-action/blob/master/README.zh-cn.md)
+40
View File
@@ -268,5 +268,45 @@ Media -fstype=smbfs,soft,nobrowse ://cattom:password@192.168.1.7/Media
sudo automount -vc sudo automount -vc
``` ```
## RealVNC 连接 MacOS 26.7 报错解决
RealVNC 错误信息: `Protocol error: key length too large`
> **最可能是 RealVNC 与 macOS 内置屏幕共享的认证兼容问题。**
> 社区已有 macOS 26.6 升级后出现完全相同报错的记录,日志显示失败发生在 Apple ARD 认证握手阶段。
>
> ChatGPT
解决办法:
1. **在 Mac 上启用独立的 VNC 密码。** 打开“系统设置 → 通用 → 共享 → 屏幕共享”旁的 ⓘ,找到并启用“VNC 显示程序可以使用密码控制屏幕”,设置专用密码。仅打开“屏幕共享”总开关。
2. 在 Windows 打开 RealVNC Viewer,右键 Mac 的连接 → **Properties → Expert**。
3. 找到 **`ProtocolVersion`**,将它从空白或默认值改成 **`3.3`**,保存。
## QNAP NAS 开机自启动程序
- 控制台 - 网络和文件服务 - Telnet/SSH - 允许 SSH 连接
- 编辑访问权限 - 勾选你的账号
- SSH 登录到您的 QNAP 设备: `ssh [your-username]@[nas-ip]`
- 安装 nano: `ipkg install nano`
- 挂载配置 ramblock (基于 HAL 的 Intel 和 AMD NAS, QTS 5.x):
```bash
sudo -i
mount $(/sbin/hal_app --get_boot_pd port_id=0)6 /tmp/config
```
- 创建和编辑 `/tmp/config/autorun.sh`
```bash
touch /tmp/config/autorun.sh
chmod +x /tmp/config/autorun.sh
nano /tmp/config/autorun.sh
umount /tmp/config
```
- 控制台 - 系统 - 硬件 - 勾选“启动时运行用户定义的进程”,允许在启动时运行 autorun.sh
### 参考
[在启动时运行您自己的应用程序 | 威联通科技 QNAP](https://www.qnap.com.cn/zh-cn/how-to/faq/article/running-your-own-application-at-startup)
## 升腾 C92 主机启用 USB 3.0 支持 ## 升腾 C92 主机启用 USB 3.0 支持
(待施工)