You are on page 1of 6

# Linux assignment questions : 31st March 2021

Kiran K

kiransk40@gmail.com

-------------------------------------------
1. Explain various Linux Features ?

o Multiuser capability: Multiple users can access the same system resources like memory, hard
disk, etc. But they have to use different terminals to operate.

o 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).

o Multitasking: More than one function can be performed simultaneously by dividing the CPU
time intelligently.

o File System: Provides hierarchical file system in which files and directories are arranged.

o Open Source: Linux code is freely available to all and is a community based development
project.

2. Explain what’s Kernel? What’s Shell - evolution of SHELL?

 The kernel is a computer program at the core of a computer's operating system that has complete
control over everything in the system. It is the "portion of the operating system code that is
always resident in memory", and facilitates interactions between hardware and software
components. On most systems, the kernel is one of the first programs loaded on startup.

 A shell is a computer program which exposes an operating system's services to a human user or
other program. In general, operating system shells use either a command-line interface (CLI) or
graphical user interface (GUI), depending on a computer's role and particular operation. It is
named a shell because it is the outermost layer around the operating system.

 Evolution of SHELL

o Ken Thompson (of Bell Labs) developed the first shell for UNIX called the V6 shell in
1971.
o Beyond the Thompson shell, we begin to look at modern shells in 1977, when the Bourne
shell was introduced. The Bourne shell, created by Stephen Bourne at AT&T Bell Labs
for V7 UNIX, remains a useful shell today. The Bourne shell had two primary goals:
serve as a command interpreter to interactively execute commands for the operating
system and for scripting (writing reusable scripts that could be invoked through the shell).
In addition to replacing the Thompson shell, the Bourne shell offered several advantages
over its predecessors. Bourne introduced control flows, loops, and variables into scripts,
providing a more functional language to interact with the operating system (both
interactively and no interactively).
o The C shell was developed for Berkeley Software Distribution (BSD) UNIX systems by
Bill Joy in 1987. One of the key design objectives for the C shell was to create a scripting
language that looked similar to the C language. This was a useful goal, given that C was
the primary language in use.
o The Korn shell (ksh), designed by David Korn, was introduced around the same time as
the Tenex C shell. One of the most interesting features of the Korn shell was its use as a
scripting language in addition to being backward-compatible with the original Bourne
shell.
o The Bourne-Again Shell, or Bash, is an open source GNU project intended to replace the
Bourne shell. Bash was developed by Brian Fox and has become one of the most
ubiquitous shells available. As its name implies, Bash is a superset of the Bourne shell,
and most Bourne scripts can be executed unchanged.In addition to supporting backward-
compatibility for scripting, Bash has incorporated features from the Korn and C shells.
You’ll find command history, command-line editing, a directory stack (pushd and popd),
many useful environment variables, command completion, and more.
o

3. Explain various Types of SHELLs ( in Scripting ) ?

1. The C Shell – Denoted as csh


Bill Joy created it at the University of California at Berkeley. It incorporated features such as
aliases and command history. It includes helpful programming features like built-in arithmetic
and C-like expression syntax.

2. The Bourne Shell – Denoted as sh.


It was written by Steve Bourne at AT&T Bell Labs. It is the original UNIX shell. It is faster and
more preferred. It lacks features for interactive use like the ability to recall previous commands. It
also lacks built-in arithmetic and logical expression handling. It is default shell for Solaris OS.

3. The Korn Shell It is denoted as ksh .


It was written by David Korn at AT&T Bell Labs. It is a superset of the Bourne shell. So it
supports everything in the Bourne shell. It has interactive features. It includes features like built-
in arithmetic and C-like arrays, functions, and string-manipulation facilities. It is faster than C
shell. It is compatible with script written for C shell.
4. Explain the difference between SHELL Script & Bash ?

Shell script is a generic name to a bunch of command line instructions put together to be executed
(interpreted) by a shell like Bash. Bash is a command line interpreter developed by GNU. Bash is the
standard shell used in many UNIX like operating systems like GNU/Linux. There are other command line
interpreters also like Sh (Bourne Shell), Ksh (Korn Shell), Csh (C Shell) used by various UNIX like
operating systems.

Bash (Bourne again Shell) syntax and capabilities and interpretation for certain things are different than
lets say Ksh and instructions for one may not work in same way in other. But shell like Bash can interpret
instructions for Sh by behaving itself as Sh interpreter.

5. Explain various Difference between Linux & Windows ( filesystem, Compatibility etc..)?

File Systems

 In Microsoft Windows, files are stored in directories/folders on different data drives like C: D: E:
but, in Linux, files are ordered in a tree structure starting with the root directory, further branched
out to various other sub-directories.
 In Linux, everything is treated like a file. Directories are files, files are files, and externally
connected devices (such as Printer, mouse, keyboard) are also files.

Compatibility

 Windows shoots. Windows scores. This is where the Redmond offering wipes the floor with
Linux. Despite recent improvements in software being ported or developed to Linux, Windows is
still the king of compatibility.
 Users of Windows can be certain that almost any software (even the most obscure, outdated
software) will work, even when it is abandoned by developers. Windows has great legacy
support. Plain and simple.
 Linux, on the other hand, has been struggling with basics that Windows users take for granted.

Security

 Every Windows user has faced security and stability issues at some point in time. Since Windows
is an extensively used OS, hackers, spammers target Windows frequently. Windows (consumer
versions) were originally designed for ease-of-use on a single-user PC without a network
connection and did not have security features built in. Microsoft often releases security patches
through its Windows Update service. These go out once a month, although critical updates are
made available at shorter intervals or when necessary.
 On the other hand, Linux is based on a multi-user architecture, making it way more stable than a
single-user OS like Windows. As Linux is community-driven with regular monitoring by the
developers from every corner of the earth, any new problem raised can be solved within a few
hours and the necessary patch can be ready for supply.

6. How does Opensource Work ? whats GNU ?

 Open source software (OSS) is software that is distributed with its source code, making it
available for use, modification, and distribution with its original rights. ... Programmers who
have access to source code can change a program by adding to it, changing it, or fixing parts of it
that aren't working properly.
 GNU
GNU is an extensive collection of free software, which can be used as an operating system or can
be used in parts with other operating systems. The use of the completed GNU tools led to the
family of operating systems popularly known as Linux. Most of GNU is licensed under the GNU
Project's own General Public License.

7. What’s BSD license? Explain Linux Ecosystem?

 BSD licenses are a family of permissive free software licenses, imposing minimal restrictions on
the use and distribution of covered software. This is in contrast to copy left licenses, which have
share-alike requirements.
 LINUX ECOSYSTEM
 Just like Windows, iOS, and Mac OS, Linux is an operating system. In fact, one of the
most popular platforms on the planet, Android, is powered by the Linux operating
system. An operating system is software that manages all of the hardware resources
associated with your desktop or laptop. To put it simply, the operating system manages
the communication between your software and your hardware. Without the operating
system (OS), the software wouldn’t function.
 Linux has evolved into one of the most reliable computer ecosystems on the planet.
Combine that reliability with zero cost of entry and you have the perfect solution for a
desktop platform.
 Linux is also distributed under an open source license.
 Linux has a number of different versions to suit any type of user. From new users to hard-
core users, you’ll find a “flavor” of Linux to match your needs. These versions are called
distributions
8. What are the Various Layers of Linux Distribution ?

The architecture of a Linux System consists of the following layers

 Hardware layer − Hardware consists of all peripheral devices (RAM/ HDD/ CPU etc).
 Kernel − It is the core component of Operating System, interacts directly with hardware, provides
low level services to upper layer components.
 Shell − An interface to kernel, hiding complexity of kernel's functions from users. The shell takes
commands from the user and executes kernel's functions.
 Utilities − Utility programs that provide the user most of the functionalities of an operating
systems.

9. Explain Linux Installation Process ? what are Linux Partition ?

 Step 1) Download the .iso or the OS files on your computer from official website of any linux
distro (in our case Ubuntu).
 Step 2) Download free software like 'Universal USB installer to make a bootable USB stick.
 Step 3) Select an Ubuntu Distribution form the dropdown to put on your USB
Select your Ubuntu iso file download in step 1.
Select the drive letter of USB to install Ubuntu and Press create button.
 Step 4) Click YES to Install Ubuntu in USB.
 Step 5) after everything has been installed and configured, a small window will appear
Congratulations! You now have Ubuntu on a USB stick, bootable and ready to go.

Linux Partition

Imagine your company is moving into a new building that is set up like a warehouse. There are no
internal walls; it’s just one big room for everybody to work in. Chances are, the first thing the boss is
going to do is build himself an office (he wouldn’t want to associate with you workers), so he’ll have a
partition set up, an internal wall to separate him from you. Next, each worker will get a cubicle in the big
room with smaller partitions to separate you from the person next to you.

Hard drives work the same way. The disk gets partitioned into smaller, separate pieces which can belong
to different owners. In our case, Windows might own some and Linux will own others. On hard drives
though, the word “partition” does not refer to the wall itself, it refers to the separated space. So we say
Linux is installed “on” the first partition.

10. List out some Linux commands & explain briefly.

i. pwd: This command Displays the current working directory of the terminal.
ii. echo: This command writes its arguments to standard output.
iii. Sudo: This command executes only that command with root/ superuser privileges.
iv. su: This command is used to switch to root-user so that superuser permissions can be used to
execute commands
v. mv: This command moves files and directories from one directory to another. The file/directory
once moved, is deleted from the working directory.
vi. ls :This command lists all the contents in the current working directory.

You might also like