1
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?

watchコマンドを使って新しく接続した機器のipアドレスや名前を探しやすくする

Last updated at Posted at 2024-09-26

ネットワーク機器を抜き差ししてifconfigなどの結果とにらめっこしたことはありませんか?(私はやってました)

結論

watchコマンドを使ってip addrを定期実行すると良いです。

watch -d  "ip addr show"

ifconfigでも良いですが画面の専有面積が広くなるので名前を知りたいだけならipコマンドの方が使い勝手良かったです。

解説

watchコマンドは渡したコマンドを定期実行(defaultで2秒ごと)してくれます。-d optionを加えると変化がある場所をハイライトしてくれるので目が悪くなったおじさんでも大丈夫ですね。

-n optionで秒数を指定できたりもするので場合によっていろいろ挙動を調節できるのも良いです。

lsusbなどを使えばusb機器を探す時に役に立つと思います。

1
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
1
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?