Netstat - busybox-net-tools conflicts with net-tools

Context

PS /home/rokejulianlockhart> sudo netstat -tulpn | grep :22
sudo: netstat: command not found
NativeCommandExitException: Program "sudo" ended with non-zero exit code: 1.
NativeCommandExitException: Program "grep" ended with non-zero exit code: 1.
PS /home/rokejulianlockhart>
PS /home/rokejulianlockhart> cnf netstat
                         
The program 'netstat' can be found in following packages:
  * busybox-net-tools [ path: /usr/bin/netstat, repository: zypp (openSUSE-20230123-0) ]
  * net-tools-deprecated [ path: /usr/bin/netstat, repository: zypp (openSUSE-20230123-0) ]
  * busybox-net-tools [ path: /usr/bin/netstat, repository: zypp (download.opensuse.org-oss_2) ]
  * net-tools-deprecated [ path: /usr/bin/netstat, repository: zypp (download.opensuse.org-oss_2) ]
  * busybox-net-tools [ path: /usr/bin/netstat, repository: zypp (https-download.opensuse.org-901dda24) ]
  * net-tools-deprecated [ path: /usr/bin/netstat, repository: zypp (https-download.opensuse.org-901dda24) ]

Try installing with:
    sudo zypper install <selected_package>

PS /home/rokejulianlockhart>
PS /home/rokejulianlockhart> sudo zypper install busybox-net-tools 
Loading repository data...
Reading installed packages...
Resolving package dependencies...

Problem: the to be installed busybox-net-tools-1.36.0-26.2.noarch conflicts with 'net-tools' provided by the installed net-tools-2.10-2.1.x86_64
 Solution 1: deinstallation of net-tools-2.10-2.1.x86_64
 Solution 2: do not install busybox-net-tools-1.36.0-26.2.noarch

Choose from above solutions by number or cancel [1/2/c/d/?] (c): 

Problem

Is any predictable negative consequence caused by replacement of net-tools with busybox-net-tools probable?

I ask because obviously net-tools doesn’t include the netstat command that I desire, yet isn’t installed by default for whatever reason.

In fact, linux - Why is net-tools deprecated ? Can I still use it without security issue? - Unix & Linux Stack Exchange appears to state that net-tools is deprecated, so I would be surprised if it were preferent. However, this causes me to worry that both packages might be deprecated, yet net-tools-deprecated complicates this additionally.

@rokejulianlockhart as you can see it’s deprecated, use ss which is the replacement…

1 Like

What is? net-tools? That’s a separate package to net-tools-deprecated, though:

The program 'netstat' can be found in following packages:
  * busybox-net-tools [ path: /usr/bin/netstat, repository: zypp (openSUSE-20230123-0) ]
  * net-tools-deprecated [ path: /usr/bin/netstat, repository: zypp (openSUSE-20230123-0) ]
  * busybox-net-tools [ path: /usr/bin/netstat, repository: zypp (download.opensuse.org-oss_2) ]
  * net-tools-deprecated [ path: /usr/bin/netstat, repository: zypp (download.opensuse.org-oss_2) ]
  * busybox-net-tools [ path: /usr/bin/netstat, repository: zypp (https-download.opensuse.org-901dda24) ]
  * net-tools-deprecated [ path: /usr/bin/netstat, repository: zypp (https-download.opensuse.org-901dda24) ]

However, irrelevant to that, I merely want to know the best option. linux - alternative to "netstat -s" - Unix & Linux Stack Exchange demonstrates at least a reason for this.

@rokejulianlockhart It would be the net-tools-deprecated not the busybox version…

Why? Busybox’s package at least contains the tool without any obvious marking of deprecation.

@rokejulianlockhart because the tool is deprecated… ss is the replacement…

I don’t believe that this answers the question.

I want to test netstat anyway. I just want to know whether to use Busybox’s package, or the deprecated version, and why.

@rokejulianlockhart the program is deprecated (as in over 10 years ago), it is only there to provide a rollover to folks whom have not updated their scripts etc…

If you want to test then the net-tools-deprecated one should be used, unless your running a busybox stack…

First, there is no need to use bold. Second, we cannot tell you what to use. Try both, see the difference, decide which one is better suited for your purpose.

Busybox is intended for very limited environment with basic networking needs and is kept as small as possible. So yes, busybox is not going away because such systems are not going away. For normal systems there are other, more feature rich, tools which also get extended with new features. Old tools are deprecated not to make you personally unhappy - but because they lack support for new features in Linux networking stack and cannot be extended due to their design.

1 Like

but

is specifically why I ask this:

Will replacement of an installed-by-default networking package cause

  • any well-known reduction in functionality that might cause me to be unable to revert without manually sourcing net-tools again from a different PC and transferring that over, or
  • corrupt any configuration files due to fundamental incompatibilities between the packages?

Considering that BusyBox is used on Android, perhaps not, but that distribution is weird.


Thanks, although I’m uncertain why you mentioned this. I’ve no stubborn penchant for developmnental stagnantion, I merely want to be able to temporarily test netstat on this PC to compare its output with something else.

If you mean busybox and if it was installed by default it should be considered a bug, not a feature.

If you are so scared of the “deprecated” in the net-tools-deprecated - look at what is included in net-tools (using as example rpm -ql net-tools) and decide for yourself whether you need any tool included there. Some of these tools may be provided by busybox as well, which is why I said earlier “test both and decide”.

But the fact that these tools come from busybox does not make them less deprecated.

Huh? Just reinstall it again.

The best solution appears to be to create a kind of local isolation. In lieu of wasting time and space on a VM, a basic container appears best. I wonder why I didn’t consider this previously; why corrupt my base system with deprecated tools?