Everything that includes the source code of Unix programs for example compiling, installing or how to retrieve the code for studying.

learn more… | top users | synonyms

304
votes
7answers
27k views

How can I find the implementations of Linux kernel system calls?

I am trying to understand how a function, say mkdir, works by looking at the kernel source. This is an attempt to understand the kernel internals and navigate between various functions. I know mkdir ...
26
votes
6answers
12k views

determining path to sourced shell script

Is there a way for a sourced shell script to find out the path to itself? I'm mainly concerned with bash, though I have some coworkers who use tcsh. I'm guessing I may not have a ton of luck here, ...
20
votes
5answers
5k views

Where does uname get its information from?

Where does uname really get its information from? I figure this is something that should be straightforward. Unfortunately, I can't find any header containing just that information. Say someone ...
18
votes
4answers
3k views

What is the difference between building from source and using an install package?

It was wondering: when installing something, there's an easy way of double clicking an install executable file, and on the other hand, there is a way of building it from source. The latter one, ...
17
votes
5answers
1k views

How to compile and install programs from source

This is an issue that really limits my enjoyment of Linux. If the application isn't on a repository or if it doesn't have an installer script, then I really struggle where and how to install an ...
15
votes
13answers
2k views

Distros that support compiling from source

A long time ago I used to use FreeBSD with its ports system and after that Gentoo for portage in order to install applications via compiling from source. I did this in order to directly target my ...
15
votes
2answers
3k views

Why are there no -dev packages in Arch Linux?

I understand that source based distributions like Gentoo or Slackware do not need *-dev versions of programs. They include the source code as well as header files for compiling everything locally. ...
14
votes
1answer
6k views

What does a kernel source tree contain? Is this related to Linux kernel headers?

In books, I typically read references to the Linux Source Tree at /usr/src/linux with the usual set of subdirectories (arch, block, crypto, ...). I was expecting this tree to contain the binary files ...
14
votes
3answers
2k views

Given a git patch id, how to find out which kernel release contains it?

Assume I have some issue that was fixed by a recent patch to the official Linux git repository. I have a work around, but I’d like to undo it when a release happens that contains my the fix. I know ...
12
votes
5answers
54k views

How to install tarball packages on a Debian based distribution?

I would like to know how to install .tar.bz and .tar.bz2 packages on Debian, please give me a complete explanation.
10
votes
2answers
872 views

Where is best place to find sources of standard linux command line tools?

Into: I like learning by reading sources. But it's tiring of searching them across internet splited on many many different project sites. I'd love to see central browsable repo with sources of many ...
9
votes
2answers
584 views

What languages are used to build Unix commands?

Examples of commands I'm referring to are ls, pwd, and cd. Also, how are these built? Do you have an example?
8
votes
2answers
2k views

What are the advantages of building tools/libs from source?

By building from source do you gain any benefits? Is the code better optimized to your hardware architecture? Is it optimized better in general? Why would someone choose to build from source rather ...
6
votes
2answers
3k views

Where can I find the source code for `uptime`?

I am learning Python. Till now I've been doing only basic Python coding. A day ago, I checked python implementation of tree command. Suddenly I thought of creating a Python clone for uptime. I don't ...
6
votes
2answers
2k views

How to grep on source code without catching comments

I search a way to grep on source code without having sometimes false-positive because of comments. For instance if I search on foo on this .c source code : /* * foo has changed [...] and is now a ...
6
votes
1answer
401 views

Source code of the screens of debian-installer

Where do I can find the source code of the screens of the installation process of Debian? I've tried: apt-get source debian-installer But in this package I do not see the source code. To be more ...
5
votes
4answers
113 views

Get list of required libraries when installing something from source

When installing something from source (say, Ruby 1.9.2), what command can I run to get a complete list of all the dependencies needed to install that application? Is this possible?
5
votes
2answers
9k views

Passing a variable to a bash script when sourcing it in another bash script?

Suppose I have in main.sh: $NAME="a string" if [ -f $HOME/install.sh ] . $HOME/install.sh $NAME fi and in install.sh: echo $1 This is supposed to echo "a string", but it echoes nothing. Why? ...
5
votes
3answers
5k views

Where can I find the source code of libgio?

I want to study how its GFileInfo components works.
5
votes
1answer
2k views

get kernel source code

I need a specific kernel version to compile it with some additional modules. When I typing: uname -r I get 3.8.0-29-generic I need this one. uname -a Linux "..." 3.8.0-29-generic ...
5
votes
3answers
5k views

Installing Git, Curl, and Expat from Source

I have a RHEL 6.4 VM provisioned by my companies internal KVM. We are having some trouble using yum (Cannot retrieve repository metadata, which Ive confirmed in this case is peculiar to my company's ...
5
votes
1answer
46 views

Find out which kernel source files were used when kernel was compiled

I am compiling the Linux kernel for my specific hardware and I only select the drivers/options which I really need. This is in contrast to a typical distribution kernel, where they compile almost ...
5
votes
2answers
200 views

What is the 't' folder?

I'm mainly a Windows guy, programming C#, but I often do use technologies that were intended for Linux machines like git, MySQL, perl scripts, memcached, php, etc... And therefore I am exposed to ...
4
votes
4answers
15k views

How to start changing linux source code to make custom OS?

I am doing Under Graduation in CS Major, have medium level knowledge in C, C++, and Java and also learned some operating system concepts (as they are in my course syllabus). I have heard that we can ...
4
votes
4answers
5k views

Source code of netstat

Can I view the source code of netstat on my Linux machine?
4
votes
3answers
1k views

Pointers in Learning Linux 0.01 Source code

I am trying to learn some real programming in C and the concepts of Linux. So i thought i will try by looking at the Linux kernel 0.01 version source. In my understanding, I could find the scratch ...
4
votes
4answers
93 views

When should one compile and install from source?

To install software on a Linux system, many tools like yum, apt-get, rpm, dpkg and so on are available to either fetch a package from a repository or install a downloaded package. Alternatively, it ...
4
votes
1answer
108 views

How to relate a kernel config setting to the source files?

Here is an example that will explain better: I have a selected the audio driver from the picture and i would like to browse through its source. How do i get to the path of the source files from ...
4
votes
1answer
422 views

Build binary and dependencies without sudo

I want to install a piece of software (rtorrent) from source to my home folder. It depends on ncurses, which is not installed. I've installed ncurses to my home folder by using the PREFIX option ...
4
votes
1answer
195 views

Get kernel source: apt-get install vs apt-get source

I'm looking forward to download a Linux Kernel to get to know how to modify it and how to compile it. I am using Debian distribution and I'm interested in the Debian-modified Linux Kernel rather than ...
4
votes
1answer
39 views

Do I have to publish kernel source if I release a custom kernel?

I have a kernel for an android phone ready for release. I always have the current source code already pushed to GitHub for release builds. However, I also have an experimental folder on my server ...
4
votes
2answers
188 views

printing .cpp file from command line using emacs

The goal is to print a set of *.cpp files on a network printer, but... in a way that the (color) printer prints the files like they appear in the c++ editor including the colors and highlighting. And ...
4
votes
1answer
113 views

Where should I keep the source files of the compiled applications?

I use Slackware Linux and I install most applications from the source. I would like to know how to manage the source files, specially the header files, so they are available to other applications.
3
votes
3answers
110 views

Where can I find sources for

Emacs lisp source code for .elc files? e.g. cal-mayan.elc Files in the /bin directory? e.g. cat, split, and echo
3
votes
2answers
261 views

Exploding amount of Debian source code lines

According to the table at the Source lines of code article at Wikipedia, the amount of Debian source code lines rapidly grew to over 324m LoC (Lines of Code) in 2009: 2000: 55-59m 2002: 104m 2005: ...
3
votes
5answers
188 views

source multiple files and output one file

I have a file name "conf1" containing variables like: name='john' last='' custom='1000' and another file name conf2 like this: name='john' last='star' I want to merge between them to one file ...
3
votes
1answer
713 views

Chat source code

Source code of chat program (used for dialog with modem) is open? If it is so, where I can find it? I'm try find it, but no success.
3
votes
1answer
134 views

Link a dependency in Synaptic to the one already installed from source

I want to install SVN version of Quantum GIS and already I have a SVN version of GRASS GIS. As instructed in QGIS Wiki here, I added the qgis repository to my sources.list file. Now I am able to see ...
3
votes
3answers
219 views

Source files with `*.in` extension

When poking around in some source code trees, sometimes I encounter files with extension "*.in", typically for non-compiled files that belong somewhere under /etc or /usr/share. For example, in ...
3
votes
2answers
301 views

Edit tree to output in custom format?

I'd like to get a custom output from the tree command, but unlike this question, I don't have a fixed format. I'd like to be able to give the command the format in an argument (for instance perhaps ...
3
votes
1answer
894 views

Confused about ident

I inherited a bunch of files that begin with the following statement at the top Ident:/some/path/to/a/file Ident seems to be related to C coding and make files but I am not really sure. None of the ...
3
votes
1answer
560 views

What does 'mergemaster' do that 'make distribution' doesn't?

After calling make installworld (or make world), there are two ways of updating source files in the new world: calling mergemaster -p or make distribution. I know that mergemaster calls make ...
3
votes
1answer
78 views

Is there any automatic tool for installing required libraries to compile a program from source?

I want to know if there is any tool that, given the output of configure, cmake, autoconf or whatever library/dependencies matcher you have; installs the required packages/sources for you from your ...
3
votes
1answer
82 views

Source code location for debugging on Debian?

From Debian's DebugPackage, I know the debug information file for an executable goes in /usr/lib/debug when creating two part executables (i.e., stripping the executable of its symbols and placing ...
3
votes
1answer
383 views

Modify and boot linux kernel on mobile device [closed]

During my education I have been developing Android iOS apps and websites for almost 18 months. Now, as my final year project, I am working on Linux source code with the goal to boot it on a mobile ...
3
votes
1answer
2k views

Unpacking kernel-source rpm off-system (OpenSuse)?

I'm using OpenSuse 11.2 from a LiveUSB USB flash/stick, which arguably has not much place on it. I need to get the Linux sources for this version of OpenSuse, as they are needed to build a driver for ...
2
votes
3answers
3k views

Running “patch” without generating *.orig and *.rej files

Is it possible to tell patch not to generate .orig and .rej files? I find it extremely annoying that patch creates these.
2
votes
1answer
3k views

Why does 'make' complain about a missing rule when I try to build a program from source?

I am a Linux novice, and I am attempting to compile scientific software called DL_POLY_Classic. I downloaded the zip file dl_class_1.6.tar.gz and unzipped it using the command tar xvzf ...
2
votes
1answer
96 views

How can I determine the date when a piece of software was installed from source?

I've been asked to find out when a specific version of software was installed. The only thing I have to go on are the modification times of the directories in question. I'm having a hard time ...
2
votes
2answers
2k views

Where to find the source code for ps?

I want to check out the source code for commands such as ps. It seems to be impossible to search LXR (linux.no) for "ps". Where do I find it?