You are on page 1of 5

What is Linux From Scratch?

Linux From Scratch (LFS) is a project that provides you with step-by-step instructions for building your own
customized Linux system entirely from source.

Why would I want an LFS system?


Many wonder why they should go through the hassle of building a Linux system from scratch when they
could just download an existing Linux distribution. However, there are several benefits of building LFS.
Consider the following:

LFS teaches people how a Linux system works internally


Building LFS teaches you about all that makes Linux tick, how things work together and depend on each
other. And most importantly, how to customize it to your own tastes and needs.

Building LFS produces a very compact Linux system


When you install a regular distribution, you often end up installing a lot of programs that you would
probably never use. They're just sitting there taking up (precious) disk space. It's not hard to get an LFS
system installed under 100 MB. Does that still sound like a lot? A few of us have been working on creating
a very small embedded LFS system. We installed a system that was just enough to run the Apache web
server; total disk space usage was approximately 8 MB. With further stripping, that can be brought down to
5 MB or less. Try that with a regular distribution.

LFS is extremely flexible


Building LFS could be compared to a finished house. LFS will give you the skeleton of a house, but it's up
to you to install plumbing, electrical outlets, kitchen, bath, wallpaper, etc. You have the ability to turn it into
whatever type of system you need it to be, customized completely for you.

LFS offers you added security


You will compile the entire system from source, thus allowing you to audit everything, if you wish to do so,
and apply all the security patches you want or need to apply. You don't have to wait for someone else to
provide a new binary package that (hopefully) fixes a security hole. Often, you never truly know whether a
security hole is fixed or not unless you do it yourself.

What can I do with my LFS system?


A by-the-book LFS system is fairly minimal, but is designed to provide a strong base on which you can add
any packages you want. See the BLFS project for a selection of commonly used packages.

What is Beyond Linux From Scratch?


Beyond Linux From Scratch (BLFS) is a project that continues where the LFS book finishes. It assists
users in developing their systems according to their needs by providing a broad range of instructions for
installing and configuring various packages on top of a base LFS system.

Why would I want a BLFS system?


If you are wondering why you would want a BLFS system or don't know what LFS is, then you don't want
to be here just yet — you should head over to the LFS Project Homepage where all will be explained.

What can I do with my BLFS system?


Nearly anything! An LFS system is primed to become a system that fits whatever need you have. BLFS is
the book that takes you down your own custom path. You could build an office workstation, a multimedia
desktop, a router, a server, or all of the above! And the best part is you only install what you need.

Package Management
Some package formats:

 Ubuntu – deb/dpkg
 Red Hat – RPM and YUM
 Solaris – pkgadd

What is a package management system?

 Set of tools/utilities to make it easier to install, upgrade, remove and configure software
packages.
 Typically connect to the internet and download packages from remote servers

Why are some better than others?

 Package managers that do not recursively get dependencies are more difficult to use.

Ubuntu uses APT (Advanced Packaging Tool)


 Synaptic and aptitude are Front End interfaces
 Synaptic has GUI
 aptitude has text based GUI

APT uses /etc/apt/sources.list to list which servers to download the packages from

 Can add more servers and more packages


 Can setup your own repositories (repos) for package distribution - this is a must in high
security environments

There are 3 steps to installing software on Ubuntu

First step, always update your sources:

 apt-get update

Second step, apply upgrades


 apt-get upgrade

Third step, install whatever you want:

 apt-get install "package name" such as apt-get install openssh-server

Red Hat uses YUM


YUM uses /etc/yum.repos.d/ to list which servers to download the packages from

 Can add more servers and more packages


 Can setup your own repositories (repos) for package distribution - this is a must in high
security environments

There are 2 steps to installing software on Red Hat

First step, always update your sources:

 yum update

Second step, install whatever you want:

 yum install "package name" such as yum install openssh-server

Linux Notes from video:


 So Linux distributions are anything that contains the Linux kernel.
 The kernel is the core of the operating system.
 Desktop environments may include such versions as like KDE or Gnome or XFCE or Flux
 Long term support or LTS version of Ubuntu.
 Distributions:
 Mint, ubuntu, knoppix, CentOS, Fedora, Scientific Linux, Arch, Gentoo, Slackware

Distributions:
1. CentOS - It's the binary equivalent of Red Hat and runs great for servers in the enterprise
2. Ubuntu - Runs great as a desktop. There are many flavors of Ubuntu however depending on
what GUI you want.
SSH:
SSH is capable of:

 Shell Access
 File transfers
 Executing remote command
 Port forwarding and tunneling
 Creating VPN
 Forwarding X displays
 Encrypted proxy browsing (via SOCKS)
 Mounting remote directories

Execute commands

 ssh user@hostname [command]

Copying files:

 sftp – secure ftp


 scp fileName user@host:/home/user/fileName
 Based on sftp, but meant to replace rcp

Authentication Mechanisms

 Password
 Public-key
 Keyboard-interactive

1. Multiple passwords required (SecurID, etc.)

 GSSAPI (Generic Security Services Application Program Interface)

1. Extensible to provide for Kerberos, NTLM, etc.

There is a great resource out there that gives examples of some of what the features listed above
can do.

http://www.sshcommands.co.uk/

You might also like