Kernal
获取系统运行相关数据
1. 获取CPU信息
cat /proc/cpuinfo
2. inxi
# install
apt install inxi
# print info
inxi -F
查看 主流发行版 版本号和内核版本
1. 主流发行版版本号
lsb_release -a
2. WSL 版本号
wslfetch
3. 内核版本和编译时间
uname -a
查看显卡设备
lspci 很强大,不止有这一种用法
# 列出所有 VGA 设备
lspci | grep -i vga
# 查看这个设备的详情
lspci -v -s 00:02.0
NV
- nvidia-smi (
nvidia-smi -l 2) - gpustat (
gpustat -cp)
AMD
- radeontop
Intel
- intel-gpu-tools
Sudo 免密码
cd /etc/sudoers.d/
# vim {profile}
%sudo ALL=(ALL:ALL) NOPASSWD:ALL
# User rules for ubuntu
ubuntu ALL=(ALL) NOPASSWD:ALL
清理 Journal 日志
缩减至 200M
journalctl --vacuum-size=200M
挂载 SMB 路径
在 CentOS 下测试通过
视情况更改 vers, 在 windows server 2019 版本中, vers 1.0 不能成功挂载。(认证/加密未匹配)
refs:
- https://support.cs.toronto.edu/systems/linux.html
- https://blog.henrici.name/blog/2020-07-17/
- https://techoverflow.net/2021/07/06/how-to-automount-cifs-smb-on-alpine-linux/
yum install cifs-utils -y
mkdir -p /nas/mirrors
mount -t cifs -o username="",password="",vers=3.0 //192.168.1.11/mirrors/ /nas/mirrors
SSH Tunnel
# 通过 100.66.111.78 映射 192.168.50.1 的 端口 到 本地的 6800
ssh -L 6800:192.168.50.1:16800 -i wayne_key root@100.66.111.78