术语 | 说明 |
---|---|
数据载荷 | 最终想要传递的信息 |
报文 | 网络中交换与传输的数据单元 |
头部 | 在数据载荷的前面添加的信息段 |
尾部 | 在数据载荷的后面添加的信息段 |
封装 | 对数据载荷添加头部和尾部,形成新的报文的过程 |
解封装 | 去掉报文的头部和尾部,获取数据载荷的过程 |
网关 | 提供协议转换、路由选择、数据交换等功能的网络设备 |
路由器 | 为报文选择传递路径的网络设备 |
终端设备 | 数据通信系统的端设备,作为数据的发送者或接收者 |
在编译前需安装必要的开发工具和依赖库:
bashyum install -y gcc gcc-c++ make pcre pcre-devel zlib zlib-devel openssl openssl-devel wget vim
• 说明:
• gcc
和 make
是编译代码的基础工具。
• pcre
支持正则表达式解析,用于 Nginx 的 URL 路由功能。
• zlib
用于 HTTP 内容压缩(如 Gzip)。
• openssl
提供 SSL/TLS 加密支持,启用 HTTPS 必备。
bashfind /path/to/search -type f -size +2G
/path/to/search
:替换为你要搜索的目录路径。-type f
:仅查找文件,不包括目录。-size +2G
:筛选出大小超过 2GB 的文件。powershell(base) PS C:\Users\30372> wsl WSL 正在完成升级... Could not write value to key \SOFTWARE\Classes\Directory\shell\WSL. Verify that you have sufficient access to that key, or contact your support personnel. 更新失败(退出代码: 1603)。 错误代码: Wsl/CallMsi/Install/ERROR_INSTALL_FAILURE
在网上查找资料, 动不动就是改注册表, 重新安装, 这些方法在我看来,修改注册表是有一定风险的, 而重新安装治标不治本, 都不太靠谱🤔。
使用
Get-Service wuauserv
命令检查 Windows Update 服务, 根据分享和经验判断无法自动更新, 并使用wsl --update
命令手动都无法更新成功, 可能是wsl无法正常退出, 进程仍在启用, 导致无法更新成功.
powershelldism.exe /online /disable-feature /featurename:Microsoft-Windows-Subsystem-Linux /norestart dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /norestart
功能描述 | PowerShell 命令 | Linux 命令 |
---|---|---|
查看当前目录 | Get-Location | pwd |
列出目录内容 | Get-ChildItem | ls |
切换目录 | Set-Location <path> | cd <path> |
创建文件夹 | New-Item -ItemType Directory <name> | mkdir <name> |
创建文件 | New-Item <filename> | touch <filename> |
删除文件 | Remove-Item <filename> | rm <filename> |
复制文件/文件夹 | Copy-Item <source> <destination> | cp <source> <dest> |
移动文件/文件夹 | Move-Item <source> <destination> | mv <source> <dest> |
查看文件内容 | Get-Content <filename> | cat <filename> |
查找文件 | Get-ChildItem -Recurse -Filter <name> | find <path> -name <name> |
获取进程列表 | Get-Process | ps |
杀死进程 | Stop-Process -Id <PID> | kill <PID> |
查看服务状态 | Get-Service | systemctl status <service> |
启动服务 | Start-Service <service> | systemctl start <service> |
停止服务 | Stop-Service <service> | systemctl stop <service> |
列出网络接口 | Get-NetAdapter | ip a 或 ifconfig |
查看系统信息 | Get-ComputerInfo | uname -a |
获取帮助信息 | Get-Help <cmdlet> | man <command> |
环境变量 | $env:<Variable> | echo $<Variable> |
读取日志 | Get-EventLog | journalctl |
重启系统 | Restart-Computer | reboot |