0% found this document useful (0 votes)
20 views17 pages

FOSS 2nd Module

Free and open source software Notes

Uploaded by

vorera6922
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
20 views17 pages

FOSS 2nd Module

Free and open source software Notes

Uploaded by

vorera6922
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 17

FOSS

Module II
Linux: Features, history, various Linux distributions, Linux architecture, kernel and shell,
Linux desktop environments- GNOME and KDE, Linux File System and Directories, types of
files, Installing and Configuring Linux, File access permissions, understanding system
administration.
***********

Linux
• Linux is a community of open-source UNIX like operating systems that are based on the
Linux Kernel.
• It was initially released by Linus Torvalds on September 17, 1991. It is a free and open
source0 operating system and the source code can be modified and distributed to anyone
commercially or non-commercially under the GNU General Public License.
• Initially, Linux was created for personal computers and gradually it was used in other
machines like servers, mainframe computers, supercomputers, etc.
• The biggest success of Linux is Android (operating system) it is based on the Linux kernel
that is running on smart phones and tablets.
• Linux is one of popular version of UNIX operating System.
• It is open source as its source code is freely available and it is free to use.
• Linux was designed considering UNIX compatibility.
• Its functionality list is quite similar to that of UNIX.

Linux Features
• Multiuser capability: Multiple users can access the same system resources like memory,
hard disk, etc. But they have to use different terminals to operate.
• Multitasking: More than one function can be performed simultaneously by dividing the
CPU time intelligently.
• Portability: Portability doesn't mean it is smaller in file size or can be carried in pen
drives or memory cards. It means that it support different types of hardware.
• Security: It provides security in three ways namely authenticating (by assigning password
and login ID), authorization (by assigning permission to read, write and execute) and
encryption (converts file into an unreadable format).
• Graphical User Interface (X Window system): Linux is command line based OS but it
can be converted to GUI based by installing packages.

1
FOSS

• Support's customized keyboard: As it is used worldwide, hence supports different


languages keyboards.
• Application support: It has its own software repository from where users can download
and install many applications.
• File System: Provides hierarchical file system in which files and directories are arranged.
• Open Source: Linux code is freely available to all and is a community based development
project.

Linux Distributions (Distros)

Linux distributions might be:

o Non-commercial or commercial
o Developed for home users, power users, or enterprise users
o Supported on two or more types of platform or hardware-specific, even to the certification
extension via platform vendor.
o Developed for embedded, desktop, or server devices
o Highly specialized or general purpose toward particular machine functionalities (e.g.,
computer clusters, network routers, and firewalls)
o Targeted at particular user groups, e.g., by language internationalization and localization or
by including several scientific computing and music production packages

Choosing a Linux Distro:

Distribution Why To Use

UBuntu It works like Mac OS and easy to use.

Linux mint It works like windows and should be use by new comers.

Debian It provides stability but not recommended to a new user.

Fedora If you want to use red hat and latest software.

Red hat enterprise To be used commercially.

2
FOSS

CentOS If you want to use red hat but without its trademark.

Opens USE It works same as Fedora but slightly older and more stable.

Arch Linux It is not for the beginners because every package has to be
installed by yourself.

There are on an average six hundred Linux distributors providing different features. Some of the
popular Linux distributions are:
1) Ubuntu
• It came into existence in 2004 by Canonical and quickly became popular.
• Canonical wants Ubuntu to be used as easy graphical Linux desktop without the use of
command line.
• It is the most well-known Linux distribution.
• It comes with a lots of pre-installed apps and easy to use repositories libraries.
• Earlier, Ubuntu uses GNOME2 desktop environment but now it has developed its own
unity desktop environment.
• It releases every six months and currently working to expand to run on tablets and smart
phones.

2) Linux Mint
• Mint is based on Ubuntu and uses its repository software so some packages are common
in both.
• Earlier it was an alternative of Ubuntu because media codecs and proprietary software are
included in mint but was absent in Ubuntu.
• But now it has its own popularity and it uses cinnamon and mate desktop instead of
Ubuntu's unity desktop environment.

3) Debian
• Debian has its existence since 1993 and releases its versions much slowly then Ubuntu
and mint.
• This makes it one of the most stable Linux distributor.

3
FOSS

• Ubuntu is based on Debian and was founded to improve the core bits of Debian more
quickly and make it more user friendly.
• Every release name of Debian is based on the name of the movie Toy Story.

4) Red Hat Enterprise / CentOS


• Red hat is a commercial Linux distributor.
• These products are red hat enterprise Linux (RHEL) and Fedora which are freely
available.
• Red hat uses trademark law to prevent their software from being redistributed.
• CentOS is a community project that uses red hat enterprise Linux code but removes all its
trademark and make it freely available.
• In other words, it is a free version of RHEL and provide a stable platform for a long time.

5) Fedora
• It is a project that mainly focuses on free software and provides latest version of software.
• It doesn't make its own desktop environment but used 'upstream' software. By default it
has GNOME3 desktop environment.
• It is less stable but provides the latest stuff.

Architecture of Linux:
Linux architecture has the following components:
1. The Kernel
2. System Library
3. Hardware layer
4. System
5. Shell utility.

4
FOSS

1. Kernel:
• The kernel is one of the core section of an operating system.
• It is responsible for each of the major actions of the Linux OS.
• This operating system contains distinct types of modules and cooperates with
underlying hardware directly.
• The kernel facilitates required abstraction for hiding details of low-level hardware or
application programs to the system.
• There are some of the important kernel types which are mentioned below:
• Monolithic Kernel
• Micro kernels
• Exo kernels
• Hybrid kernels

2. System Libraries:-
• These libraries can be specified as some special functions.
• These are applied for implementing the operating system's functionality and don't need code
access rights of the modules of kernel.

3. System Utility Programs:-


• It is responsible for doing specialized level and individual activities.

4. Hardware layer:-
• Linux operating system contains a hardware layer that consists of several peripheral devices
like CPU, HDD, and RAM.

5. Shell:-
• It is an interface among the kernel and user.
• It can afford the services of kernel.
• It can take commands through the user and runs the functions of the kernel.
• The shell is available in distinct types of OS.
• These operating systems are categorized into two different types, which are the graphical
shells and command-line shells.
• The graphical line shells facilitate the graphical user interface, while the command line
shells facilitate the command line interface.

5
FOSS

• Thus, both of these shells implement operations. However, the graphical user interface shells
work slower as compared to the command-line interface shells.
• There are a few types of these shells which are categorized as follows:
o Korn shell
o Bourne shell
o C shell
o POSIX shell

APPLICATIONS:
o Yamaha Motive Keyboard
o Volvo In-Car Navigation System
o TiVo Digital Video Recorder
o Sony Reader
o Sony Bravia Television
o One Laptop Per child XO2
o Motorola MotoRokr EM35 phone
o Lenovo IdeaPad S9
o HP Mini 1000
o Google Android Dev Phone 1
o Garmin Nuvi 860, 880, and 5000
o Dell Inspiron Mini 9 and 12

Linux Kernel and Shell


1. Shell : A shell is an environment or a special user program which provide an interface to
user to use operating system services. It executes programs based on the input provided
by the user.
2. Kernel : Kernel is the heart and core of an Operating System that manages operations of
computer and hardware. It acts as a bridge between the user and the resources of the system
by accessing various computer resources like the CPU, I/O devices and other resources.

6
FOSS

S.No. Shell Kernel


1. Shell allows the users to communicate Kernel controls all the tasks of the system.
with the kernel.
2. It is the interface between kernel and It is the core of the operating system.
user.
3. It is a command line interpreter (CLI). Its a low level program interfacing with the
hardware (CPU, RAM, disks) on top of which
applications are running.
4. Its types are – Bourne Shell, C shell, Its types are – Monolithic Kernel, Micro kernel,
Korn Shell, etc. Hybrid kernel, etc.
5. It carries out commands on a group of It performs memory management.
files by specifying a pattern to match
6. Shell commands like ls, mkdir and It performs process management.
many more can be used to request to
complete the specific operation to the
OS.
7. It is the outer layer of OS. It is the inner layer of OS.
8. It interacts with user and interprets to Kernel directly interacts with the hardware by
machine understandable language. accepting machine understandable language
from the shell.
9. Command-line interface that allows Core component of the operating system that
user interaction. manages system resources.

10. Interprets and translates user Provides services to other programs running on
commands. the system.

11. Acts as an intermediary between the Operates at a lower level than the shell and
user and the kernel interacts with hardware

12. Provides various features like Responsible for tasks such as memory
command history, tab completion, and management, process scheduling, and device
scripting capabilities drivers

7
FOSS

13. Executes commands and programs Enables user and applications to interact with
hardware resources

Linux Desktops Environment


• One exciting aspect of Linux unlike with Windows and Mac OS X, is its support for
numerous number of desktop environments, this has enabled desktop users to choose the
appropriate and most suitable desktop environment to best work with, according to their
computing needs.
• A Desktop Environment is an implementation of the desktop consist of collection of
different user and system programs running on top of an operating system, and share a
common GUI (Graphical User Interface), also known as a graphical shell.

1. GNOME (GNU Network Object Model Environment)


• GNOME is probably the most popular desktop environment among Linux users, it is free
and open source, simple, yet powerful and easy to use.
• It is designed from ground up to offer Linux desktop users a wonderful and exciting
computing experience.
• It presents an activities overview for easy access to basic tasks, provides a powerful search
tool for users to access their work from any place.
Features:
• Comes with Nautilus as default file manager.
• Supports desktop notifications using a convenient messaging system.
• Enables on/off switching of desktop notifications and many more

8
FOSS

2. KDE
• KDE stands for K Desktop Environment. It is a desktop environment for Linux based
operation system.
• KDE is a well-known, powerful and highly customizable desktop environment, designed
to offer Linux desktop users absolute control over their desktop.
• The latest release in the KDE desktop series is the Plasma 5, which has brought in several
improvements and new features.
• It has come with clean and well-polished user interfaces in comparison to previous
versions, with improved readability.
• It have notable components and new features include: Dolphin file manager, Kwin
window manager, A converged shell, Updated graphics stack enabling smoother graphics
performance, modernized launchers , Workflow improvements in the desktop notification
area , Improved support for high-density (high-DPI) display plus many other minor
features

Other Popular Linux environment includes: XFCE, MATE, Cinnamon, Deepin, Budgie,
Pantheon, and LXQT.

9
FOSS

Linux File System


• A Linux file system is a structured collection of files on a disk drive or a partition. A
partition is a segment of memory and contains some specific data. In our machine, there
can be various partitions of the memory. Generally, every partition contains a file system.
• Linux file system is generally a built-in layer of a Linux operating system used to handle
the data management of the storage. It helps to arrange the file on the disk storage. It
manages the file name, file size, creation date, and much more information about a file.

File System Hierarchy Structure


• The Linux File Hierarchy Structure or the File system Hierarchy Standard (FHS) defines the
directory structure and directory contents in Unix-like operating systems.
• It is maintained by the Linux Foundation.
• In the FHS, all files and directories appear under the root directory /, even if they are stored
on different physical or virtual devices.
• Some of these directories only exist on a particular system if certain subsystems, such as the
X Window System, are installed.
• Most of these directories exist in all UNIX operating systems and are generally used in much
the same way; however, the descriptions here are those used specifically for the FHS, and are
not considered authoritative for platforms other than Linux.

10
FOSS

Linux Directory structure


• In Linux/Unix operating system everything is a file even directories are files, files are files, and
devices like mouse, keyboard, printer, etc are also files.
• We know that in a Windows-like operating system, files are stored in different folders on different
data drives like C: D: E: whereas in the Linux/Unix operating system files are stored in a tree-
like structure starting with the root directory.

• The main directories are –root and home

Root Directory Home Directory


The root directory is the topmost level of The home directory is a subdirectory of the root
the system drive. directory.

It is denoted by a slash '/'. It is denoted by '~' and has path "/users/username".

The admin has access to make any changes No user other than the root user can change the
in the files and settings. settings of the entire system.

The admin can create a user. Any user having a home directory cannot create a
user.

In the Linux file system, everything comes The home directory contains a particular user's data.
under the root directory.

These are the common top-level directories associated with the root directory:

11
FOSS

Directories Description

/bin binary or executable programs.

/etc system configuration files.


/home home directory. It is the default current directory.
/opt optional or third-party software.

/tmp temporary space, typically cleared on reboot.


/usr User related programs.
/var log files.

TYPES OF FILES IN THE LINUX SYSTEM.


1. General Files – It is also called ordinary files. It may be an image, video, program, or
simple text file. These types of files can be in ASCII or Binary format. It is the most commonly
used file in the Linux system.
2. Directory Files – These types of files are a warehouse for other file types. It may be a
directory file within a directory (subdirectory).
3. Device Files – In a Windows-like operating system, devices like CD-ROM, and hard
drives are represented as drive letters like F: G: H whereas in the Linux system devices are
represented as files. As for example, /dev/sda1, /dev/sda2, and so on.

Linux File Commands

Command Description

file Determines file type.

touch Used to create a file.


rm To remove a file.

cp To copy a file.
mv To rename or to move a file.
rename To rename file.

Installing and Configuring Linux


Installing the Linux Software after resizing your existing partitions to make space for Linux, you
are ready to install the software.

12
FOSS

Here is a brief overview of the procedure:


1. Boot the Linux installation media.
2. Run fdisk under Linux to create Linux partitions. [fdisk: format disk is a dialog-driven
command in Linux used for creating and manipulating disk partition table.]
3. Run mke2fs and mkswap to create Linux filesystems and swap space.[mke2fs- used to
create an ext2, ext3, or ext4 file system, usually in a disk partition (or file) named by device and
mkswap- sets up a Linux swap area on a device or in a file. ]
4. Install the Linux software and configure it. [Install the Linux software and configure it.]
5. Finally, either install the LILO [linux loader]boot loader on your hard drive, or create a
boot floppy in order to boot your new Linux system.

REFER: https://docstore.mik.ua/orelly/linux/run/ch03_01.htm

File access permissions in Linux


Linux is a multi-user operating system, so it has security to prevent people from accessing each
other’s confidential files.

• When you execute a “ls” command, you are not given any information about the security
of the files, because by default “ls” only lists the names of files.
• You can get more information by using an “option” with the “ls” command. All options
start with a ‘-‘.
• For example, to execute “ls” with the “long listing” option, you would type ls -l
When you do so, each file will be listed on a separate line in a long format.
• Syntax:
ls
ls -l

13
FOSS

There’s a lot of information in those lines.

1. The first character = ‘-‘, which means it’s a file


‘d’, which means it’s a directory.
2. The next nine characters = (rw-r–r–) show the security
3. The next column shows the owner of the file. (Here it is `root`)
4. The next column shows the group owner of the file. (Here it is `root` which has special
access to these files)
5. The next column shows the size of the file in bytes.
6. The next column shows the date and time the file was last modified.
7. Last Column = File_name or Directory_name. (For example, here are: prac, snap, test,
example)

Security permissions in Linux


First, you must think of those nine characters as three sets of three characters (see the box at the
bottom). Each of the three “rwx” characters refers to a different operation you can perform on the
file.

--- --- ---


rwx rwx rwx
user group other

14
FOSS

Read, write, and execute.

Letters Definition

‘r’ “read” the file’s contents.

‘w’ “write”, or modify, the file’s contents.

‘x’ “execute” the file. This permission is given only if the file is a program.

Symbols: `+`, `-` and `=`

Operators Definition

`+` Add permissions

`-` Remove permissions

`=` Set the permissions to the specified values

User, group, and others


Reference Class Description
`u` user The user permissions apply only to the owner of the file or
directory, they will not impact the actions of other users.
`g` group The group permissions apply only to the group that has been
assigned to the file or directory, they will not affect the actions of
other users.
`o` others The other permissions apply to all other users on the system, this
is the permission group that you want to watch the most.
`a` All All three (owner, groups, others)
three

15
FOSS

Reading the security permissions

For example: “rw- r-x r–“


• “rw-“: the first three characters `rw-`. This means that the owner of the file can “read” it
(look at its contents) and “write” it (modify its contents). we cannot execute it because it is
not a program but a text file.
• “r-x”: the second set of three characters “r-x”. This means that the members of the group
can only read and execute the files.
• “r–“: The final three characters “r–” show the permissions allowed to other users who have
a UserID on this Linux system. This means anyone in our Linux world can read but cannot
modify or execute the files’ contents.

Changing Permissions

To change the file or the directory permissions, you use the chmod (change mode) command. There
are two ways to use chmod — the symbolic mode and the absolute mode.

Linux System Administration


• Linux is a major strength in computing technology.
• Most web servers, mobile phones, personal computers, supercomputers, and cloud servers are
powered by Linux.
• The job of a Linux systems administrator is to manage the operations of a computer system
like maintaining, enhancing, creating user accounts/reports, and taking backups using Linux
tools and command-line interface tools.
• Most computing devices are powered by Linux because of its high stability, high security, and
open-source environment.
• There are some of the things that a Linux system administrator should know and understand:

1. Linux File Systems


• A Linux system administrator should have a solid knowledge and understanding of the
various Linux file systems used by Linux like Ext2,Ext,and Ext4 .
• Understanding the difference between these file systems is important so that one can easily
perform tasks and partition disks or configure Linux file system permissions.

16
FOSS

2. File System Hierarchy


The Linux File System Hierarchy (FHS) tells us about the location and structure of directories
and files on a Linux system. It is important for managing system files effectively.

3. Managing Root/Super User


The root user is the most powerful user on a Linux System because it has access to all the system
files and directories. So, it is important for maintaining system security.

4. Basic Bash Command


The default shell of Linux is Bash, and it is used for executing commands on the command-line
interface. A Linux system administrator should have a basic understanding of the command of
bash to perform tasks.

5. Handling File, Directories, and Users


Managing files, directories and users is a critical part of Linux system administration. A system
administrator should be able to perform the basic file and directory management tasks.

Duties of a Linux Administrator:


• Maintain all internet requests inclusive to DNS, RADIUS, Apache, MySQL, PHP.
• Taking regular back up of data, create new stored procedures and listing back-up is one of the
duties.
• Analysing all error logs and fixing along with providing excellent customer support for
Webhosting, ISP and LAN Customers on troubleshooting increased support troubles.
• Communicating with the staff, vendors, and customers in a cultivated, professional manner at
all times has to be one of his characteristics.
• Enhance, maintain and create the tools for the Linux environment and its users.
• Detecting and solving the service problems ranging from disaster recovery to login problems.
• Installing the necessary systems and security tools. Working with the Data Network Engineer
and other personnel/departments to analyze hardware requirements and makes acquiring
recommendations.
• Troubleshoot, when a problem occurs in the server.

*******END OF MODULE 2*******

17

You might also like