0Pricing
Linux Command Line Mastery · 강의

네트워크 명령 입문: `ping`, `ip`, `netstat`

네트워크 연결 상태를 확인하고 네트워크 구성을 살펴보는 기본 명령을 알아봅니다.

네트워크 명령 입문: `ping`, `ip`, `netstat`은(는) CoddyKit의 무료 Linux Command Line Mastery 강의입니다. 이것은 4개 중 2번째 강의입니다. 아래에서 전체 강의를 무료로 읽을 수 있으며, 내장 코드 에디터와 24/7 AI 튜터와 함께 브라우저에서 직접 실습할 수 있습니다. 이 강의는 Linux Command Line Mastery 학습 경로의 일부이며, 진행 상황이 웹과 CoddyKit 앱에 동기화됩니다. Linux Command Line Mastery 강의에는 총 4개의 강의가 포함되어 있습니다.

이 강의의 일부는 아직 번역되지 않았으며 영어로 표시됩니다.

Intro to Network Commands

Welcome to this lesson on essential Linux networking commands! Understanding these tools is crucial for diagnosing network issues and viewing your system's network configuration.

We'll explore ping for checking connectivity, ip for comprehensive network interface management, and netstat for viewing active connections.

What is Ping?

The ping command is a fundamental tool used to test the reachability of a host on an Internet Protocol (IP) network. It sends small data packets to a target and waits for a response.

  • Purpose: Check if a remote computer or server is online.
  • Measurement: Calculates the Round-Trip Time (RTT) for packets to reach the host and return.
  • Analogy: Think of it like a sonar pulse for your network!

Ping Your Network

Let's try using ping to check connectivity to a well-known website. The command will send continuous pings until you stop it (usually with Ctrl+C).

Observe the output: the time it takes for packets to return and the 'TTL' (Time To Live) value, which indicates how many 'hops' the packet can make before being discarded.

ping google.com

Ping Options: Limiting Pings

Sometimes you don't need continuous pings. The -c option allows you to specify the number of echo requests to send.

This is useful for a quick check without having to manually stop the command. After sending the specified number of packets, ping will provide a summary.

ping -c 4 google.com

Meet the `ip` Command

The ip command is a modern and powerful utility for showing or manipulating routing, network devices, interfaces, and tunnels. It's designed to replace older tools like ifconfig and route.

ip is versatile, with many subcommands for different tasks. We'll look at ip addr for addresses and ip route for routing information.

Your IP Address with `ip addr`

To view the IP addresses assigned to your network interfaces, you use the ip addr show (or simply ip a) subcommand.

  • lo: The loopback interface (127.0.0.1), used for communication within the same machine.
  • eth0/wlan0: Your primary wired (Ethernet) or wireless interface.

Look for the inet lines to find your IPv4 addresses.

ip addr show

Network Routes with `ip route`

The ip route show command displays your system's routing table. The routing table tells your computer how to send network traffic to different destinations.

A key entry is the default via route, which indicates your default gateway – the router your computer uses to send traffic to the internet or other networks it doesn't know directly.

ip route show

What is Netstat?

netstat (network statistics) is a command-line tool that displays network connections (both incoming and outgoing), routing tables, and a number of network interface statistics.

While ip is often preferred for configuration, netstat remains useful for quickly checking what services are listening on your machine and what connections are established.

Active Connections with `netstat`

To see active network connections and listening ports, you can use netstat with several options:

  • -t: Show TCP connections.
  • -u: Show UDP connections.
  • -l: Show only listening sockets.
  • -p: Show the PID/program name owning the socket.
  • -n: Show numerical addresses instead of trying to resolve hostnames.

Combining these, netstat -tulpn gives a comprehensive view.

netstat -tulpn

Network Command Challenge

Test your understanding of the networking commands we've covered.

Recap: Network Basics

Great job! In this lesson, you've gained an introduction to fundamental Linux networking commands:

  • ping: For testing host reachability and measuring round-trip time.
  • ip: A powerful, modern tool for viewing and configuring network interfaces and routing tables.
  • netstat: Useful for displaying active network connections and listening ports.

Keep practicing these commands to become more comfortable with network diagnostics!

자주 묻는 질문

“네트워크 명령 입문: `ping`, `ip`, `netstat`” 강의는 무료인가요?

네 — “네트워크 명령 입문: `ping`, `ip`, `netstat`” 전체 내용을 이 웹사이트에서 무료로 읽을 수 있습니다. 인터랙티브하게 실습하려면(내장 코드 에디터와 24/7 AI 튜터), CoddyKit PRO로 업그레이드하면 Linux Command Line Mastery 강의 전체를 잠금 해제할 수 있습니다. Linux Command Line Mastery 강의에는 총 4개의 강의가 포함되어 있습니다.

“네트워크 명령 입문: `ping`, `ip`, `netstat`”에서 뭘 배우나요?

네트워크 연결 상태를 확인하고 네트워크 구성을 살펴보는 기본 명령을 알아봅니다. 브라우저에서 직접 실행하는 실습 코드로 Linux Command Line Mastery을(를) 배우며, 24/7 AI 튜터가 강의를 진행하면서 질문에 답변해줍니다.

Linux Command Line Mastery을(를) 시작하는 데 경험이 필요한가요?

사전 경험은 필요하지 않습니다. CoddyKit의 Linux Command Line Mastery은(는) 초급자부터 고급 학습자까지를 위해 구성되어 있으므로, 여기서 시작하거나 처음부터 시작할 수 있으며 자신의 속도대로 진행할 수 있습니다. 이것은 4개 중 2번째 강의입니다.

“네트워크 명령 입문: `ping`, `ip`, `netstat`” 강의는 얼마나 걸리나요?

대부분의 CoddyKit 강의는 약 5~10분이 소요됩니다. 각 강의는 간결하고 인터랙티브하여 꾸준한 진행이 가능하며, 웹과 앱에서 중단한 부분부터 바로 시작할 수 있습니다.

이 Linux Command Line Mastery 강의에서 코드를 작성하고 실행할 수 있나요?

네. 모든 Linux Command Line Mastery 강의에는 내장 코드 에디터가 포함되어 있으므로, 브라우저에서 바로 실제 코드를 작성하고 실행한 후 즉시 AI 피드백을 받을 수 있습니다 — 로컬 설정이 필요 없습니다.

이 강의의 모든 강의

  1. 사용자 및 그룹 관리: `useradd`, `usermod`, `groupadd`
  2. 네트워크 명령 입문: `ping`, `ip`, `netstat`
  3. 안전한 원격 접속: `ssh`와 `scp`
  4. chmod와 chown을 활용한 파일 권한과 소유권
← Linux Command Line Mastery(으)로 돌아가기