LoginSignup
0
0

More than 1 year has passed since last update.

LinuxでNetworkNamespaceを一括削除する

Posted at

LinuxでNetworkNamespaceを一括削除しようと以下のコマンドを実行した。

$sudo ip -all netns delete

その結果、下記のようなエラーを返された。

Option "-all" is unknown, try "ip -help".

調べてみると、iproute2がインストールされていないと -all オプションは使えないらしい。
そこで、代わりに以下のコマンドを実行。一括削除できた。

$sudo ip netns | xargs -I {} sudo ip netns delete {}

まあこんなコマンドを覚えるより、さっさとiproute2をインストールすればよかったというお話でした。

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