Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

One of the very good sources of knowledge is the FreeBSD code base. You can check it out from Subversion, and have a complete operating system in the .c and .h form. This is actually how I gained the proficiency in C. It exposes you to industry-grade C (e.g.: you'll learn about bits which are hard in C but are being used actively) Also if you ever get interested in operating systems, FreeBSD gives you a very nice transition, since both programs and the kernel are in the same repo.

To check out the FreeBSD source code, you can do:

svn co https://svn.freebsd.org/base/head

And if you want to know how 'cat' is implemented, go to bin/cat/.

Same for 'ls', 'find' etc..

Other than that, early source code of UNIX gurus is very good too. Check out the Plan 9 project from Bell Labs. It has a very clean code too:

http://plan9.bell-labs.com/sources/plan9/sys/src/



There is also an official mirror on Github. https://github.com/freebsd/freebsd




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: