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?

Orcris
  • 521

1 Answers1

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
fossfreedom
  • 172,746
  • This will download all the files to the current directory. Make sure you run it from where you want the files. – Zoke Jan 30 '12 at 18:28