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.

猜你喜欢

转载自lingceng.iteye.com/blog/1535149
今日推荐