Open Source
Open Source
Overview of FOSS:
Free Software:
―Free software‖ means software that respects users‘ freedom and
community. Roughly, it means that the users have the freedom to run, copy,
distribute, study, change and improve the software. The term ―free software‖
is sometimes misunderstood—it has nothing to do with price. It is about
freedom.
Advantages:
Cost: Free software is typically free to use, modify and distribute.
Freedom: Free software is often accompanied by a set of ethical
principles that promote users‘ freedom to use, study, modify, and share
the software.
Collaboration: Free software often encourages collaboration among
developers and users, leading to faster development and better quality
software.
Transparency: Free software is often developed in a transparent way,
with the source code and development process available for public
scrutiny.
Flexibility: Free software can be used on a wide range of platforms and
devices.
Disadvantages:
Support: While free software does have a community of developers and
users, it may not always have the same level of professional support as
commercial software.
Compatibility: Free software may not always be compatible with other
software applications and hardware devices.
Security: Because free software is available for everyone to use and
modify, it may be easier for malicious actors to identify and exploit
vulnerabilities.
Complexity: Free software can be more complex and difficult to use than
commercial software, especially for non-technical users.
Documentation: Free software may not always have the same level of
documentation and user guides as commercial software.
Open Source Software:
Open Source Software is something that you can modify as per your needs,
and share with others without any licensing violation burden. When we say
Open Source, the source code of the software is available publicly with Open
Source licenses like GNU (GPL) which allows you to edit the source code
and distribute it. Read these licenses and you will realize that these licenses
are created to help us.
1. Coined by the development environments around software produced by
open collaboration of software developers on the internet.
2. Later specified by the Open Source Initiative (OSI).
3. It does not explicitly state ethical values, besides those directly
associated with software development.
Advantages:
Cost: Open source software is typically free to use, modify and distribute.
Customization: The source code of open source software is available to
everyone, allowing users to modify and customize it to suit their needs.
Community support: Open source software often has a large community
of developers and users who contribute to its development and provide
support.
Transparency: The source code of open source software is open for
everyone to see, making it easier to identify and fix bugs and
vulnerabilities.
Flexibility: Open source software can be used on a wide range of
platforms and devices.
Disadvantages:
Support: While open source software does have a large community of
developers and users, it may not always have the same level of
professional support as commercial software.
Compatibility: Open source software may not always be compatible with
other software applications and hardware devices.
Security: Because the source code of open source software is available to
everyone, it may be easier for malicious actors to identify and exploit
vulnerabilities.
Complexity: Open source software can be more complex and difficult to
use than commercial software, especially for non-technical users.
Documentation: Open source software may not always have the same
level of documentation and user guides as commercial software.
Similarities:
Both free software and open source software have access to the source
code, allowing users to modify and improve the software.
Both types of software often rely on a community of users and developers
to provide support and contribute to the development of the software.
Both free software and open source software are often distributed under
open licenses, allowing users to use, modify, and distribute the software
without restrictions.
What is GNU/Linux?
GNU/Linux is a Unix-like operating system made up of different OS components
and services that create the Linux OS.
GNU stands for GNU's not Unix, which makes the term a recursive acronym, or an
acronym in which one of the letters stands for the acronym itself. The GNU
Project initially created most of the components and services used in GNU/Linux
and later added the Linux kernel to create the GNU/Linux OS. The Linux kernel is
the core component of GNU/Linux, as it provides basic services and allocates OS
resources.
Although there are numerous distributions, Debian, Fedora and Ubuntu are three
user-friendly examples of GNU/Linux desktop distributions.
Fedora was developed by the Fedora Project and is sponsored by Red Hat Inc. Its
goal is to lead in open source technologies by focusing on integrating new
technologies and working closely with Linux-based communities.
The Ubuntu OS, which is based on the Debian Linux distribution, is composed of
free and open source software. Ubuntu is an OS typically used for cloud computing
and is supported by OpenStack.
Free software movement activist and programmer Richard Stallman announced the
GNU/Linux project and, with others, formed FSF in 1985.
The original purpose of the GNU Project was to create a free OS. Free -- not in the
context of cost -- but in terms of giving users the freedom to run, copy, distribute,
study, change and improve the software as needed. As such, individuals can
change the OS and exchange its components however they want. The Linux
community participates in the development and improvement of the OS.
Software developers profit by selling support and services around their own
GNU/Linux distribution. Corporate customers buy security updates and support.
Other organizations contribute to GNU/Linux by pre-installing the OS
on servers they sell.
Software customization. Users can customize the OS' software to their liking.
For example, users can choose from different command-line shells, which are
programs that enable them to process or give commands to a computer program
in text. It is referred to as a shell, as it is an outer layer of the OS.
Community. The GNU/Linux user base is a wide and varying group that can
create, distribute and help support software.
Transparency. Users can study the source code, as well as modify and share it.
Distributions are also developed in the open.
What are the disadvantages of GNU/Linux?
Some disadvantages of GNU/Linux include the following:
Learning curve. If a user is accustomed to Windows or macOS, it might take
time to get used to the new system and applications.
Free software is a matter of liberty, not price. To understand the concept, you should think of
“free” as in “free speech,” not as in “free beer.”
More precisely, free software means users of a program have the four essential freedoms:
The freedom to run the program as you wish, for any purpose (freedom 0).
The freedom to study how the program works, and change it so it does your computing
as you wish (freedom 1). Access to the source code is a precondition for this.
The freedom to redistribute copies so you can help others (freedom 2).
The freedom to distribute copies of your modified versions to others (freedom 3). By
doing this you can give the whole community a chance to benefit from your changes.
Access to the source code is a precondition for this.
What is an Open Source License?
Open source software licenses govern how others – besides the originator –
can use, modify, or distribute software code. They grant other users the
permission and rights to use or repurpose the code for new applications or to
include the code in other projects.
One of the main advantages of open source code is its visibility, which makes
it easier to troubleshoot problems and to understand better how something
works when the documentation is either lacking or incorrect.
Depending on the type of open source license, you may even be allowed to
modify the original source code to tailor it to your needs or fix any issues you
find. The license will determine whether this is possible, and under what
terms. For example, you may be required to make any modifications publicly
availabl
What are the different open source licenses?
There are over 80 variations of open-source licenses, but they generally fall
into one of two primary categories: copyleft and permissive:
Copyleft Licenses
The most popular copyleft open source licenses, in order of restrictiveness,
are AGPL, GPL, LGPL, EPL, and Mozilla:
The GNU General Public License (GPL)preserves license notifications and
copyright terms and is suitable for commercial, patent, and private use.
Any software that uses GPL code must distribute all its source code
under the same license. So if you use GPL code in your software (e.g., by
using a GPL library), and distribute your application, all your source code
must be made available under the same GPL license. This restriction
makes the GPL a strong copyleft license.
The Affero GPL (AGPL) only adds only one clause, but an important one
for some software. Because the GPL license is only triggered when
software is distributed, there is a loophole for software that is made
available over the network only, i.e., not explicitly “distributed”. The
AGPL license closes this loophole by including a remote network
interaction clause that triggers the GPL license for any software used
over a network.
The Lesser General Public License (LGPL) provides the same level of
terms as the AGPL and GPL copyleft open source licenses, including
preserving copyright and license notifications. The prime variation is that
smaller projects or objects accessed through larger licensed works do
not require distribution of the larger project. Moreover, the modified
source does not have to be distributed under the same terms that apply
to the larger code project.
The Eclipse Public License (EPL)is commonly used for business
software.With EPL, software developed using EPL, non-EPL, and even
proprietary code can be combined and sub-licensed – provided any non-
EPL elements reside independently as separate modules or objects.
Modifications can be made under the EPL license, but they must be
released under the same terms.
The Mozilla Public License (MPL) is the least restrictive copyleft open
source software license. They make it easy to modify and use their code
in closed-source and/or proprietary software, as long as any code
licensed under the MPL is kept in separate files and these files are
distributed with the software. The MPL also includes patent grants and
enforces that copyright notices be retained
Permissive licenses
The most popular permissive open source licenses are: Apache, MIT, BSD
and Unlicense.
The Apache License requires license notifications and copyrights on the
distributed code and/or as a notice in the software. However, derivative
works, larger projects, or modifications are allowed to carry different
licensing terms when distributed and are not required to provide source
code. Apache licenses contain a patent grant.
The MIT License, which bears the name of the famous university where
it originated, is perhaps the most used open source license in the world,
perhaps because it is very short and clear and easy to understand. Iit
allows anyone to do whatever they wish with the original code, as long
as the original copyright and license notice is included either in the
distributed source code or software. It removes any liability from
authors and does not explicitly contain a patent grant.
The Berkeley Source Distribution (BSD) License is another permissive
open source license that preserves license notices and copyrights but
allows larger or licensed works to be distributed without source code
and under different license terms. The 2- clause BSD License is very
similar to the MIT open source license, while the 3-clause and 4-clause
BSD licenses add more requirements or restrictions related to reuse and
other terms.
Unlicense: As its name indicates, this is the least restrictive of open
source licenses because it amounts to making the open source open to
the public domain. No conditions apply, meaning these unlicensed works
can be distributed without source code and under different terms
The protection of such distinctive signs aims to stimulate and ensure fair
competition and to protect consumers, by enabling them to make
informed choices between various goods and services. The protection
may last indefinitely, provided the sign in question continues to be
distinctive.
Other types of industrial property are protected primarily to stimulate
innovation, design and the creation of technology. In this category fall
inventions (protected by patents), industrial designs and trade secrets.
The protection is usually given for a finite term (typically 20 years in the
case of patents).
While the basic social objectives of intellectual property protection are
as outlined above, it should also be noted that the exclusive rights given
are generally subject to a number of limitations and exceptions, aimed
at fine-tuning the balance that has to be found between the legitimate
interests of right holders and of users.
Open-source Software:
Open source software is computer software developed either by an
individual, group, or organization to meet certain requirements and it is
available for any modifications based on its developing body‘s interest. Open
source software is published openly for the general public and here the
source code is open for all. For open-source software, the users do not need
to spend any cost. It is available under free licensing. It depends on
donations and support as its main source of funds. Some examples of open-
source software are Firefox, OpenOffice, Zimbra, VLC media player, and
Thunderbird.
Advantages:
Cost: Open-source software is typically free to use, modify, and distribute.
Customization: The source code of open-source software is available to
everyone, allowing users to modify and customize it to suit their needs.
Community support: Open source software often has a large community
of developers and users who contribute to its development and provide
support.
Transparency: The source code of open-source software is open for
everyone to see, making it easier to identify and fix bugs and
vulnerabilities.
Flexibility: Open-source software can be used on a wide range of
platforms and devices.
Disadvantages:
Support: While open-source software does have a large community of
developers and users, it may not always have the same level of
professional support as commercial software.
Compatibility: Open-source software may not always be compatible with
other software applications and hardware devices.
Security: Because the source code of open-source software is available
to everyone, it may be easier for malicious actors to identify and exploit
vulnerabilities.
Complexity: Open source software can be more complex and difficult to
use than commercial software, especially for non-technical users.
Documentation: Open source software may not always have the same
level of documentation and user guides as commercial software.
2. Commercial Software :
Commercial software is computer software that only the person, team, or
organization that created it can modify also they have exclusive rights over
the software. Anyone who needs to use it has to pay for it valid and
authorized license. Here the source code is protected. For commercial
software, the users need to spend moderate to expensive costs. It is
available at a high licensing cost. It depends on its software sale/product
licensing as its main source of funds. Some examples of commercial
software are Windows Operating System, MS Office, SAP, Oracle, and
Adobe Photoshop.
Advantages:
Professional support: Commercial software often comes with professional
support services, including technical support and customer service.
Compatibility: Commercial software is often designed to work seamlessly
with other software applications and hardware devices.
Security: Commercial software often includes security features and is
subject to rigorous testing and validation.
Ease of use: Commercial software is often designed with a user-friendly
interface and can be easier to use than open-source software.
Documentation: Commercial software often has extensive documentation
and user guides to help users get started.
Disadvantages:
Cost: Commercial software can be expensive to purchase and may
require ongoing licensing fees.
Customization: Commercial software is often proprietary, meaning that
users are not able to modify or customize it.
Flexibility: Commercial software may be limited in terms of the platforms
and devices on which it can be used.
Transparency: Commercial software is often closed source, meaning that
the source code is not available for public scrutiny.
Dependence: Commercial software is often subject to the decisions and
business practices of the company that produces it, which may not always
align with the needs of users.
Similarities between Open source Software and Commercial
Software :
Both types of software are designed to solve specific problems or meet
specific needs of users.
Both types of software can be used for personal or business purposes.
Both types of software can be updated and improved over time.
Both types of software can have user communities and support systems
that help users troubleshoot problems or learn how to use the software.
Both types of software can be subject to licensing agreements and
intellectual property laws.
Commercial software
Open source provides provides guaranteed
03. limited technical support. technical support.
In open-source software
In open source software installation and updates are
installation and updates are administered by the software
06. administered by the user. vendor.
You can create the boot diskette either from a DOS or Windows system, or from
an existing Linux or Unix system. For your destination diskette, you can use either
an unformatted or a pre-formatted (for DOS) diskette -- it makes no difference.
Under DOS: Assuming your CD-ROM is accessible as drive D:, you can type:
d:
cd \images
..\dosutils\rawrite
For the source file, enter ``boot.img''. For the destination file, enter ``a:'' (assuming
the diskette you are created is inserted into the A: drive). The `` rawrite'' program
will then copy the ``boot.img'' file onto diskette.
Under Linux/Unix: Assuming the ``boot.img'' file is located in the current directory
(you may need to mount the CD-ROM under /mnt/cdrom and find the file in
/mnt/cdrom/images), you can type:
dd if=boot.img of=/dev/fd0
The ``dd'' utility will copy, as its input file ("if"), the ``boot.img'' file, onto the
output file ("of") /dev/fd0 (assuming your floppy drive is accessible from
/dev/fd0).
Unless your Linux or Unix system allows write permissions to the floppy device,
you may need to do this command as the superuser. (If you know the root
password, type ``su'' to become the superuser, execute the ``dd'' command, and then
type ``exit'' to return to normal user status).
4.2. Booting Linux Installation Program
To begin setting up your new Red Hat system, either boot from the installation CD,
or insert the installation diskette in the system's A: drive, and reboot or power-on
the system. After a few moments, the Red Hat installation program screen should
appear.
In most cases, you can just press <Enter> to begin the installation process, but if
you are a more experienced user who knows exactly how your hardware devices
should be set up, you can enter ``expert'' for the additional information and
prompts this feature provides. (If you do nothing, the default installation procedure
will start in about 10 to 15 seconds after the installation screen first appears.)
You will then be asked to choose your language (usually "English") and your
keyboard type (even in Canada I choose "US 101-key"), as well as where you are
installing from (such as from your CD-ROM or over the network). Red Hat is very
flexible in where it can be installed from.
Most likely you will choose ``Local CDROM'' to install from your Red Hat CD-ROM
(which should be inserted into your CD-ROM device). However, if your system is
not equipped with a CD-ROM device, there are a number of other installation
methods you can choose.
If you have another Linux system (or any other operating system that supports NFS
file mounting), you can use ``NFS'' to install from an NFS mount. To do this, you'll
need to have your CD-ROM mounted in the other system (or otherwise have the
Red Hat distribution tree somewhere on the other system -- it is possible to
download everything via FTP and then install from your other system's hard drive),
make sure you have an entry in your /etc/exports file allowing access by the new
system to the appropriate directory (see Section 7.6 for details on how to set up and
use NFS), and then enter the appropriate details. Here's an example walk-through:
Insert the Red Hat CD into the other system (eg. a system called
``spock'').
To mount the CD, type:
Edit, as the superuser, your ``/etc/exports'' file and put an entry like:
/mnt/cdrom newsys.mydomain.name(ro)
/mnt/cdrom 10.23.14.8(ro)
This will restart your NFS and mountd daemons, which is necessary
before your new NFS export will work.
Now, from your new system, you can choose ``NFS'' as your
installation source. You'll be asked to provide information on your
network card, as well as your IP settings. You'll likely use static IP
settings if your system is sitting on a local LAN, or DHCP settings if,
for example, your system is connected to a cable modem. Enter the
settings as appropriate for your new system.
You'll then be asked to enter the NFS server name and Red Hat
directory. For our example system, we would type in `` spock'' as the
NFS server name, and ``/mnt/cdrom/'' as the Red Hat directory.
There are other ways of installing Red Hat, such as using a Samba (Windows-style
networking) connection, from an existing partition (such as your DOS or Windows
95 partition) on your hard drive, or via FTP. Check the Red Hat users guide for
more details on installing using these methods, or just try to struggle through them
(the procedures are really not very difficult!)
Once you have chosen your installation source, Red Hat will ask you if you wish
to "Install" or "Upgrade" your system. As you are installing a new system, you
should choose "Install". (As an aside, I'm a fairly anal person who never upgrades
new distribution releases over existing systems -- I guess having suffered through
so many problems with Microsoft products I have developed a significant mistrust
for upgrading systems as a whole. I prefer to install from scratch, and simply
restore from backup my personal/user and local site files.)
The installation program will then ask you if you have a SCSI adapter. If you
answer yes, you'll be asked to choose the appropriate driver. In some
circumstances, Red Hat will be able to detect your adapter automatically.
Next, you'll be asked to set up your file systems (ie. partition one or more drives
for Linux). There are two tools available for setting up these partitions, including
the Red Hat-supplied "Disk Druid", and the standard Linux "/fdisk" utility.
Both tools are similar in function, allowing you to specify the partition types and
sizes. However, Disk Druid seems to be a bit more "user friendly", and a bit more
complete than fdisk. In fact, if you use fdisk to partition your drives, you'll then be
presented with the Disk Druid screen for specifying your mount points anyway.
That being said, as an ex-Slackware user, I personally always use fdisk -- force of
habit, I guess! :-)
The next section will detail how and why you should set up your partition
information.
While it is true that Linux will operate just fine on a disk with only one large
partition defined, there are several advantages to partitioning your disk for at least
the four main file systems (root, usr, home, and swap). These include:
First, it may reduce the time required to perform file system checks (both upon
bootup and when doing a manual fsck), because these checks can be done in
parallel. (By the way, NEVER run an fsck on a mounted file system!!! You will
almost certainly regret what happens to it. The exception to this is if the file system
is mounted read-only, in which case it is safe to do so.) Also, file system checks
are a lot easier to do on a system with multiple partitions. For example, if I knew
my /home partition had problems, I could simply unmount it, perform a file system
check, and then remount the repaired file system (as opposed to booting my system
with a rescue diskette into single-user mode and doing the repairs).
Second, with multiple partitions, you can, if you wish, mount one or more of your
partitions as read-only. For example, if you decide that everything in /usr will not
be touched even by root, you can mount the /usr partition as read-only.
Finally, the most important benefit that partitioning provides is protection of your
file systems. If something should happen to a file system (either through user error
or system failure), on a partitioned system you would probably only lose files on a
single file system. On a non-partitioned system, you would probably lose them on
all file systems.
This little fact can be a big plus. For example, if your root partition is so corrupted
you can't boot, you can basically boot from the rescue diskette set, mount your root
partition, and copy what you can (or restore from backup; see Chapter 8 for details
on how files can be backed up and restored), to another partition such as home, and
then reboot once again using the emergency boot disk, typing "mount
root=/dev/hda3" (assuming the partition containing your temporary root file
system is on the third partition of hda) and boot your fully functional Linux box.
Then you can run an fsck on your unmounted corrupt root partition.
I have had personal experience in file system catastrophies, and I was very grateful
for having had the damage limited due to the use of multiple partitions.
Finally, since Linux allows you to set up other operating system(s) (such as
Windows 95/98/NT, BeOS, or what-have-you), and then dual- (or triple-, ...) boot
your system, you might wish to set up additional partitions to take advantage of
this. Typically, you would want to set up at least one separate partition for each
operating system. Linux includes a decent boot loader (called LILO on Intel-based
systems, although much the same thing is available as MILO on Alpha, and SILO
on Sparc) which allows you to specify which operating system you want to boot at
power on, with a time-out default boot of your favorite operating system (probably
Linux, right?)
You should partition a disk (or disks) according to your needs. In my experience
on Intel, Alpha, and Sparc platforms, for a fairly loaded system (feature-wise),
doing a fair amount of tasks (as a desktop system at home, or as an Internet server
at work), I have found the following approximation of space works pretty
effectively for determining a partition size.
Given:
Calculate:
(swap) about double main RAM (eg. 64 Mb system gets 128 Mb swap)
/ (root) about 10% of available (eg. 200 Mb)
/home about 20% of available (eg. 400 Mb)
/usr any remaining space (eg. 1272 Mb)
Of course, the above amounts are approximate guidelines only. Obviously you are
going to want to juggle those percentages around a bit depending on what you are
going to use your Linux system for. If you are going to be doing stuff like adding
lots of bulky applications such as WordPerfect or Netscape, or perhaps adding
Japanese character support, you would probably benefit from a bit more /usr space.
I always seem to have a lot of space available on /home, so if your users aren't
doing much (or you have imposed strict quota sizes), or you aren't offering shell
accounts and personal web pages, etc., you probably could lower /home space and
raise /usr.
Here is a description of the various mount points and file system information,
which may give you a better idea of how to best define your partition sizes for your
own needs:
/ (root) - used to store things like temporary files, the Linux kernel and boot
image, important binary files (things that are needed before Linux can
mount the /usr partition), and more importantly log files, spool areas for
print jobs and outgoing e-mail, and user's incoming e-mail. It is also used for
temporary space when performing certain operations, such as building RPM
packages from source RPM files. Therefore, if you have a lot of users with a
lot of e-mail, or think you will need plenty of temporary space, you might
want more space available. The partition type should be left as the default of
83 (Linux native). In addition, you'll probably toggle the bootable flag on
this partition to allow boot information to be stored here.
/usr/ - should be the largest partition, because most of the binary files
required by Linux, as well as any locally installed software, web pages,
Squid proxy cache, Samba share services, some locally-installed software
log files, etc. are stored here. The partition type should be left as the default
of 83 (Linux native).
/home/ - typically if you aren't providing shell accounts to your users, you
don't need to make this partition very big. The exception is if you are
providing user home pages (such as school web pages), in which case you
might benefit from making this partition larger. Again, the partition type
should be left as the default of 83 (Linux native).
(swap) - Linux provides something called "virtual memory" to make a larger
amount of memory available than the physical RAM installed in your
system. The swap partition is used with main RAM by Linux to accomplish
this. As a rule of thumb, your swap partition should be at least double the
amount of physical RAM installed in your system.
If you have more than one physical hard drive in your system, you can
create multiple swap partitions. This can improve the performance of
swapping by taking advantage of parallel disk access. For example, on a 256
Mb system with four drives, I would probably create four 128 Mb swap
partitions, for a total of 256 Mb RAM, 512 Mb swap (for a combined total
of 768 Mb available as virtual memory). The partition type needs to be
changed to 82 (Linux swap).
As extra drive(s) are added, further partitions can be added to the new drives,
mounted at various mount-points as required -- this means a Linux system never
needs to worry about running out of space. As an example, if in the future it is
clear that sda6 is starting to get filled up, we could add another drive, set a nicely
sized partition with a mount-point at /usr/local -- and then transfer all the
information from /usr/local over to the new drive. But no system or application
component would "break" because Linux would see /usr/local no matter where it
was located.
To give you an example of how one might set up partitions, I have used the
following partitioning scheme on an Intel system (dual boot, Windows 95 and
Linux):
The first partition, /dev/hda1, is a DOS-formatted file system used to store the
alternative operating system (Windows 95). This gives me 1 Gb of space for that
operating system.
The third through fifth partitions, /dev/hda5, /dev/hda6, and /dev/hda7, are all e2fs-
formatted file systems used for the / (root), /usr, and the /home partitions,
respectively.
Finally, the sixth partition, /dev/hda8, is used for the swap partition.
For yet another example, this time an Alpha box with two hard drives (sole boot,
Linux only), I have chosen the following partitioning scheme:
The first partition, /dev/sda1, is a DOS-formatted file system used to store the
MILO boot loader. The Alpha platform has a slightly different method of booting
than an Intel system does, therefore Linux stores its boot information in a FAT
partition. This partition only needs to be as large as the smallest possible partition
allowed -- in this case, 2Mb.
The second partition, /dev/sda2, is an e2fs-formatted file system used for the /
(root) partition.
The seventh partition, /dev/sdb1, is an e2fs-formatted file system used for the
/archive partition.
The eighth and final partition, /dev/sdb2, is an e2fs-formatted file system used for
the /archive2 partition.
After you finish setting up your partition information, you'll need to write the new
partition to disk. After this, the Red Hat installation program reloads the partition
table into memory, so you can continue on to the next step of the installation
process.
Again, I recommend you enable the "Check for bad blocks during
format" option.
Once you have chosen your desired components, select "Ok" to begin installation. If
you have enabled the "Select individual packages", you'll be asked the specify
which individual packages should be installed. This is fairly straightforward, and if
you are unsure of what a given package is for, you can press the <F1> key for a
brief description of what it does.
Don't worry if you make a mistake choosing (or not choosing) a package or two.
After all, all the packages are on your CD-ROM (or other source media), so you
can use the handy Red Hat RPM tool to make adjustments after your system is up
and running (see Section 10.1 for details).
After you have chosen the packages you wish to install, the installation program
will now format the partitions you have defined. This may take several minutes,
especially for larger partitions or if you've enabled bad block checking, so please
don't think your system has frozen during this procedure!
After the format completes, Red Hat Linux will begin installation of the selected
packages. This should take between five and fifteen minutes to complete,
depending on the speed of your system.
Next, the installation program needs to write a boot loader to your hard drive. The
boot loader (LILO on Intel systems) is responsible for booting Linux along with
any other operating systems if you have set up your system for multi-boot
(see Section 4.8.1 for details on this).
The "Lilo Installation" dialog box will ask you to choose where the boot loader
image should be written to. You'll likely want to install it on the master boot record
of your first drive (usually /dev/hda for IDE, /dev/sda for SCSI).
Once you have selected the location for writing the boot loader, a second dialog
box will appear, allowing you to enter extra boot-time configuration parameters.
Usually you don't need to enter anything here, but if you have more than 64 Mb of
RAM you'll need to enter a special parameter in order to have Linux make use of
the extra RAM (otherwise, it will only use the first 64 Mb). For example, if your
system has 128 Mb of RAM, you should enter:
append="mem=128M"
If your system has SCSI drives, or you wish to install LILO on a partition with
more than 1023 cylinders, it may be necessary to enable the option to "Use linear
mode". If it is not, enabling this option shouldn't hurt anything, so it is probably a
good idea to do so.
After installing the boot loader on your hard drive, the installation program should
hopefully present you with a "Congratulations" dialog box, indicating that Linux
has been successfully installed. Remove the installation floppy diskette (if any),
and press <Enter> to reboot your system...into Linux!
Linux will boot, and if all goes well you should see a "login" prompt. From here,
you should be able to log in as "root" using whatever password you have assigned
during the installation process.
This will prove to be one of the more time-consuming parts of getting your Linux
system ready (unless you have a stellarly fast Internet connection). However, take
the time to do this! You will likely save yourself a lot of grief!
ftp://ftp.redhat.com/redhat/updates/6.1/i386/
You should probably download everything into a single directory, and then you
can simply type: ``rpm -Uvh *'' which will upgrade all the packages. If you've
downloaded any kernel rpm files, you should probably move them to another
directory for now. Upgrading or customizing your kernel is a bit more complicated
and needs to be done with great care (see Section 10.4 for details on this).
Therefore before you apply the upgrades, you may wish to consider moving all the
kernel-*.rpm files out of your temporary upgrade directory.
To apply the upgrades, you can simply run ``rpm'' against all the packages at once
(ie. "rpm -Uvh *"), or if you prefer, you can upgrade them one at a time (ie. "rpm -
Uvh file_to_upgrade.rpm"). The latter method is for us anal types who wish to
ensure that each update is applied correctly without error. :-)
Perhaps you are curious to see if a given package is installed before you attempt to
upgrade it. Or perhaps you wish to find out what version of a given package is
installed. All this can be done with the RPM utility; see Section 10.1 for details.
These basic commands form the building blocks for interacting with a Linux
system through the command line interface. Understanding and using
these commands efficiently enable users to perform routine tasks, manage
the file system, process data, and automate tasks, thereby enhancing
productivity and control over the Linux environment.
ls
2. cd (Change Directory):
To change to a specific directory:
cd /path/to/directory
cd ..
mkdir new_directory
4. cp (Copy):
cp -r directory_name /path/to/destination
5. rm (Remove/Delete):
To remove a file:
rm file.txt
rm -r directory_name
6. cat (Concatenate):
cat file.txt
man ls
Use arrow keys or the spacebar to navigate through the manual pages.
Press ‗q‘ to exit the manual.
These examples demonstrate how these basic shell commands are used in
Linux to perform various tasks such as file manipulation, navigation, and
data retrieval within the command line interface.
Managing users
Users must authenticate to any system they need to use. This authentication
provides access to resources and a customized, user-specific environment. The
user's identity is based on their user account. What skills do sysadmins need to
manage user accounts?
User account information is stored in the /etc/passwd file. This information includes
the account name, home directory location, and default shell, among other values.
Linux sysadmins should be able to recognize these fields.
Each field is separated by a : character, and not all fields must be populated, but
you must delineate them.
username:password:UID:GID:comment:home:shell
In this example, the comment field is empty:
dgarn:x:1001:1001::/home/dgarn:/bin/bash
Observe how the two colons still exist to delineate the comment field.
dgarn:x:1001:1001:Damon Garn:/home/dgarn:/bin/bash
I'll discuss passwords more below, but expect to see an x in the password field of
this file.
Image
Download now
Long ago, password hashes were stored in the /etc/passwd file. This file was world-
readable, allowing inquisitive users to pull password hashes for other accounts from
the file and run them through password-cracking utilities. Eventually, the password
hashes were moved to a file readable only by root: /etc/shadow. Today, the
password field in the /etc/passwd file is marked with an x.
The process for managing user accounts is very straightforward. Sysadmins either
add, modify, or delete users, and the related commands are quite intuitive.
The commands to manage user accounts on RHEL and RHEL-like distributions are:
useradd
usermod
userdel
Ken Hess documents these commands in Linux sysadmin basics: User account
management. There are many options available to customize the user accounts and
their related resources.
[ You might also be interested in downloading the Bash shell scripting cheat
sheet. ]
Managing groups
It's more efficient to group user accounts with similar access requirements than to
manage permissions on a user-by-user basis. Therefore, sysadmins need to be
comfortable with the process of creating, modifying, and deleting groups.
[ Practice your Linux skills in the free online course RHEL technical overview. ]
Similar to the /etc/passwd file above, the /etc/group file contains group account
information. This information can be essential for troubleshooting, security audits,
and ensuring users can access the resources they need.
groupname:password:GID:group members
Here is an example of the editors group with two members:
editors:x:2002:damon,tyler
Tyler Carrigan's article Managing local group accounts in Linux presents this
information nicely.
Linux groups are significantly different from local groups in Windows, so be sure to
understand the differences.
Like the user account commands described above, the group management
commands are very intuitive and provide a lot of flexibility. There is an easy-to-
remember command for each function you might need to carry out for a group:
groupadd
groupmod
groupdel
Read: This permission give you the authority to open and read
a file. Read permission on a directory gives you the ability to
lists its content.
Write: The write permission gives you the authority to modify
the contents of a file. The write permission on a directory gives
you the authority to add, remove and rename files stored in
the directory. Consider a scenario where you have to write
permission on file but do not have write permission on the
directory where the file is stored. You will be able to modify the
file contents. But you will not be able to rename, move or
remove the file from the directory.
Execute: In Windows, an executable program usually has an
extension ―.exe‖ and which you can easily run. In Unix/Linux,
you cannot run a program unless the execute permission is
set. If the execute permission is not set, you might still be able
to see/modify the program code(provided read & write
permissions are set), but not run it.
File
Permissions in Linux/Unix
Let‘s see file permissions in Linux with examples:
ls – l on terminal gives
ls - l
r = read permission
w = write permission
x = execute permission
– = no permission
The first part of the code is ‘rw-‘. This suggests that the owner
‗Home‘ can:
The second part is ‘rw-‘. It for the user group ‗Home‘ and group-
members can:
The third part is for the world which means any user. It says ‘r–
‘. This means the user can only:
Syntax:
chmod permissions filename
There are 2 ways to use the command –
1. Absolute mode
2. Symbolic mode
The table below gives numbers for all for permissions types.
Operator Description
+ Adds a permission to a file or directory
– Removes the permission
= Sets the permission and overrides the permissions set earlier.
The various owners are represented as –
User Denotations
u user/owner
g group
o other
a all
We will not be using permissions in numbers like 755 but characters
like rwx. Let‘s look into an example
Tip
The file /etc/group contains all the groups defined in the
system
You can use the command ―groups‖ to find all the groups you
are a member o