How to get source code in Ubuntu

     You must want to get the source code of some linux program when learning linux programming. eg. when write more command demo, you want the source code of the more already run on you linux system.

    It's quite convenient on Ubuntu to get the source code with command apt-get source. But first, you had got to konw the actual name of the package. dpkg --get-selections  can help a lot, which list all installed package.

    For example, if you want to get the source code of more, you got to kown which package it's in. We can just  google or something else.   

    Now suppose we know the package name is util-linux. We can check it with dpkg --get-selections.Then we just type

 

apt-get source util-linux

      Some files will be downloaded.

你可能感兴趣的:(source,more,util-linxu)