Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm very new to Ubuntu. I'm looking at the directory /usr/include it contains lot of header files. I know they have specified certain constants and other information that are used in Ubuntu. I'm confused with the use of it.

One of the directory inside is linux/byteorder. Which has two files:

big_endian.h  little_endian.h

I wonder why two files are needed? My machine will be either big endian or little endian right? Didn't ubuntu while installation didn't pick my system byte order? Does /usr/include is just same for all machines? What is the exact use of it?

Thanks in advance.

share|improve this question
up vote 4 down vote accepted

That folder includes the header files for C compilers. Such as "stdio.h", "stdlib.h" etc.

When you type header information in the C source file such #include <stdio.h> the compiler will look for the file in /usr/include directory by default.

big_endian.h and little_endina.h files are included, because though your computer may be of only one kind, you can cross-develop application for both architecture. So, you need both header file.

share|improve this answer

These files are needed when you compile programs, be that a software package you need to compile manually or your own programs. They are included in the C code such that you can use the functions defined there. Don't worry about them if you don't code.

share|improve this answer

Yes but you may decide to develop a cross platform app.

And when you write program for the other machine which is different endian than yours. Then may be these files are used to compile such programs. :)

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.