Is there a distribution or a way to completely lockdown Linux from the get go?

4

What I mean by that is to have a barebones version of Linux installed with only the essential services running and only enabling services that are needed as they arise?

Also is there a complete list of services that traditionally run on Linux, what they do, their relationships with other services, etc. For example I am aware that to run Gnone or KDE I need to have the X Window system installed.

PeanutsMonkey

Posted 2011-07-24T23:37:53.930

Reputation: 7 780

What are you trying to accomplish? – Joe Internet – 2011-07-24T23:49:20.170

@Joe Internet - A few things. The first being the system being completely locked down as to avoid unnecessary services running. The second being getting an understanding of what are the dependencies. – PeanutsMonkey – 2011-07-25T01:43:41.600

Answers

4

The best way to get almost exactly what you're looking for is Linux From Scratch where you build develop and compile only the pieces of the system you want. That being said, some distributions do give you a bit more control over what's installed when you finish. I would say Slackware and Gentoo are the two that spring to my mind as being the leanest on what's installed by default.

You can also look into SELinux (Security-Enhanced Linux), although that's not a specific distribution. Various distributions may have SELinux options to look into.

With regards to the relationships into what software has dependencies on other software, that's going to be very broad. Each piece of software will probably have to be researched to determine exactly what is needed. Especially if you're going the barebones route. For example, if you want any graphical capabilities, you will definitely need the X environment. But even that may have some items that can be culled from installation. There are even multiple X environments out there. I believe X.org is the current popular system, but there's also XFree86 as an option.

Matrix Mole

Posted 2011-07-24T23:37:53.930

Reputation: 3 303

Thanks Matrix Mole. In terms of the dependencies, is it possible to determine through some sort of package management what the dependencies are e.g. Gnome requires the X Window system and a list of other packages. In terms of research is there a specific source I can refer to? – PeanutsMonkey – 2011-07-25T01:45:49.053

As far as looking for dependencies of software, most of the package management systems have some method of looking into the dependencies. For example, with Gentoo you can look through their dependency trees or use the pretend option to see what packages will be necessary for an installation. The best source for researching any software is the developer or community site to begin with. – Matrix Mole – 2011-07-25T03:04:43.787

Thanks Matrix Mole. I could theoretically achieve the same with Red Hat, Debian or any other distribution i.e. install the least number of applications, services, etc and use the package manager e.g. rpm or dpkg to validate the dependencies required. Is that right? – PeanutsMonkey – 2011-07-25T03:51:19.293

You could achieve the same result with the other distributions, but from my experience Red Hat, Suse, and Debian generally have too much stuff installed that a typical end user is not aware of (I compare it to how windows has a bunch of stuff active without end user knowledge). – Matrix Mole – 2011-07-25T16:23:51.530

1

Start with a minimal install - debian and ubuntu definately have these, or go for a more 'expert' oriented distribution - such as gentoo.

With the former, you will pull in what you need as you install things (so you can install something like this - look up for things like ubuntu minimal or such)

With gentoo, the handbook tells you what to install. Its more time consuming, but eventually you work what needs what, and end up with a better understanding of the system. If you're a newbie, i suggest using the livedvd to install, since you can look up the handbook on the same system you run the rather oldschool install process.

Journeyman Geek

Posted 2011-07-24T23:37:53.930

Reputation: 119 122

1I'd probably go with Arch instead of Debian (old packages) or Ubuntu (nonstandard in some ways, and not designed for what you want). Gentoo is closer to what you want, but with Arch you get the same benefits (rolling-release cycle, ability to install exactly what you want) without the ridiculous compile times. – user55325 – 2011-07-25T00:27:35.333

@user55325 - Thanks. What do you mean by rolling-release cycle and ridiculous compile times? – PeanutsMonkey – 2011-07-25T01:47:33.000

1rolling release cycle = the OS is CONTINUALLY being updated, so you don't have specific releases. gentoo compiles everything from scratch and takes ages to install a package. on the other hand, their documentation is just hard enough to be a good and proper learning experience. – Journeyman Geek – 2011-07-25T01:51:54.723

0

A bit on the antique side so that it may not be as secure as a less "optimized" modern version, but there is always Tinfoil Hat Linux.

dmckee --- ex-moderator kitten

Posted 2011-07-24T23:37:53.930

Reputation: 7 311