Create New Document

The title of your document (will be displayed as H1)
URL-friendly name (no spaces, use dashes)
Path where to create document (optional, use forward slashes to create subdirectories)

Move/Rename Document

Current location of the document
New path for the document (including the slug)
This only changes the document's path. It does not modify the document's title (H1 heading).

Delete Document

Are you sure you want to delete this document? This action cannot be undone.

Warning: If this is a folder, all contents including subfolders and documents will be deleted.

Message

Message content goes here.

Confirm Action

Are you sure?

Attachments

Allowed file types: jpg, jpeg, png, gif, svg, webp, txt, log, csv, sfd, zip, pdf, docx, xlsx, pptx, mp4 (Max: 10MB)

Document Files

Loading attached files...

Document History

Previous Versions

Loading versions...

Preview

Select a version to preview

Wiki Settings

Language for the user interface
Number of versions to keep per document. Set to 0 to disable versioning.
Maximum allowed file size for uploads in MB.

User Management

Add New User

Leave empty to keep current password
Users with these groups can access restricted sections.

Define path-based access rules for sections of your wiki, then assign users to groups in the Users tab. Rules are evaluated in order. First match wins.

Active Rules

Import markdown files from a ZIP archive. Files will be processed and stored in the appropriate document structure. Directory structure in the ZIP (category/subcategory) will be preserved in the wiki.

Upload a ZIP file containing markdown (.md) files to import.

Create and manage backups of your wiki data. Backups include all documents, images, and configuration files.

Available Backups

Loading backups...

Add/Edit Access Rule

Selected: /

Add Column

Banner

z-linux command

Linux 命令记不住?这很正常!

好消息:没有人能记住所有 Linux 命令!即使是有十几年经验的老手,也经常需要查文档。


一、接受现实

记住多少算正常?

水平 常用命令数 说明
新手 10-20 个 ls, cd, pwd, cat, grep
熟练 30-50 个 加上 find, sed, awk, tar
老手 50-80 个 常用命令基本熟悉
大神 80-150 个 也只是记住常用选项,冷门的还是要查

关键是:记住常用的,不常用的知道"有这个东西"就够了,用的时候再查。


二、核心策略

1. 记住"命令名"就够了

不需要记住:
find / -name "*.txt" -exec grep "pattern" {} \;

需要记住的是:
"find 命令可以按文件名查找"
"grep 可以搜索文件内容"

需要执行时再查具体参数

2. 掌握核心命令(20 个就够用)

分类 命令 用途
文件操作 ls, cd, pwd, cp, mv, rm, mkdir, touch 日常操作
查看内容 cat, less, head, tail, grep 查看文件
权限 chmod, chown, sudo 权限管理
搜索 find, grep, which 查找
系统 ps, top, df, du, free 系统状态
网络 ping, curl, wget, ssh 网络操作
文本处理 sed, awk, sort, uniq, wc 文本处理
其他 tar, gzip, echo, date, clear 工具命令

3. 理解"族谱"记忆法

# 一个命令的核心功能扩展
ls      # 列出文件
  ├─ -l     # 详细信息
  ├─ -a     # 显示隐藏
  ├─ -h     # 人类可读
  └─ -R     # 递归

# 记住主命令,选项按需查

三、实战技巧

技巧 1:多用 --help

# 任何时候忘了就查
ls --help
grep --help
find --help

# 快速查看常用选项
ls --help | head -20

技巧 2:用好 man 手册

man ls          # 详细手册
man grep
man find

# 快速搜索手册
man -k "search text"   # 搜索相关命令
apropos "list files"   # 查找能"列文件"的命令

技巧 3:使用 history

history              # 查看历史命令
history | grep find  # 搜索之前用过的命令
!100                 # 重新执行第100条命令
!!                   # 重新执行上一条命令

技巧 4:善用 Tab 补全

# 按 Tab 自动补全命令和路径
ls /usr/l<Tab>   # 自动补全为 /usr/local/

技巧 5:使用别名简化

# 添加到 ~/.rc
alias ll='ls -la'
alias g='grep --color=auto'
alias c='clear'
alias myip='curl ip.sb'
alias please='sudo $(history -p !!)'

# 使用
ll          # 就是 ls -la
myip        # 查看外网 IP

技巧 6:用 tldr 替代 man

# 安装 tldr(更简洁的帮助)
sudo apt install tldr   # Ubuntu/Debian

# 使用
tldr ls      # 显示常用示例,比 man 易读
tldr find
tldr tar

四、记忆方法

1. 按场景分类记

场景 命令
"我要看文件" ls, cat, less, head, tail
"我要操作文件" cp, mv, rm, touch, mkdir
"我要搜索" find, grep, which, whereis
"我要看系统" top, ps, df, du, free
"我要处理文本" sed, awk, sort, uniq, wc

2. 联想记忆

# 缩写记忆
ls = list           # 列出
cp = copy           # 复制
mv = move           # 移动
rm = remove         # 删除
pwd = print working directory  # 显示当前目录

3. 制作自己的速查表

# 创建个人速查文件
cat > ~/cheatsheet.txt << 'EOF'
=== 常用命令速查 ===

查找文件:find . -name "文件名"
查找内容:grep "内容" 文件名
查看进程:ps aux | grep 进程名
查看端口:netstat -tulpn | grep 端口

# 随时查看
cat ~/cheatsheet.txt

五、经验之谈

1. 不需要背,多练习

# 每天用 Linux 工作自然就会了
# 记不住就查,查多了就记住了

2. 用"小抄"

# 把常用命令贴在桌面上
# 或用手机拍照保存
# 或创建 alias 简化

3. 理解原理比记参数重要

记住:"find 可以按名字、大小、时间找文件"
比记住:"find -name -size -mtime -type" 更重要

需要时查参数就行了

4. 常用的自然记住,不常用的不用记

# 你每天用 ls,不需要特意背
# 你一个月用一次 fdisk,用的时候查就行

六、实用工具推荐

1. cheat - 命令速查工具

# 安装
pip install cheat

# 使用
cheat ls       # 显示 ls 的常用示例
cheat find
cheat tar

2. tldr - 简化版 man

# 安装
sudo apt install tldr

tldr grep      # 简洁明了

3. 在线速查


七、推荐的学习路径

第 1 周(10 个命令)

ls, cd, pwd, cp, mv, rm, mkdir, cat, less, clear

第 2 周(+10 个)

grep, find, head, tail, wc, sort, uniq, echo, date, touch

第 3 周(+10 个)

chmod, chown, sudo, ps, top, df, du, free, kill, man

第 4 周及以后

sed, awk, tar, gzip, curl, wget, ssh, scp, netstat, ping

以及更多选项和组合


八、终极秘诀

最重要的一句话:

记住"有这个命令"比记住"怎么用"更重要!

# 比如:
# 不需要记住:sed -i 's/old/new/g' file.txt
# 但要知道:sed 可以替换文本,需要时查语法

# 不需要记住:tar -czvf archive.tar.gz /path
# 但要知道:tar 可以打包解压,需要时查参数

总结

方法 效果
掌握 20 个核心命令 ✅ 日常足够
会用 --helpman ✅ 随时查
创建别名简化 ✅ 少记很多
history 回查 ✅ 不用记全部
tldr 速查 ✅ 快速上手
理解原理 ✅ 触类旁通

记住:Linux 大神不是"记住了所有命令",而是"知道该怎么查"!

Attached Files

Loading attached files...
Search Results