Types and dialects of Linux
Linux Tips by Burleson Consulting
What is Linux?
Linux is an operating system loosely based on UNIX, a
popular mainframe operating system which was originally developed in the 1960s
by AT&T's Bell Laboratories. This is why Linux is often referred to as a
"UNIX-like" operating system.
Just like Microsoft Windows, Linux controls the computer
hardware, does it's best to keep all your devices playing nicely together and
gives you an interface to run things on the computer. Unlike Microsoft Windows
there are several groups (some commercial, some non-profit) who make Linux
A Short History of Linux
Having a little background on Linux helps to understand why
things are the way they are. Originally written in 1991, Linux is a
relatively young operating system compared to its UNIX counterparts
that have their origins in the late 1960s. The Linux kernel, the
core of any Linux operating system, was conceived, created, and
named after Linus Torvalds.
Linus? intent was to create a free operating system for himself
and other hobbyists. Soon after Linus announced his project, several
other software developers started to contribute code to the Linux
and port software to
compile it to work with the Linux kernel.Interest in the project skyrocketed and many formal releases of
Linux followed. Linux gained popularity as more tools and
capabilities were introduced, especially among educational
Today Linux has found applications from education to
industry and in devices ranging from supercomputers to television
remote controls.A fairly early version of the Linux kernel has been distributed
under the GNU (General Public License)
that allows it to be used at no cost for free or commercial
projects. Linus Torvalds still oversees code changes to the Linux
kernel, but today Linux development goes far beyond the kernel.
The Linux kernel is typically packaged into a distribution, often
referred to as a distro, of Linux to provide a full set of tools for
a specific purpose. The tools shipped with a Linux distro vary quite
a bit and include compilers, web servers, graphical interfaces and
an array of command line tools.
Of the hundreds of Linux
distributions, only a few are appropriate for running Oracle
databases and those are the ones that will be focused on in this
book.Through the years, UNIX operating systems, e.g. Solaris, AIX, and
HP/UX, have enjoyed considerable popularity with servers due to
their stability and inherent ability to serve multiple users and
multiple applications simultaneously.
Linux shares these features,
but is referred to as a UNIX-like operating system as it is not
certified as or necessarily completely compliant with the standard
tools and interfaces defined within the Single Unix Specification.
Choosing the Right Linux for Oracle
A top-down approach is best for choosing the right Linux for your
your application. Start with the requirements of the software that
will be used on the system, then consider the requirements of the
appropriate database version, which is probably dictated by the
application.There are three layers to be concerned with when configuring a
system: the platform, which
refers to the type and capability of the server hardware, the
distribution (distro)of Linux,
and the version. Oracle supports a small handful of options for each
of these layers.
Choosing the best Hardware Platform
for Oracle Linux
The first concern is the hardware platformyou intend to use. The most popular hardware platforms
are the x86
and x86_64platforms that use hardware derived from the popular
Intel series of PC processors. The x86_64 platform represents
hardware capable of more advanced 64-bit processing. x86_64 has
become popular in servers and is gaining popularity in desktop
32-bit platforms were limited to addressing 4 GB of memory.
There are acceptable workarounds that allow the DBA to
address up to 64 GB of memory, but 64-bit Linux can natively
address these larger memory sizes and offers other
Older versions of Oracle that support Linux are on several other
hardware platforms including PowerPC, Itanium and zSeries, but as of
the writing of this book, Oracle 11g on Linux is only supported on
the x86 and x86_64 hardware platforms.
The Linux kernel
The heart of a Linux system is a program called the
kernel. The kernel controls security, processors, memory, disk and everything
else about the system.
The kernel is what allows multiple users to be on a
Linux system at the same time running dozens, possibly even thousands of things
at once without interfering with each other. While we won't talk too much more
about the kernel, it's just important to remember that it's there keeping
everything in check.
The Many Breeds of Linux
You may have already noticed that there are a ton of
different Linux versions out there. Many meet only a very specific need while
others compete in the mass market for servers and workstations. Here are a
couple of the Linux distributions which are popular right now:
Red Hat Enterprise Linux
www.redhat.com/rhel/ - This is the commercial version of Linux used
for the examples in this book. It is a popular option for both servers and
workstations because it is both feature-rich and well supported.
www.redhat.com/fedora/ - Sponsored by Red Hat, this community
supported version of Linux is available for free. The free price tag makes this
a great version to work with if you don't have (or want to pay for) a license
for Red Hat Enterprise Linux, but be careful, some applications which are Red
Hat compatible may not work on Fedora.
- Ubuntu is a Linux-based operating system which has recently gained some
popularity. It is easy to install and the desktop version comes with many of
the applications you would want on your workstation.
Mileage May Vary
Because no two distributions are quite the same you may
find that some commands and options may not work, or may not work as described
on your variety of Linux. The examples in this book were done on RedHat Linux.
Almost all will work on most flavors of Linux but even a different version of
RedHat will vary some.
Installation of Linux varies from distribution to
distribution. If you do not already have a Linux system to work on you may want
to download one of the versions mentioned above and install it on a spare
machine. Unless you are experienced at installing Linux I suggest you choose a
machine you will not use for anything else. It is quite possible (even easy) to
erase your entire hard drive while installing Linux, so take an old system (it
doesn't have to be too fast) that you don't need any of the data on and follow
the instructions that come with your distribution to install Linux.
What is a shell?
All the commands we run in this book are run in a Linux
shell. A shell in Linux is the software which allows you, a human, interact
with the inner workings of the UNIX operating system. Because of the shell we
get to use commands that resemble our natural language (though sometimes only
just barely) to control the behavior of the computer. There are other types of
shells in computing, but this is the only type we're concerned with for this
Beyond the ability to use somewhat intuitive commands
individually, the shell also gives us the ability to combine these commands into
shell scripts. A shell script can contain one command or hundreds and the
commands could be nearly anything you could do from within the shell.
The bash shell
There are, of course, many kinds of shells. Each has
its strengths and weaknesses but we're mostly concerned with the Bourne-Again
Shell (bash) which is the default for users in Linux.
If you think your shell may not be bash don't worry.
We'll talk about how to change it later, but for now you can change it
temporarily simply by typing bash.
Getting to the shell
You can access a Linux shell in several different ways.
You may access the shell by sitting at a Linux computer where the shell is
displayed on screen or you may use a secure protocol to enter a shell on a
system thousands of miles away.
In some environments you may use a telnet client or,
more likely a secure ssh client to connect to a Linux machine. This will depend
largely on how you your machine and your environment is set up. If you are
connecting remotely through one of these clients you should talk with the person
who set the machine up to find out how to connect.
Once you're at the Linux command line almost everything
works the same whether you're at the keyboard of the system you work on or at a
workstation half way around the world.
A few quick tips
Here are a few things that it might help you to know
from the beginning. They may seem out of place here, but will make more sense
as we get into using Linux.
No news is good news
One thing you will have to get used to is that when you
run many common Linux commands if things go right you will not get any
feedback. There are very few Linux commands which will tell you "Operation
completed successfully." More likely they will tell you nothing unless
something goes wrong. So basically don't worry if you don't get any feedback
from Linux. It'll give you an error if there's a problem.
One feature of the bash shell that we will be using is
the ability to complete partially typed commands and file names with the tab
key. If you type in enough of the command or file to uniquely identify what
you're looking for, then press tab Linux will complete the file or command. Try
it out once we get started. It can save you a lot of typing.
Repeating recent commands with the up arrow
If you want to repeat a recently executed command, or
even repeat it with a slight modification, the bash shell will allow you to
recall it using the up arrow. The up and down arrows will allow you to go back
and forth through your recently typed commands to recall them for execution.
This can be very useful if you make a typo and don't want to retype the entire
Getting More Help
While we will cover a lot
of ground in this book you may find topics here which you want to learn more
about. Linux provides a couple resources available right at the command line to
give you more information on commands.
Whenever detailed help is needed with command syntax or
with command options, the manual (man) command can be used to display all of the
information about the specified command. The information will be displayed one
screen at a time. Pressing the space bar will advance the next screen. At the
end of the display, the Q command can be used to quit.
The man command should be followed by the name of the
command with which help is needed, as shown in the following example:
$ man w
User's Manual W(1)
w - Show who is logged on and what they are doing.
w - [husfV] [user]
w - displays information about the users
currently on the machine, and
their processes. The header shows, in this order, the current time,
how long the system has been running, how many users are currently
logged on, and the system load averages for the past 1, 5, and
The following entries are displayed for each user:
login name, the tty name,
the remote host, login time, idle time, JCPU, PCPU, and the command line
of their current process.
The JCPU time is the time used by all processes
attached to the tty. It does
not include past background jobs, but does include currently running
The PCPU time is the time used by the current
process, named in the "what" field.
Command Line Options
Don't print the header.
Ignores the username while figuring
out the current process and cpu times. To demonstrate this, do a "su" and do
a "w" and a "w -u".
Use the short format. Don't print
the login time, JCPU or PCPU times.
Toggle printing the from (remote
hostname) field. The default as released is for the from field to not
be printed, although your system administrator or distribution maintainer
may have compiled a version in which the from field is shown by default.
Display version information.
Show information about the specified
information about who is currently logged
/proc process information
The man pages can be a bit confusing but they will often
contain options which are not covered in this book. Be careful when using a new
option for any command.
In situations where users are unsure which command
should be used for a particular function, the info command can be used. The info
subsystem contains information about all of the commands and utilities available
within the system. The info system even gives tips for navigating within the
info subsystem. The info command is entered to simply invoke the info subsystem.
The info subsystem even offers the capability of
entering information about any commands, scripts, etc. for documentation
Get the Complete Details on
Linux System Management for Oracle DBAs
The landmark book
"Linux for the Oracle DBA: The
provides comprehensive yet specific
knowledge on administering Oracle on Linux. A
must-have reference for every DBA running or planning to run
Oracle on a Linux platform.
for 30% off directly from the publisher.