可以用 [nc](https://link.segmentfault.com/?enc=cHNGnmfudktqJCxB%2FU3hGA%3D%3D.V4wMyYRMvbpyOWaimNPyNanlAyku%2Fs%2BvSAHjfORNCxU%3D) 里面有几个例子: $ printf "GET / HTTP/1.0\r\n\r\n" | nc host.example.com 80 $ nc [-C] localhost 25 RCPT TO: DATA Body of email. . QUIT EOF