3

I need the ip command in cygwin. I discovered that it's part of the iproutes2 package. But cygwin doesn't have that package??

I what cygwin package can I find ip command?

(I need to find the gateway, and I don't want to use Windows' ipconfig command as my script needs to be portable)

lonix
  • 1,723
  • Related: https://superuser.com/questions/721954/how-do-i-get-linux-commands-and-scripts-to-work-on-cygwin – Kusalananda Jun 04 '18 at 14:11
  • @Kusalananda that detals the basics, I know my way around cygwin, just cant find that command, maybe its in a different package bu the package search reveals nothing :( – lonix Jun 04 '18 at 14:16

1 Answers1

4

The ip command is not available in any official Cygwin package (at the time of writing).

You may search the contents of all Cygwin packages using the "Cygwin Package Search" page, which allows you to search using regular expressions.

The ip command is however available in the Windows Subsystem for Linux (look for "Ubuntu" in the "Microsoft Store" app on Windows 10), but I can't say anything about whether it works as expected.

Kusalananda
  • 333,661
  • 2
    Thanks. Do you have any idea why such basic tools are not part of cygwin? Also ifconfig is not available. Thats weird – lonix Jun 05 '18 at 04:25
  • 2
    @lonix Cygwin provides some of the user-level tools that you would often find in Linux, but since it does not provide a Linux kernel, it can hardly be said to be "a Linux". ifconfig and ip are administrative tools that are usually available on Linux systems, but they are in no way standard tools on all Unix systems (ifconfig usually exists, in one form or another, but there's no guarantee). The Cygwin maintainers have opted to not try to provide admin tools for the underlying Windows OS. – Kusalananda Jun 05 '18 at 05:00