Ubuntu: How to get the source code for a binary? [duplicate]


This question already has an answer here:

If I'm unhappy about something a binary does, let's say /sbin/ip, how do I find the source code and where to send a patch to?


  1. dpkg -S /sbin/ip to map from the binary to the package containing it (here, the package is "iproute2")

  2. Enable source code repos in sources.list (easiest done via the "Software & Updates" config dialog)

  3. sudo apt update to actually fetch the list of available sources

  4. apt source iproute2 to dump the source in the current directory.

New-style source packages will have a .dsc file which contains helpful information like the maintainer and git (or other VCS) repo location.

Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Next Post »