This document will give you an overview of Red Hat Enterprise Linux. After completing this, you will be able to:
- List the features of Red Hat enterprise Linux
- Use some basic commands of Linux
- Describe the Linux file system hierarchy
Index
History
Red Hat Linux is one of the most popular Linux distributions, assembled by Red Hat.
It is one of the “middle-aged” Linux distributions; 1.0 was released in November 3, 1994. It is not as old as Slackware, but certainly older than many other distributions. It was the first Linux distribution to use RPM as its packaging format, and over time, has served as the starting point for several other distributions, such as the desktop oriented Mandriva Linux (originally Red Hat Linux with KDE), Yellow Dog Linux (which started from Red Hat Linux with PowerPC support) and ASPLinux (Red Hat Linux with better non-Latin character support).
However, Red Hat Linux lacks several features due to possible copyright and patent problems. For example, MP3 support is disabled in both Rhythmbox and XMMS; instead, Red Hat recommends using Ogg Vorbis, which has no patents.
Features of Red Hat Linux
More or less, all Linux distributions are similar as they use the Linux kernel, the GNU free software, command-line programs, manual pages and documentation. However, Linux distributions differ in a number of features they exhibit. Some of the reasons to use Red Hat Linux are as follows:
- Red Hat Linux is the most popular Linux distribution – For several years, Red Hat Linux has been on top of the list.
- Red Hat Package Manger – Red Hat Linux uses a sophisticated software management tool called the Red Hat Package Manager or the RPM.
- Graphical Administration Tools – Red Hat Linux can be entirely managed from a graphical user interface (GUI).
- Security – Red Hat leads the distributors’ list for providing the most up- to-date security features.
- Documentation – Red Hat provides a user and installation guide, in several formats available in electronic form, on its CD-ROMs. Also, it makes on-line help available throughout the Linux installation process through various help buttons.
- Installation – Installation in Red Hat Linux is flexible. You can select a graphical, text-based or automatic installation.
Some Simple Commands
Some of the commonly used commands are discussed below:
• alias – Create an alias.
$alias exmple=’rm -r’
$exmple
• cal – Display a calendar.
$cal
• cat – Display the contents of a file.
$cat file1
• chgrp – Change group ownership.
$chgrp group1 file1
• chmod – Change access permissions.
$chmod 777 file1
• chown – Change file owner and group.
$chown user1:user1 file1
• chroot – Run a command with a different root directory.
$chroot /mnt/sysimage
• crontab – Schedule a command to run at a later time.
$crontab -e
• pwd – To identify the exact location of current directory.
$ pwd
• ls – To view the contents of the directory.
$ ls
• mkdir – To create a new directory.
$ mkdir dir1
• cd – To change the directory.
$ cd dir1
• cp – To copy a file from one location to another.
$ cp file1 dir1
• mv – To move a file from one location to another.
$ mv file1 dir1
• su – To change the login directory.
$ su user1
• locate – To find a file or a directory.
$ locate file1
• clear – To clear the contents in the shell window.
$ clear
Linux File System Hierarchy
Like UNIX, Linux chooses to have a single hierarchal directory structure. Everything starts from the root directory, represented by /, and then expands into sub-directories instead of having so-called ‘drives’. In the Windows environment, one may put one’s files almost anywhere: on C drive, D drive, E drive etc. Such a file system is called a hierarchical structure and is managed by the programs themselves (program directories), not by the operating system. On the other hand, Linux sorts directories descending from the root directory / according to their importance to the boot process.
To comply with the FSSTND, the following directories, or symbolic links to directories, are required in ‘/’.
/ — the root directory
/bin Essential command binaries
/boot Static files of the boot loader
/dev Device files
/etc Host-specific system configuration
/lib Essential shared libraries and kernel modules
/mnt Mount point for mounting a filesystem temporarily
/opt Add-on application software packages
/sbin Essential system binaries
/tmp Temporary files
/usr Secondary hierarchy
/var Variable data
The first thing that most new users shifting from Windows will find confusing is navigating the Linux file system. The Linux file system does things a lot more differently than the Windows file system. This section explains those differences and takes you through the layout of the Linux file system.
For starters, there is only a single hierarchal directory structure. Everything starts from the root directory, represented by ‘/’, and then expands into sub-directories. Where DOS/ Windows have various partitions and then directories under those partitions, Linux places all the partitions under the root directory by ‘mounting’ them under specific directories. Closest to root under Windows would be c:.
Under Windows, the various partitions are detected at boot and assigned a drive letter. Under Linux, unless you mount a partition or a device, the system does not know of the existence of that partition or device. This might not seem to be the easiest way to provide access to your partitions or devices, but it offers great flexibility.
This kind of layout, known as the unified file system, does offer several advantages over the approach that Windows uses. Let’s take the example of the /usr directory. This directory of the root directory contains most of the system executables. With the Linux file system, you can choose to mount it off another partition or even off another machine over the network. The underlying system will not know the difference, because /usr appears to be a local directory that is part of the local directory structure.
How many times have you wished to move around executables and data under Windows, only to run into registry and system errors? Try moving c:windowssystem to another partition or drive.
Another point likely to confuse newbies is the use of the frontslash ‘/’ instead of the backslash as in DOS/Windows. So, c:windowssystem would be /c/windows/system. Well, Linux is not going against convention here. Unix has been around a lot longer than Windows and was the standard a lot before Windows was. Rather, DOS took the different path, using ‘/’ for command-line options and ” as the directory separator.
To liven up matters even more, Linux also chooses to be case sensitive. This means that the case, whether in capitals or not, of the characters becomes very important. So, “this” is not the same as “THIS” or “ThIs” for that matter. This single feature probably causes the most problems for newbies.
Like all modern operating systems, Linux also uses a hierarchical directory structure. That is, files are stored under directories. The Linux file hierarchy is based on UNIX. Every part of the file system can be traced back to one central point, the ‘root’. The file hierarchy appears like an inverted tree shown in figure 2.1, where ‘root’ is at the top with several branches at the bottom. This reduces the search time and provides faster access to a file.
The Linux file system is spread over several physical devices. Different parts of the file hierarchy may exist on totally separate partitions on the hard disks, CD-ROMs, Network File System (NFS) shares and floppy disks. Some directories are put on separate partitions or systems for easier backups or security concerns. Other directories have to be on the root partition, because they are vital for the boot process.
Directory | Contains |
bin/ | Required Boot-time binaries |
boot/ | Boot configuration files for the OS loader and kernel image |
dev/ | Device files |
etc/ | System configuration files and scripts |
home/ | User/Sub branch directories |
iib/ | Main OS shared libraries and kernel modules |
lost+found/ | Storage directory for “recovered” files |
mnt/ | Temporary point to connect devices to |
proc/ | Pseudo directory structure containing information about the kernel, currently running processes and resource allocation |
Directory | Contains |
root/ | Linux (non-standard) home directory for the root user. Alternate location being the / directory itself |
sbin/ | System administration binaries and tools |
tmp/ | Location of temporary files |
usr/ | Difficult to define – it contains almost everything else including local binaries, libraries, applications and packages (including X Windows) |
var/ | Variable data, usually machine specific. Includes spool directories for mail and news |