0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

[Linux] ネットワーク設定_接続確認_netstat, ss

Last updated at Posted at 2025-07-02

概要

機能 基本コマンド systemd環境推奨
ネットワーク疎通確認(ICMP) ping
経路追跡(ICMP + TTL) traceroute
経路追跡(ICMP + UDP + 標準対応) tracepath
ネットワーク疎通・簡易通信テスト nc(netcat)
ポート・接続・統計情報の確認 netstat ss(推奨)

netstat コマンド

$ netstat [オプション]
オプション 由来 説明
default 現在の接続状況、ルーティング、統計情報を一覧表示
-n numeric 名前解決せず表示
-r route ルーティングテーブルの表示
-i interface ネットワークインターフェースの統計情報を表示(パケット送受信量など)

出力例 (netstat -r)

ルーティングテテーブル
Destination     Gateway         Genmask         Flags   MSS Window  irtt Iface
default         192.168.1.1     0.0.0.0         UG        0 0          0 enp3s0
192.168.1.0     0.0.0.0         255.255.255.0   U         0 0          0 enp3s0

出力例 (netstat -i)

インターフェーステーブル
Iface      MTU   RX-OK RX-ERR RX-DRP RX-OVR TX-OK TX-ERR TX-DRP TX-OVR フラグ
lo        65536  10000     0      0      0  10000     0      0      0  LRU
enp3s0     1500   8560     0      2      0   7900     0      0      0  BMRU

ss コマンド(Socket Statistics)

$ ss [オプション]
オプション 由来 説明
default socket statistics ソケット接続の統計情報を高速に表示
-a all 全ソケット(接続中・待受け中の両方)を表示
-t TCP TCP接続のみ表示
-u UDP UDP接続のみ表示
-n numeric 名前解決せず表示

Ping-t

ss

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?