HISTORY
In August 1991, a student form university of Helsinki in Finland began a post to the comp.os.minix, news group with word "Hello every body out there using minix, I am doing a free Operating System (Just a hobby, won't be big and professional like GNU) for 386 (486) at colons. Name Linus Torvalds."
The hobby he spoke of eventually become what we know today LINUX.
At that time UNIX and other operating systems were costly then PC hardware. While versions of UNIX have long been available for PC's. They never had the grace of power of operating available for mini computers, mainframes and today servers. This lack of accessing ultimately give birth to LINUX as a means to make a UNIX like operating system available on wide spread basis.
Today's Linus was developed with the assistance of programer's word wide; Linus Torvalds still retains control of evolving core of Linus operating system the Kernel ..0000000
In March 1992, version 1.0 of the Kernal was first official release of Linux.
MAIN FEATURE & ADVANTAGES OF LINUX
- Multitasking Capability:
Full multitasking and 32-bit support. Linux, is a real multitasking system allowing multiple users to run many programs on the same system at once. - Multiuser Capability: Multiuser operating system several users to use the same computer to carry out their computing job. Can run programs, access files and print documents at the same time.
- System Portability:
Linux has this outstanding feature that it is not written for specific hardware platforms. It can be ported to another system (installation) without the need to make any major changes. - System Security:
Several levels of security exits in Linux. - First level is system security is A login is simply the name that you supply to Linux to identify yourself to the operating system. Linux keeps track of which names are permitted to log in or access the system and only allows valid users to have access.
- Another level of security is when it comes to accessing files. Three permission "Read, Write & Execute" can be assigned by the owner of the file to each of his files. All of these permissions can be individually either granted or denied to all the users of the system.
- Third level of security allows users to encrypt data files on the disk so that even if someone manage to access then he can't make much sense of it.
- Linux Application:
- Text & Word Processing Application: In addition to commercial word processing software's such as Word Perfect, Star Office, Applixware, Linux offers powerful tools for editing text files and processing text in an automated fashion.
- Programing Languages:
There is a wide variety of programming and scripting languages & tools available for Linux. - Internal Tools:
In addition to supporting Well-Known software such as Netscape Communicator and Mosiac, Linux provide wide verity of internet software and full range of software needed to create internet services such as Web Server, Mail Server plus complete network support to connect to the internet via Local Network or Modem. - Databases:
Linux provide robust platform for running client server database application such as free database SQL and postgre available for Linux also commercial database such as Oracle, Sybase and Informix. - DOS & Windows Compatibility:
Linux can run DOS software with a high degree of stability and compatibility and offers several approaches to run Windows software, Wabi, Win3e, VM ware. - Linux is Free Software:
Linux kernel and most of the applications written for Linux are available for free on the Internet, often with no restriction on the copying and redistribution of the software. - Virtual Memory & Shared Libraries:
Linux can use a portion of your hard drive as virtual memory, expanding your total amount of available RAM. Linux also implements shared libraries, allowing programs that use standard subroutines to find the code for these subroutines in the libraries at runtime. This saves a large amount of space on your system. - Linux Support (almost) all of the Features of Commercial Versions of UNIX:
In fact, some of the features found in Linux may not be available on other proprietary UNIX system. - GNU Software support (Free Software's):
Linux supports a wide range of free software written by the GNU project, including utilities such as the GNU and C++ compiler, gawk, groff and so on. Many of the essential system utilities use by Linux are GNU software. - Built-in Support for Networking, Multitasking, & other features
- X Windows System:
The X Windows convert text base Linux to graphics Operating System A complete version of the X Windows System, known as XFree86, is available for Linux. The X Windows System is a very powerful graphics interface, supporting many applications.
HARDWARE REQUIREMENT
You can run entire system from a single, hi8gh-density 5.25-inch floppy, but Hardware requirement depends upon Linux software & accessories selection.
Component Minimum Good Pe
Processor 386 Pentium 133
RAM 4 MB 32 - 64 MB
Hard Disk 150 MB IGB
Display VGA, Mouse, CD-Rom
Linux Tools & Applications:
The outermost layer of the Linux operating system is its tools and applications. These tools can be invoked from the command line itself and help perform the day-to-day as well as complex tasks of the system.The Shell:
It is the command interpreter of the operating system. It accepts commands from users and analyses and interprets these commands.The Linux Kernel:
It is the core of the system. It controls all the tasks, schedules all the processes and carries out all the crucial functions of the operating system. All operating systems have a kernel that contains thousands of routines to carry out the numerous tasks that the operating system has to handle. The major duties of the kernel are under:- To keep track of the programs that are executing
- All processor time to each and also decide when one program stops and another starts.
- It also handles exchange of information between computer and its terminals tape drives and printers.
Linux File System:
To store data in a computer system so that you can retrieve it at some time in the future, you place it in a file in the file system and give the file a filename so that you can reference it again later on. File are, stored on magnetic disk and hence continue to exit even if the computer is switched off and also set permission on it.Linux distinguishes three types of files in its file system -
An ordinary file has no internal structure imposed on it by the system - it is simply a sequence of characters.
A directory file stores information about other files and directories. This enables Linux to organinse its file system into a hierarchy of files and directories.
The special files are the input/output devices attached to a particular computer system.
Important Directories in the Linux File System:
Most of the directories that hold Linux system files are "standard" some of the most important directories on your Linux system.- /
This is the root directory. It holds the actual Linux program, as well as sub-directories. Do not store your own files here. - /home
This directory holds users' home directories. After logging to the system this is PWD for a user. - /bin
This directory holds many of the basic Linux programs. Bin stands for binaries, files that are executable and that hold text only computers could understand. - /usr
This directory holds many other user-oriented directories. Like games, help files. - /dev
Linux treats everything as a file! The /dev directory holds devices. These are special files that serve as gateways to physical computer components. For instance, if you copy to /dev/fd0, you are actually sending data to the system's floppy disk. You terminal is one of the /dev/tty files. Partitions on the hared drive are of the form /dev/hd0. Even the system's memory is a device! - /usr/sbin
This directory holds system administration files. If you do an Is -1, you see that you must be the owner, root, to run these commands. - /sbin
This directory holds system files that are usually run automatically by the Linux system. - /etc
This directory and its sub-directories hold many of the Linux configuration files. These files are usually text and they can be edited to change the system's configuration.
File & Directories:
A file as a container of information. Once information is stored in a file, it will remain there until it is changed or the file is removed from the system.A Linux allows filenames to be up to 256 characters long. These characters can be lower and upper cases letters, numbers and other characters, usually the dash(-), the underscore (_) and the dot (.).
Directory:
Whenever a new user is created in the Linux system to use Linux, a directory is created for that user which has a unique name. This directory is called the home directory. When you login successfully, Linux makes your home directory the current directory and you are then ready to begin your session. You can also make and remove sub-directories.File Naming Rules:
- A file name must be 1 to 255 characters long.
- All characters are legal except (/) which is used for separating directory levels and files.
- Spaces and tabs must be quoted if used as a part of file name. Avoid using following characters:
@ # $ ^ & * ? ( ) [ ] { } / \ ! ; ' " < > - All (.) at the beginning of a file name hides it from Is command.
- Upper and lower case characters are interpreted differently. TMP is different from tmp.
- Do not use following at beginning of file name:
+ - = _
Wildcards:
It matches any string with zero or more characters.? It matches any single character.
[characters] It matches any one of the character enclosed in [ ] c1 - c2 will match characters c1 through c2.
[!characters] It matches any one of characters not enclosed in [ ]
Example using wildcards:
- IS *.db
It displays all files ending with .db. - Is[0-9]*
It displays all files beginning with a numbers. - Is [!0-9]*
It displays all files not beginning with a number. - Is *.[bdfg]
It displays all files ending with characters b, d, f or g. - Is!(m*)
It displays all files not beginning with m.
THE SHEL
It is the command interpreter of the operating system. It accepts commands from users and analyses and interprets these commands. Most of the Linux commands are executable C programs. Shell interprets user commands and starts executing appropriate executable file. It then request kernel to carry out actual transfer of data which finally leads to output that is displayed of the screen of the terminal. Shell acts are mainly used with Linux:- Bourne Shell (sh):
This is one of the most widely used shells in the Linux world. It was developed by Steve Bourne of AT&T Bell Laboratories in the late 1970's. It is the primary Linux command interpreter and comes along with every Unix system. It introduced many shell concepts such as the ability to text program for success of failure status, allows for sophisticated scripting (Programing) but lack of features such as history list and command line editing. The prompt used by the Bourne shell in the Linux installation is shown by a ($) dollar sign. - C Shel (Csh):
The C shell was developed by Bill Joy at the University of California at Berkeley. The C shell is the default shell in the Berkeley version of Unix. It has a few principal advantages over the Bourne shell. - A history mechanism:
The C shell remembers the commands that the user types and allows him to recall them without having to retype them. - Aliasing:
The C shell permits you to call frequently used commands by your own formulated abbreviations. This is a type of "micro" facility that is available at the command line. - Arithmetic:
Arithmetic calculation and comparison, testing can be performed by the shell itself. - Korn Shel (Ksh):
Developed by David Korn at AT&T, this shell was designed to be much bigger than the Bourne shell and includes several features that make it more superior. It includes all the enhancement of C shell like command history and aliasing and offers a few more features itself which makes it more efficient than the Bourne shell. - Broune Again Shell (Bash):
It is the most common shell installed with Linux Distribution. It is based on Bourne Shell and provides additional feature set including command line editing, a history list and file name completion and allow to write sophisticated shell scripts using Bourne Shell like syntax.
WHAT IS DISTRIBUTION
Distribution is different sets of applications, utilities, tools and drivers modules are built on same versions Kernel (the heart of the Operating System), can include and can offer different installation and upgrade programs to ease management of the system.As windows 98 or Window NT defines the complete set of windows utilities applications and drivers that Microsoft ship. There is no room for variation in any application, drivers or utility.
But Linux has opened the door to different flavors of Linux meet differed need. On the same Kernel version they allow3 to add are remove applications, drivers and utility and allow3 to redistribute their product. Hence each product are called Distribution.
Following are the different types of Distributions.
- Red Hat:Red Hot Linux distribution from Red Hat Software (www.redhat.com) has emerged as the favorite Linux distribution for most users. Red Hat gained fame for its tools for installation and upgrading the operating system. It introduce GNOME Desktop some feature are Improve installation, improved Administration Tools like LinuxConfig, Xconfigurator, GNOME Desktop environment for X Windows, improved performance features like Symmetrical Multiprocessing and offer different RAID Techniques.
- Slack Ware:
Before Red Hat Linux come to fame slack ware was the distribution to beet but still a popular distribution and found on (www.slakware.com) the distribution offers the full Range of expected utilities, tools, application, including X windows, development tools such as GNU computers Full Java Support and Java SDK for Linux. It can be downloaded Walnut Greek FTP site (ftp.cdram.com) - Debian:
Debian has no commercial organisation backing it. It is produced by a team of volunteers. Debian offer more than 1000 software packages and publicised their bugs on website (www.debian.org). It is offer free distribution redistribution right, available source code. - Caldera Open Linux:
This distribution can be downloaded at no cost from Caldera Website at (www.calerasystems.com). It include K desktop environment and non commercial Star office for Linux. Word Perfect 6 for Linux Netware support and license of DR-DOS for Dos compatibility.
INSTALLING LINUX (REDHAT)
Step by Step Guide to Installing Redhat
- Screen 1:
If you have booted your system with the Redhat installation media or are installing by NFS you will see the Redhat welcome scree. Press enter for install in graphical mode. - Screen 2:
Press Next. - Screen 3:
For language select English. - Screen 4:
Keyboard type. Choose US International. - Screen 5:
Mous4e type. Select your mouse type here and if you are going to use this system as a desktop, enable the emulate 3 buttons check box. - Screen 6:
Installation type. Choose custom. - Screen 7:
Disk Partitioning. Choose Manually with Disk Drive. - Screen 8:
Disk setup. Delete all existing partitions (Warning: All Data currently on the disk is erased!) Depending on your needs, create new partitions. for simplicity, creating two partitions, one for use as swap which I make twice as large as the amount of physical RAM and one for all other data, called a root partition. Here's how;
Select new then enter the following into the pop-up box;
file system type swapsize (2x RAM) e.g. 64
then OK
then;
Select new
enter the following into the pop-up box;
Mount Point /
File system type EXT3
and click the Fill to maximum allowable size check box then click OK
You should now have two visible partitions, called /dev/hdal.1 and /dev/hda2 underneath the /dev/hda entry. One will be type EXT3 and one will be type swap.
At this stage will have finished configuring partitions. Click next to go to the next screen. - Screen 9:
Boot Loader. Grub is the preferred boot loader and the default options are suitable, so nothing needs to be changed here. Click Next. - Screen 10:
Network configuration. You will see a list of your network interfaces (such as eth0). Configure each one to suit your own physical network requirements.
here we don't use DHCP for wired machines so we select to configure manually and enter the IP information in the box provided.
Note that your wireless card probably has not been detected by this stage. Do not worry will shell configure it later. - Screen 11:
Firewall configuration. If you intend to run NoCat your entries here will be superseded by the NoCat configuration process. For the purpose of the initial configuration, select Medium security level and ETH0 as a trusted device. Allow Incoming ssh. - Screen 12:
Additional Language Support. Select Other language from the list and uncheck English (USA). - Screen 13:
Time Zone. Click on the map of Pakistan to set the time zone. - Screen 14:
Root password. This screen is where we set the password for the super-user. Create a root password that you will remember. Click OK then Next. - Screen 15:
Authentication Configuration. The default settings don't need to be changed. Click Next. - Screen 16:
Package selection. The packages you choose here will depend on what you want to do with you system, so the recommendations we make below are guidelines. Anything that you omit here but need later can be installed at a later stage. Here it is section by section.;
In Editors Emacs can be removed and vim-enhanced can be added.
In Graphical Internet evolution, gaim, Mozilla-mail, pane and xchat can be remove.
In Office/Productivity mrproject and open-office can be removed.
In Sound and Video any selected packages in this section can be removed.
In Graphics gimp, gimp-data-extras, gtkam, sane-frontends, xsane and xsane-gimp can be removed.
In Server Configuration Tools select all of the GUI configuration tools you require for the various services you intend to have on the box. You may find redhat-config-bind, redhat-config-httpd, redhat-config-network and redhat-config-services useful.
In Web Server select all that are applicable for you situation if you intend to use this system as a web server in addition to an Access Point. For use with NoCat you will need mod_perl and mod_ssl.
In Network Servers select all of the services you wish to run. For our Access Point we need ZEBRA and DHCP cipe, pxe, rsh-server, talk-server, telnet-server and ypserv can be removed.
In Administration Tools select all of the GUI config tools that you think you require. They are safe to install even if you don't end up using them.
In System Tools amanda, ethereal, etheral-gnome, nmap and nmap-front-end are useful and can be installed and we will use shapecfg in appendix C for configuring bandwidth management. Click next to being the actual RedHat installation. The install process will begin by formatting the new partitions and installing the various packages required for a functioning Linux system. The installation should take approximately 25 minutes. At the end of this process, configure the X display system for you hardware if required. It is a good idea to turn off Graphical login type at this point. You will be presented with the option to create a boot disk once the installe is complete. It is good idea to do so.
Tuning off Unnecessary Services
One last job remains; after you have logged into your system and are satisfied that it is working correctly, we'll turn off some of the plethora of services and Redhat has enabled. Some of these services we will enable later but in the mean time they are using system boots, both of which are inconvenient while we are building and testing our new system.You can manually turn off services by re-naming files in the /ect/rc.d/ hierarchy, but Redhat has a menu driven system called simply setup that is easier use. Access it with this command;
[root@accesspoint root]# setup
A menu will come up. Scroll down to System Services and press enter to select it. You will see a list to services, those with an asterix are enabled. Disable the following services by highlighting the asterix and pressing the space bar.
anacron Scheduling daemon
apmd Power management daemon
atd Scheduling daemon
autofs Auto-mounting of remote file systems
cups Unix print daemon
gpm Console mouse support daemon
isdn iisdn
iptables Firewalling
kudzu Hardware maintenance daemon
netfs Remote file system mounter daemon
nfslock Network File System daemon
pcmcia PCMCIA monitor daemon
portmap RPC control daemon
rhnsd Redhat update daemon
Sendmail Mail server daemon
xinetd TCP/IP se4rvices supe-daemon
This leave us with only these services enabled; crond, keytable, network, random, rawdevices, sgi_fam, sshd, syslog & xfs which will make the system more responsive. Note that xfs, the X font server, can be disabled as well if you have no intention of running X.
Reboot & Test
You may like to reboot your system now to make sure that it comes back up OK. Reboot with this command;
[root@accesspoint root]# shutdown-r now
Once your system comes back up and you are satisfied that it is functioning nominally.
LINUX Files System Management
- badblocks:
Used to search a disk or partition for badblocks. - efdisk:
Similar to fdisk but with nicer interface. - debugfs:
Allows direct access to filesystems data sturcture. - df:
Shows the disk free space on one4 or more filesystems. - dosfsck:
Check and repair MS-Dos filesystems. - du:
Shows how much disk space a directory and all its files contain. - dump:
Used to back up an ext2 filesystem. Complement is restore. - dumpe2fs:
Dump filesystem superblock and bolcks group information. Ex: dump32fs/dev/hda2. - e2fsck:
Check a Linux sound extended file system. - e2label:
Change the label on an ext2 file system. - exportfs:
Used to set up file system to export for nfs (network file sharing). - fdisk:
Used to fix or create partitions on a hard drive. - fdformat:
Formats a floppy disk. - fsck:
Used to add new blocks to a file system. Must not be run on a mounted file system. - hdparm:
Get set hard disk geometry parameters, cylinders, heads sectors. - mkfs:
Initialises a Linux file system. This is a front end that runs a separate program depending on the file system's type. - mke2fs:
Create a Linux second extended file system. - mkswap:
Sets up a Linux swap area on a device or file. - mount:
Used to mount a filesystem. Complement is amount. - rdev:
Query / set image root device, swap device, RAM disk size of video mode. What this does is code the device containing the root filesystem into the kernel image specified. - rdump:
Same as dump. - rmt:
Remove magtape protocol module. - restore:
Used to restore an ext2 filesystem. - setfdprm:
Set floppy drive parameters. - swapoff(8):
Used to deactivate a swap partition. - swapon(8):
Used to activate a swap partition. - sync:
Forces all unwritten blocks in the buffer cache to be written to disk. - tune2fs:
Adjust tunable filesystem parameters on second extended filesystem. - umount:
Unmounts a filesystem. Complement is mount.
Creating a User Account
When you first start your Red Hat Enterprise Linux system after installation, you were given the opportunity to create one or more user accounts using the Setup Agent. If you did not create at least one account (not including the root account) you should do so now. You should avoid working in the root account for daily tasks.There are two ways to create new and/or additional user account: using the graphical User Manager application or from a shell prompt.
To create a user account graphically using the User Manager:
- Select Applications (the main menu on the panel) => System Setting => Users & Groups from the panel. You can also start the User Manager by typing redhat-config-users at a shell prompt.
- If you are not logged is as root, you will be prompted for your root password.
- The window will appear. Click Add User.
- In the Create New User dialog box, enter a username (this can be an abbreviation or nickname), the full name of the user for whom this account is being created and a password (which you will enter a second time for verification). The name of this user's home directory and the name of the login shell should appear by default. For most users, you can accept the defaults for the other configuration options. Refer to the Red Hat Enterprise Linux system Administration Guide for detail about additional options.
- Click OK. The new user will appear in the user list, signaling that the user account creation is complete.
- Open a shell prompt.
- If you are not logged in as root, type the command su - and enter the rot password.
- Type useradd followed by a space and the username for the new account you are creating at the command line (for example, useradd khan2015). Press [Enter]. Often, usernames are variations on the user's name, such as adkhan2015for Adnan Khan. User account name can be anything from the user's name, initials or birthplace to something more creative.
- Type password followed by a space and the username again (for example, password adkhan2015).
- At the new password: prompt enter a password for the new user and press [Enter].
- At the retype new password: prompt, enter the same password to confirm your selection.
How To Add a New User in Redhat
To add a user and set up the directories you want that user to have, user the useradd command. By default, this will add a user and create a home directory for that user, which will be located in /home.EXAMPLE: /usr/sbin/useradd yourname will create the user yourname, and make the directory /home/yourname.
EXAMPLE: /ur/bin/passwd yourname. You will be prompted twice for a password.
NOTE: If you wand useradd to create more default directories than just /home/newuser, you can add then to /etc/skel. Anything you add to this directory will be created when you add a new user.
EXAMPLE: mkdir/etc/skel/www will add a directory called www to the skel dir. Now whenever you run useradd to create a new user, it will also create a www direcrtory in the new users home directory.
There are also some options for useradd you can if you wish, such as changing where the users home directory will be or which skeleton directory to use.
