Article 5NJ8P How do I find which package a command came from, Ubuntu 20.04 LTS

How do I find which package a command came from, Ubuntu 20.04 LTS

by
Zarniwoop79
from LinuxQuestions.org on (#5NJ8P)
I'm using Kubernetes in my job, and the OS image that's being used contains very few commands, so I have to install them each time. But some basic commands are usually preinstalled so I don't know which package they came from, e.g. ping, tcpdump, telnet etc.

So I was wondering if anyone knows of a good way to find which package a command came from? On the Kubernetes image, just typing the command and pressing enter doesn't give suggestions like it does in a regular Ubuntu-installation, and on my laptop, the command is usually already present.

I found some suggestions for e.g. "dpkg -S ping", which sort of works, but it seems to give a wildcard-match so it lists anything that contains "ping". I've also seen suggestions where you put the full path, e.g. "/usr/bin/ping", but on my laptop (Ubuntu 20.04 LTS), that doesn't give any matches)

But what I would really like is a command that only matches on the exact command. Does anyone know how to do that?latest?d=yIl2AUoC8zA latest?i=qR3bz76dTOI:deQUY6JWQgo:F7zBnMy latest?i=qR3bz76dTOI:deQUY6JWQgo:V_sGLiP latest?d=qj6IDK7rITs latest?i=qR3bz76dTOI:deQUY6JWQgo:gIN9vFwqR3bz76dTOI
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments