How do you find which package a file belongs to?

IntermediateConceptLinux and shell
Answer
dpkg -S /usr/bin/curl        # Debian/Ubuntu
rpm -qf /usr/bin/curl        # RHEL/Rocky/Amazon Linux
All Real-World Interview questions Roadmap: Interview readiness

More on Linux and shell