How can I view the source code of open source programs in linux(ubuntu)?
Tuesday, July 20th, 2010 at
19:37
Linux reviews applications open source from SUSE Mandrake Mandriva Centos Redhat Debian and more
Generally you get the source code from the projects version control repository. This will require that you install an appropriate client to access said repository. Usually these repos are SVN or GIT but this may vary.
If they let you actually download the source as a archive, then you can view any of the source files in a text editor of your choice.
If you tell us what program, then someone may be able to give you a more detailed answer.
Source code is in text files that any text editor or viewer can display. With large projects, these text files are sometimes stored in archives that can be modified by several contributors. If you are looking at the source of a finished, end-user program, the code will probably be scattered over dozens of files, usually bundled together in a compressed file to save space (a zip or tar file is common.) You’d need to extract the files before viewing them.
I’d just like to interject for a moment.
What you’re referring to as Linux, is in fact, GNU/Linux, or as I’ve recently taken to calling it, GNU plus Linux. Linux is not an operating system unto itself, but rather another free component of a fully functioning GNU system made useful by the GNU corelibs, shell utilities and vital system components comprising a full OS as defined by POSIX.
Many computer users run a modified version of the GNU system every day, without realizing it.