0Pricing
Linux Networking & TCP/IP for Developers · 课时

基础网络命令

学习使用 `ip`、`ping`、`traceroute` 和 `netstat` 等必要的命令行工具,检查并诊断网络连接

基础网络命令 是 CoddyKit 上的免费 Linux Networking & TCP/IP for Developers 课时。 这是第 2 节课,共 4 节。 你可以在下方免费阅读本课时的完整内容 — 然后在浏览器中使用内置代码编辑器和全天候 AI 导师进行实践。 这是 Linux Networking & TCP/IP for Developers 学习路径的一部分,你的进度在网页和 CoddyKit 应用中同步。 Linux Networking & TCP/IP for Developers 课程共包含 4 节课。

本课时的部分内容尚未翻译,以英文显示。

Basic Network Tools Intro

Time for the command line. You'll learn ping, ip, traceroute, and netstat — the core tools for inspecting and diagnosing connectivity.

Ping: Check Host Reachability

ping is your first reachability check: it sends ICMP echo requests and times the replies, telling you if a host is up and how fast it responds.

Ping Command in Action

Just type ping plus an IP or hostname. The -c flag limits how many packets you send — run this to try it.

ping -c 4 google.com

IP: The Modern Network Tool

The ip command is the modern replacement for older tools like ifconfig. It views and configures interfaces, addresses, and routes.

IP: Display Addresses

Run ip addr show (or ip a) to list every interface with its MAC, IPv4/IPv6 addresses, and state — your snapshot of what's connected.

ip addr show

IP: View Routing Table

The routing table tells Linux where to send traffic. Inspect it with ip route show (or ip r) to see routes and gateways.

ip route show

Traceroute: Map the Path

traceroute maps the path packets take to a host, revealing each router (hop) and its timing — great for pinpointing where delays creep in.

Traceroute in Action

traceroute sends packets with rising TTL values. Each hop decrements TTL; when it hits zero, that router replies and reveals itself.

traceroute google.com

Netstat: Network Statistics

netstat shows network statistics — active connections, routing tables, and interface stats. Handy for seeing which ports are open.

Quick Check: Identify the Command

You're trying to quickly determine if your Linux machine has an internet connection by checking if a remote server is online and responding. Which command would you use?

Recap: Essential Network Tools

Recap of your toolkit: ping checks reachability, ip shows interfaces and routes, traceroute maps the path, and netstat lists connections and ports.

常见问题解答

「基础网络命令」课时是免费的吗?

是的 — 「基础网络命令」的完整文本可在网页上免费阅读。要进行交互式练习(内置代码编辑器和全天候 AI 导师)并解锁 Linux Networking & TCP/IP for Developers 课程的其余内容,请升级到 CoddyKit PRO。 Linux Networking & TCP/IP for Developers 课程共包含 4 节课。

「基础网络命令」这节课中我会学到什么?

学习使用 `ip`、`ping`、`traceroute` 和 `netstat` 等必要的命令行工具,检查并诊断网络连接 你通过在浏览器中直接运行的动手代码来练习 Linux Networking & TCP/IP for Developers,全天候 AI 导师会在你学习这节课的过程中回答你的问题。

学习 Linux Networking & TCP/IP for Developers 需要有经验吗?

无需任何先前经验。CoddyKit 上的 Linux Networking & TCP/IP for Developers 课程适合初学者到高级学习者,你可以从这里开始或从头开始,按照自己的节奏学习。 这是第 2 节课,共 4 节。

「基础网络命令」课时需要多长时间?

大多数 CoddyKit 课程大约需要 5–10 分钟。每节课都很精短且互动,所以你能稳步进步,并在网页和应用中从离开的地方继续。

我能在这节 Linux Networking & TCP/IP for Developers 课中编写并运行代码吗?

能。每节 Linux Networking & TCP/IP for Developers 课都包含内置代码编辑器,你可以在浏览器中直接编写并运行真实代码,并获得即时 AI 反馈 — 无需本地设置。

此课程中的所有课时

  1. Linux 网络基础
  2. 基础网络命令
  3. 网络接口与 IP
  4. 检查网络连接与套接字
← 返回 Linux Networking & TCP/IP for Developers