Introduction to It Systems Unit-2 (Set-1)
Introduction to It Systems Unit-2 (Set-1)
UNIT-2 (SET-1)
Q.
No.
Question & Answer -2 marks each Bloom's
taxonomy
Level
1 Write any two major types of shells on most UNIX systems with their prompt Level 1
symbol.
Ans Two major types of shells available on most Unix systems with their prompt
symbol are as follows.
Shell prompt symbol
-------- ---------------------
Bourne Shell $
C Shell %
2 Write any two shell commands with their description and syntax. Level 1
Ans Two commands are,
a. Cd (change directory) : cd command is used to change the current
working directory.
Syntax: $ cd <directory name>
b. Mkdir : to create a new directory
Syntax: $ mkdir <directory name>
2 Create the following directory structure using UNIX/Linux bash shell. After Level 3
creation, delete the structure.
Insert mode: this mode is used for inserting text into the file by vi editor.
Whatsoever is typed in this mode is treated as input and placed in temporary
memory and after a command from the user it goes to the file. To switch from
command mode to insert mode, the user need to press ‘i’ on the keyboard. You
need to press ‘Esc’ key to return from insert mode to command mode.
5 Explain the function of grep command briefly with suitable example. Level 2
Ans Grep command globally search for regular expression and print out. This
command searchesa file for a matchingpattern or regular expression.
Example :
Let a text file “hockey.txt” which contains 2 lines content as follows.
India has won 11 medals in field hockey.
India has won 4 medals in in the shooting.
Case 1: Searching for specific Pattern
Syntax: grep "pattern" filename
This searches for the "pattern" in the specified file and prints all lines
that contain the pattern.
Example: grep "medal" hockey.txt
Case 2: Display Line Numbers
Syntax: grep –n "pattern" filename
Example: grep -n “medal” hockey.txt
The output will be,
1: India has won 11 medals in field hockey.
2: India has won 4 medals in in the shooting.
Here, the search pattern “medal” will be highlighted in the line with
line number 1 and 2.
Case 3: Invert Match
Syntax: grep -v "pattern" filename
This prints all lines that do not match the pattern.
Example: grep -v "medal" hockey.txt
Case 4: Counting Matches
Syntax: grep –c “pattern” filename
This counts the number of lines that match the pattern.
Example: Grep -c “medal” hockey.txt
The output will be, 2.
In this case the word “medal” occurs 2 times in hockey.txt, so the
output will be 2.
Case 5: Searching for specific Pattern from multiple filenames
Syntax: grep –h “pattern” filenames
This especially useful in the matching lines themselves, regardless of
which file they came from.
Example: grep –h “medal” hockey.txt file2.txt
6 Explain the major differences between Linux and Windows operating system. Level 4
Ans Key area Linux Windows
Kernel It is an open-source, Unix-like Windows uses a proprietary
operating system. The core of kernel developed by
the Linux OS is the Linux Microsoft. It is based on the
kernel, which is responsible Windows NT kernel, which
for managing hardware and has evolved over the years to
system resources. support modern hardware
and provide a user-friendly
experience.
Source Code Linux is open-source, which Windows is a closed-source,
Availability means the source code is proprietary operating
freely available. Anyone can system. The source code is
view, modify, and distribute it. not available to the public,
This gives users a high degree and users cannot modify the
of control and flexibility over core system. Microsoft
the operating system. maintains full control over
the OS.
User Linux typically uses various Windows has a consistent,
Interface (UI)
desktop environments like user-friendly interface
GNOME, KDE, and Xfce. These (starting with Windows 95 up
environments can be to the latest version,
customized to a high degree, Windows 11). It is known for
offering flexibility to users. its ease of use, with a Start
The interface may be more Menu, taskbar, and window-
technical, but many user- based design that most users
friendly distributions (like find intuitive.
Ubuntu) provide simple,
attractive interfaces.
System Linux can run on older or less Windows tends to require
Requirements powerful hardware. This more system resources (e.g.,
makes it a good choice for RAM, CPU power), especially
lightweight or resource- in newer versions. As a
constrained systems. result, it might not run as
efficiently on older hardware.
7 Explain UNIX architecture with a neat diagram Level 2
Ans The UNIX architecture is known for its simplicity, modularity, and robustness. It
consists of several layers that work together to manage the system. A typical Unix
System Structure is presented below.
Kernel:
A kernel is a backbone of the Unix operating system that is loaded into
the memory on system startup (boot-up time) and manages the overall system
until shutdown.
Shell:
A shell is a special program that acts as an intermediary between the user
and the Kernel of the operating system.Shell is a utility program thatstarts up
when we log on. Shell provides a platform or environment by which any user can
interact with the computer system by typing commands. The shell interprets the
commands typed by the user on the command line or a script file.
In this diagram:
The User Interface is where users interact with the system, usually
through a terminal or graphical interface.
The Shell processes user commands and requests services from the
kernel.
The Utilities provide various tools and programs for file and system
management such as ls, cp, mv, grep, etc.
The Kernel directly interacts with the hardware, managing resources and
system calls.
b. Copy files
cp Projects/Alpha/report.txt Projects/Beta/
cp Projects/Alpha/data.txt Projects/Gamma/
c. Move file
mv Projects/Alpha/summary.txt Projects/Gamma/
e. Concatenate files
cat data.txt >> summary.txt
9 Discuss the step by step procedure to install Ubuntu OS in your system. Level 1
Ans - Plug the bootable media which includes Ubuntu OS into our system.
- Now we need to set the booting sequence to USB disk instead of HDD. This is
done by changing boot priority in the BIOS setting at the time of computer
start.
- Restart the computer and access to BIOS setting by pressing function keys F1
or F2 or F10 or F12 (or any other) depending on your BIOS and computer
manufacturer. It will show your BIOS screen (it may look differ, as per your
system). Give a higher priority to your USB drive.
- Save and exit BIOS settings.
- The booting process will begin once boot media is detected by the BIOS. The
installer will check the disk (file system). The system will prepare to install
Ubuntu operating system.
- After a while, we will see the Ubuntu 20.04 (or any other version) welcome
page. Here we have to click the Install Ubuntu option.
- Next, select the language and click continue.
- Thereafter, select the keyboard layout and click the continue.
- Now we need to select the types of apps we want to begin with. We may
choose any of the available options i.e., Normal or Minimal. We can instruct
the installer to update the ubuntu while installing by checking the checkmark
option.
- Then we need to choose, how we want to install the OS from the available
options. i.e., Erase disk and install ubuntu or something else.
- After confirmation, the disk will be erased accordingly and the installation
will continue.
- Select the time zone i.e., “Kolkata” then press continue.
- Then create login credentials and name of the computer.
- Restart the system to complete the installation.
10 Write short notes on shell commands. Level 2
Ans Shell commands consist of a single or more word separated by white spaces. The
first word is the command, and subsequent words are the options or arguments.
There are two types of internal commands available in Unix, such as,
a. Directory and file manipulation command
b. Terminal, Information & Utility command