Linux Cookbook
Recipes for Linux
.
Hands-on system administration and development examples and guides for daily work.
Linux (/ˈlinʊks/
LEEN-uuks or /ˈlɪnʊks/
LIN-uuks)
is a family of open-source Unix-like operating systems based on the Linux kernel,
an operating system kernel first released on September 17, 1991, by Linus Torvalds.
Quick Start
- Linux Distributions
- Setup: Ubuntu
- Basic Usage (GNU
coreutils
) - I/O: File & Directory
- Date & Time:
date
(GNUcoreutils
) - Time Zone
- Process Control
- System Information (GNU
coreutils
) - Environment Variables
- Diff:
diff
,colordiff
- Archive & Compression:
tar
- Network:
wget
, GNUwget2
,curl
- Scripts
- OpenSSH
General Concepts
- Data Type
- Character (字符)
- Character Encoding (字符编码)
- String (字符串)
- End of Line (EOL): CRLF
- Input/Output (I/O)
- Time
- Compression Algorithms (压缩算法)
- Process
- URL, URI, URN
- Endianness
System Programming (系统编程)
- Standard I/O (standard C library): File
- Standard I/O (standard C library): Directory
- UNIX I/O (system call)
- File Metadata
System Administration (系统管理)
Network
- TCP/UDP Reuse Port:
SO_REUSEPORT
- TCP/UDP (Recv/Send) Buffer Size:
SO_RCVBUF
,SO_SNDBUF
- Zero-Copy:
mmap()
,sendfile()
,TCP_CORK
TCP
- TCP Connect Timeout (handshaking timeout)
- TCP
listen()
Queue - TCP Reuse Address:
SO_REUSEADDR
- TCP Keep Alive:
SO_KEEPALIVE
,TCP_KEEPIDLE
,TCP_KEEPCNT
,TCP_KEEPINTVL
- TCP Nodelay (Nagle’s Algorithm):
TCP_NODELAY
- TCP Transmission Timeout:
SO_RCVTIMEO
,SO_SNDTIMEO
- TCP Quick ACK (Disable Delayed ACKs, 禁用延迟确认)
- Fix TIME-WAIT Assassination Hazards (TIME-WAIT 暗杀), enable
tcp_rfc1337
- TCP Slow Start (慢启动)
- TCP Fast Open (TFO)
- TCP Selective ACK (SACK)
TLS
NGINX
- Install NGINX on Ubuntu
- NGINX Community Documentation
- NGINX Product Documentation
- NGINX Configuration: Global
- NGINX Configuration: vHost
- NGINX: TCP Fast Open
- NGINX: WebSocket Support
- NGINX: CSRF (跨站请求伪造)
- NGINX: XSS (跨站脚本攻击)
- NGINX:
zstd
Support - NGINX Plus (commercial)
- NGINX Unit Homepage
MongoDB
- MongoDB: Overview
- Server
- Client
- CLI:
mongosh
Usage - GUI: Mongo Compass
- CLI:
Redis
- Redis Setup
- CLI:
redis-cli
- Basic Usage - GUI
- RedisInsight (Official)
Redis Desktop Manager- Another Redis Desktop Manager
PostgreSQL
- PostgreSQL - Setup
- CLI:
psql
- Usage - GUI (Official):
pgadmin4
RabbitMQ
EMQX
Performance
Container (容器)
DevOps
- Git Cookbook
- Python:
pipenv
- Project:
black
,isort
,mypy
,pylint
- Deploy with Docker
- Project:
Web
HTTP
- HTTP Basic
- HTTP Connection Management
- HTTP Cookie
- HTTP Authentication:
WWW-Authenticate
,Authorization
,Proxy-Authenticate
- HTTP Caching:
Cache-Control
,,Expires
ETag
,Vary
- HTTP Range Requests:
Range
HTTP Client
Recommended Readings
- LinuxCommmand.org
- The Linux Command Line, Fifth Internet Edition
- Filesystem Hierarchy Standard Specification Series
- Manpages - Debian
- The Linux Kernel documentation
- Book: UNIX and Linux System Administration Handbook, Fifth Edition (2018)
- C Programming Language
- Book: The C Programming Language, Second Edition (1989)
- Book: C: A Reference Manual, Fifth Edition (2002)
- Book: The C Standard Library (1992)
- C FAQs
- Computer System, OS and System Development
- Book: Computer Systems: A Programmer’s Perspective, Third Edition (2016)
- Paper: The UNIX Time-Sharing System. (Communications of The ACM, 1974)
- Book: Operating Systems: Three Easy Pieces v1.00
- Book: Advanced Programming in the UNIX Environment, 3rd Edition. (2013)
- URL
- Book: HTTP: The Definitive Guide (2002)