0

I was curious as to which language was utilities built into the Linux kernel was written in such as grep, cut, awk, find etc.

Are these compiled and can not be cat'ed and viewed?

RedHatcc
  • 3,016
  • 4
  • 16
  • 13

2 Answers2

4

The Linux kernel is written in C primarily. You can get it with:

  git clone git://github.com/torvalds/linux.git

and then look at anything you please. Supporting commands, awk etc, can be found at GNU Software under 'All GNU Packages'.

GoZoner
  • 67,920
  • 20
  • 95
  • 145
  • This is also true (that they are primarily written in C) of a significant percentage of the utilities that make up most Linux distributions. I'm sure there are some that are written in other languages, and there are a lot in various shell/scripting languages (perl, python, bash, wish, etc...). – twalberg Apr 12 '13 at 15:56
4

The GNU tools can be found on the GNU project hosting page http://savannah.gnu.org/.

There you can review the source code of, for example, grep: http://git.savannah.gnu.org/cgit/grep.git.

Linux itself is not an operating system but the kernel. The tools you're mentioning form the so called userland, which is separated from the kernel. Combining the GNU tools with the Linux kernel (and some glue) forms the GNU/Linux operating system.

nemo
  • 55,207
  • 13
  • 135
  • 135