← 返回命令列表

Linux command

squid 命令

文本

复制后可按需替换文件名、目录或参数。

常用示例

Start squid

squid

Check configuration

squid -k parse

Reload configuration

squid -k reconfigure

Shutdown gracefully

squid -k shutdown

Show version

squid -v

Run in foreground

squid -N

Debug mode

squid -d [5]

Clear cache

squid -k rotate && rm -rf [/var/spool/squid/*] && squid -z

说明

squid is a caching proxy server supporting HTTP, HTTPS, FTP, and other protocols. It operates as both a forward proxy for client internet access and a reverse proxy (accelerator) for web servers, caching frequently requested content to reduce bandwidth usage and improve response times. The server uses Access Control Lists (ACLs) to filter traffic, authenticate users, restrict access to specific sites or content types, and enforce bandwidth limits. Cache storage is configurable with both memory and disk backends, supporting hierarchical caching with parent and sibling proxies. Configuration is managed through a comprehensive configuration file that defines listening ports, ACL rules, cache policies, authentication schemes, and logging behavior. The -k flag sends management commands to a running instance for operations like configuration reload, log rotation, and graceful shutdown.

参数

-k _COMMAND_
Send command to running squid.
-f _FILE_
Configuration file.
-N
No daemon mode.
-d _LEVEL_
Debug level.
-z
Create swap directories.
-v
Show version.

FAQ

What is the squid command used for?

squid is a caching proxy server supporting HTTP, HTTPS, FTP, and other protocols. It operates as both a forward proxy for client internet access and a reverse proxy (accelerator) for web servers, caching frequently requested content to reduce bandwidth usage and improve response times. The server uses Access Control Lists (ACLs) to filter traffic, authenticate users, restrict access to specific sites or content types, and enforce bandwidth limits. Cache storage is configurable with both memory and disk backends, supporting hierarchical caching with parent and sibling proxies. Configuration is managed through a comprehensive configuration file that defines listening ports, ACL rules, cache policies, authentication schemes, and logging behavior. The -k flag sends management commands to a running instance for operations like configuration reload, log rotation, and graceful shutdown.

How do I run a basic squid example?

Run `squid` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

What does -k _COMMAND_ do in squid?

Send command to running squid.