网络与传输CLI Manual
$netstat
Print network connections, routing tables, interface statistics, and listening ports.
命令语法POSIX Standard
netstat [OPTIONS]在交互式终端沙盒中实时运行
无需安装的客户端实时仿真环境。
bash — terminal
AST Sandbox (Free)
概述与工作原理
`netstat` (Network Statistics) provides comprehensive visibility into incoming and outgoing network connections, listening TCP/UDP ports, routing tables, and interface metrics.
常用参数与选项说明
| Flag / Option | Description |
|---|---|
| -t | Display TCP network connections. |
| -u | Display UDP network connections. |
| -l | Show only listening server sockets. |
| -p | Show the PID and program name to which each socket belongs. |
| -n | Show numerical addresses and port numbers instead of resolving hostnames. |
实际生产案例与代码范例
#1Check all listening ports and services
netstat -tulnLists all open TCP and UDP ports in numeric format.
相关 Linux 常用命令
$curl网络与传输
通过 HTTP、HTTPS、FTP 和 REST API 在网络服务器之间传输数据。
$wget网络与传输
Non-interactive network downloader for HTTP, HTTPS, and FTP.
$ping网络与传输
Send ICMP ECHO_REQUEST to network hosts to test connectivity and latency.
$ssh网络与传输
Securely log into remote Linux servers and execute commands over encrypted connections.
$scp网络与传输
Securely copy files and directories between hosts over SSH connection.
$rsync网络与传输
Fast and versatile remote and local file-copying and synchronization tool.