用apt-file
查看。
sudo apt install apt-file
sudo apt-file update
搜索javac
是由哪个包提供的:
apt-file search -x "javac$"
其中-x
表示使用正则表达式。输出:
bash-completion: /usr/share/bash-completion/completions/javac
openjdk-11-jdk-headless: /usr/lib/jvm/java-11-openjdk-amd64/bin/javac
openjdk-8-jdk-headless: /usr/lib/jvm/java-8-openjdk-amd64/bin/javac
来源:https://www.cyberciti.biz/faq/equivalent-of-rpm-qf-command/