Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I want to build a Linux based OS which is custom made for only one application and is totally light-weight and uses minimum system resources. How do I go about this?

Would stripping down an already existing OS such as Ubuntu be a good idea?

share|improve this question
What kind of application? A graphical one that depends on many things like a X server, desktop environment, possible network access or other... Or an application like for an embedded system, that can be the only process running on the machine? –  Stephane Chazelas Jan 17 '13 at 11:08
@StephaneChazelas: Yes , it would typically support GUI. I would most probably host a gui based application, but my idea is that when i run that os, directly that application starts and when i close it, the os shuts down –  sreeraag Jan 17 '13 at 13:13
For your requirement, starting with compiling your own kernel from source would be the way to go. Compile the kernel from source and include only the applications that you want. Remember that everything that is not the kernel or a kernel module is an application. –  midnightsteel Jan 17 '13 at 17:44
add comment

3 Answers

If you want to build a Linux based OS that runs only what's necessary for the computer to work, and if you have time for that you should have a look at LFS.
It is a book that explains everything you need to know about compiling the linux kernel. Of course it takes a lot of time but in the end it's always a good idea to have a look. After you made your custom Linux distribution, then you can read BLFS (Beyond Linux From Scratch) to add some applications.
In the process of creating your Linux distribution, you will see how to launch the applications at startup.

By the way, forking Ubuntu is the WORST idea ever. It's absolutely not light and runs a bunch of applications at startup. I would recommend you Archlinux. It's a lot lighter than Ubuntu. Hope it helps.

Archlinux Link : https://www.archlinux.org/ As the title says, it's a lightweight distribution, might be just what you look for. Instead of building your own distribution, just give a shot at Arch and make your application run at the startup, it's not that complicated.

share|improve this answer
add comment

This one might be a kind of opposite answer.

Take a look at DSL(Damn Small Linux). This might be what you need. This one is actually built to be used on a system with low hardware configuration like low memory. It comes with basics components like just vim and nano editor, a browser, a remote-desktop viewer, and some other basic features. Checkout this wiki link for more info on it.

share|improve this answer
add comment

The basic idea would be to start your application as init (but be careful, process 1 is very special). Perhaps start with one of the mini-distributions, and work from there? Or even set up an initramfs with what is needed, and never leave it?

Also consider carefully if the savings of not having even a minimal userland available are worth the absolute impossibility of troubleshooting/tweaking.

share|improve this answer
add comment

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.