5

Possible Duplicate:
How do I get the source code of packages installed through apt-get?

I want to look over some programs to help me learn programming, so I enabled the source repository in Ubuntu. How do I download things from that repository?

1
  • ... actually - I think your question is actually a duplicate...
    – fossfreedom
    Jan 30, 2012 at 18:38

1 Answer 1

6

First - create a working folder to download the source in

mkdir ~/working_dir
cd ~/working_dir

The simplest way is to use the syntax apt-get source [foo] where [foo] is the package name.

For example - if you wanted to see the source of nautilus you would use

apt-get source nautilus

basic development tools

Obviously - if you are intent on playing with code changes you need a few extras.

sudo apt-get install devscripts build-essential fakeroot

building packages

To get install the development packages and dependencies use the syntax

sudo apt-get build-dep [foo]

Finally - to build the debian package

debuild -us -uc
1
  • This will download all the files to the current directory. Make sure you run it from where you want the files.
    – Zoke
    Jan 30, 2012 at 18:28

Not the answer you're looking for? Browse other questions tagged .