惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

云风的 BLOG
云风的 BLOG
The GitHub Blog
The GitHub Blog
A
About on SuperTechFans
P
Proofpoint News Feed
G
Google Developers Blog
Stack Overflow Blog
Stack Overflow Blog
IT之家
IT之家
Microsoft Security Blog
Microsoft Security Blog
F
Fortinet All Blogs
人人都是产品经理
人人都是产品经理
博客园 - 叶小钗
C
Check Point Blog
Microsoft Azure Blog
Microsoft Azure Blog
aimingoo的专栏
aimingoo的专栏
月光博客
月光博客
美团技术团队
D
Docker
博客园 - Franky
Y
Y Combinator Blog
大猫的无限游戏
大猫的无限游戏
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
博客园 - 【当耐特】
罗磊的独立博客
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报

Oskyla 烹茶室

修复 Joplin on KDE 菜单栏显示问题 Copy Fail:Linux 内核 2017 年至今的高危漏洞(附临时缓解方案) | CVE-2026-31431 Hermes Agent — 在 K3s / K8s 中运行指南 在 K3s 节点上安装并使用 nerdctl Mouser:轻量开源的罗技鼠标驱动替代方案 Claude Opus 4.7:优缺点与评测信息汇总 openFuyao NPU-Operator故障排查 openFuyao 2603 共测测试报告 openFuyao InferNex AI推理集成部署 310P(300I Pro) 环境问题记录及解决 ceph mon Operation not permitted 问题解决 Ascend 310P + openFuyao + NPU-Operator 故障排查 KDE Plasma6 禁用全局菜单,恢复正常应用菜单 终极指南:在 Linux 裸机服务器上快速部署 Moltbot (原 Clawbot) 并集成飞书 Windows 配置 Claude Code 解决 settings.json 不生效 Windows 配置 Claude Code 全流程 2025-12-31 | 年终总结 AI 生图精品提示词|第二期:城市星球 AI 生图精品提示词|第一期 Kubernetes kubectl --raw 使用指南 彻底解决阿里云和 tailscale 冲突 2025-10-21 | 沉淀思维 macOS 单独为鼠标或触控板开启自然滚动 2025-10-16 | 负载高低 2025-10-15 | 睡眠周期 2025-10-14 | 转换情绪与独立观点 go 拉取 gitcode.com 私有 mod Git 将某个文件恢复到其他分支的状态 SSH 通过跳板机连接 lxc 使用 chronyc 构建 ntp 服务 2025-10-13 | 独立思考于未来能源
Bash快捷指令
Tianlun Song · 2021-11-03 · via Oskyla 烹茶室

本文 首发于 🌱 煎茶转载 请注明 来源

常用指令速查.

查看磁盘使用情况命令

$ df -lh



# 查看磁盘使用情况及文件系统挂载位置, -h 为根据大小适当显示
$ fdisk -l              # 查看磁盘分区表及分区结构, -l 获得所有硬盘的分区情况
$ du -sh                # 查看当前目录的大小
$ du -lh --max-depth=1  # 查看当前目录下一级子文件和子目录占用的磁盘容量。

# df -lh
文件系统                        容量  已用  可用 已用% 挂载点
devtmpfs                        937M     0  937M    0% /dev
tmpfs                           958M     0  958M    0% /dev/shm
tmpfs                           383M  924K  383M    1% /run
/dev/mapper/fedora_fedora-root   15G  5.1G   10G   34% /
tmpfs                           958M  4.0K  958M    1% /tmp
/dev/sda2                      1014M  193M  822M   19% /boot
/dev/sda1                       599M  8.5M  591M    2% /boot/efi
tmpfs                           192M  4.0K  192M    1% /run/user/0

# fdisk -l
Disk /dev/sda:127 GiB,136365211648 字节,266338304 个扇区
磁盘型号:Virtual Disk
单元:扇区 / 1 * 512 = 512 字节
扇区大小(逻辑/物理):512 字节 / 4096 字节
I/O 大小(最小/最佳):4096 字节 / 4096 字节
磁盘标签类型:gpt
磁盘标识符:83C725D2-CC2F-428D-9B8F-195886809B76

设备          起点      末尾      扇区   大小 类型
/dev/sda1     2048   1230847   1228800   600M EFI 系统
/dev/sda2  1230848   3327999   2097152     1G Linux 文件系统
/dev/sda3  3328000 266336255 263008256 125.4G Linux LVM

Disk /dev/mapper/fedora_fedora-root:15 GiB,16106127360 字节,31457280 个扇区
单元:扇区 / 1 * 512 = 512 字节
扇区大小(逻辑/物理):512 字节 / 4096 字节
I/O 大小(最小/最佳):4096 字节 / 4096 字节

Disk /dev/zram0:957 MiB,1003487232 字节,244992 个扇区
单元:扇区 / 1 * 4096 = 4096 字节
扇区大小(逻辑/物理):4096 字节 / 4096 字节
I/O 大小(最小/最佳):4096 字节 / 4096 字节

git 设置和取消代理

git config --global http.proxy http://192.168.6.233:7890
git config --global https.proxy https://192.168.6.233:7890

git config --global http.proxy http://127.0.0.1:7890
git config --global https.proxy https://127.0.0.1:7890

只对github进行代理,对国内的仓库不影响
git config --global http.https://github.com.proxy http://192.168.6.107:7890
git config --global https.https://github.com.proxy https://192.168.6.107:7890

git config --global http.https://github.com.proxy http://127.0.0.1:7890
git config --global https.https://github.com.proxy https://127.0.0.1:7890

git config --global --unset http.proxy
git config --global --unset https.proxy

npm config delete proxy

设置和取消代理

export http_proxy=192.168.6.233:7890
export https_proxy=192.168.6.233:7890

export http_proxy="socks5://127.0.0.1:7070"
export https_proxy="socks5://127.0.0.1:7070"
要取消该设置:1)

unset http_proxy
unsethttps_proxy

参考文献