UP Board Solutions for Class 10 Computer Science Chapter 5 Linux Operating System
Linux Operating System Long Answer Type Questions (8 Marks)
Question 1.
What is System Software? What are its components? (UP 2006, 07, 12, 16)
Answer:
System Software is a set of programs that manage the resources of a computer system i.e. processing time, storage space etc. so that they are used in an optimal fashion, provide routine services such as copying data from one file to another and assist in the development of application programs. System software programs assist the computer in the efficient control, support, development and execution of application programs.
System software began to be used with the second generation computers. In this, the operation of a computer was primarily controlled by human operators. Human intervention wasted large amounts of computer time and human resources. To automate these functions, companies developed programs called operating systems. These programs are stored partially in primary storage and partially in direct-access secondary storage devices so the computer can access them immediately when they are needed. Operating systems manage a queue of jobs that are awaiting execution, can be read onto a disk. The operating systems will start each job when system resources are available for its execution.
System software can be classified into three types:
1. System control programs: These programs control the execution of programs, manage the storage and processing resources to the computer and perform other management and monitoring functions. The most common programs are an operating system, database management systems and communication monitors.
2. System support programs: These programs provide routine service functions to the other computer programs and computer utters. Utilities, librarians, performance monitors and job accounting are the most common examples.
3. System development programs: These programs assist in the creation of application programs. The language translators such as BASIC interpreter and application generators are the examples. System software’s are developed by system programmers and sold by both computer companies and specialized software firms.
Question 2.
What do you understand by ‘Operating System’? Describe the functions and features of LINUX. (UP 2013, 15)
Or
What is an operating system? Give the basic structure of LINUX. (UP 2005, 10)
Or
What is an OS? Explain the main features of LINUX. (UP 2016, 19)
Answer:
An operating system is system software which performs the following functions:
- Processor management, that is, assignment to processors of different tasks being performed by the computer system.
- Memory management, that is, allocation of main memory and other storage areas to the system programs as well as user programs and data.
- Input/Output management, that is, coordination and assignment of the different input and output devices while one or more programs are being executed.
- File management, that is, the storage of files on various storage devices and the transfer of these files from one storage device to another. It also allows all files to be easily changed and modified through the use of text editors or some other file manipulation routines.
- Coordination and assignment of compilers, assemblers, utility programs and other software to various users of the computer system.
- Establishment of data security and integrity. That is, ‘it keeps different programs and data in such a manner that they do not interfere with each other, It also protects itself from being destroyed by any user.
- Facilitates easy communication between the computer system and the computer (human) operator.
- Maintenance of internal time clock and log of system usage for all the users.
LINUX Operating System:
The Linux operating system has three important features:
- The Kernel
- The Shell
- Linux file system
Kernel: The kernel is the core of the Linux system. The kernel controls the sources of the computer, allotting them to different users and tasks. It is loaded in whenever the system is started up referred to as a boot of the system. It will manage the entire resources of the system, presenting them to you and every other user as a coherent system.
The functions performed by the kernel are:
- Managing the machine’s memory and allocating it to each process.
- Organising the transfer of data from one part of the machine to another.
- Accepting instructions from the shell and carrying them out.
- Enforcing the access permissions that are in force on the file system.
Shell: Linux has a simple user interface called the shell that has the power to provide the services that a user wants. You can see its prompt at the bottom left of your screen. You may enter commands at this prompt. The shell acts as a command interpreter, it takes each command and passes it to the operating system kernel to be acted upon. It then displays the results of this operation on your screen.
The important features provided by the shell are as follows:
- create an environment that meets the user, needs
- write shell scripts
- manipulate the command history
- define-command aliases
- automatically complete the command line
- edit the command line.
There are several different shells available on your system. The most popular shells are bash, pdkash, tesh, zsh, ash.
Linux File System: A file system is a logical method for organising and storing large amounts of information in a way which makes it easy to manage. The file is the smallest unit in which information is stored.
Features of LINUX: Following are the features of LINUX:
- Linux operating system is freely available, which can be loaded in
as many machines and as many times as necessary with a single package, without any licence. - Linux is a multiuser operating system. Not only can you have many user accounts available on a Linux system, but you can also have multiple users logged in and working on the system at the same time?’
- In Linux, it is possible to have many programs running at the same time, which means that not only can you have many programs going at once, but that the Linux can itself have programs running in the background.
- Linux can rely on two working environments, i.e., Shell, i.e., work interface command lines similar to DOS. X-Window, with lots of graphic interface options, including one that is very similar to an improved Windows 95/98.
- Linux does disk formatting without interfering with the machine’s performance.
- Linux has strong cryptography which offers you more security.
- Linux can be installed in several machine profiles without the need to configure the software.
- Linux operating system is safe from the virus since common users don’t have access to the system’s main kernel.
- Linux can rely on freely distributed software as well as commercial applications.
- Linux offers support for a variety of local area network (LAN) boards, modems and serial devices to connect your Linux system to a network.
Question 3.
Give names of various desktops available in Linux and describe any one of them. (UP 2014, 15)
Answer:
Linux allows us to work with different desktop environments like KDE, GNOME, etc. By default, Red Hat Linux starts you off with a GNOME desktop.
KDE (K-Desktop Environment):
The desktop of the KDE is shown below. The user can run an application by clicking the corresponding icon or menu-item.
When you click Start-here icon the window shown below will appear on your screen. It has three options to work accordingly.
The three options are:
Applications: By clicking this option you can configure various options available in it as shown in the figure below. This option allows you to work on different applications like applications of accessories, games, office, etc. You can also work with different tools of Linux.
Preferences: This is the second option of Start-here. It allows you to access all the preference menu items available on your computer. By clicking this you can configure you panel, desktop, printer, etc.
System Settings: This is the third option of Start-here. It allows you to do setting of different options available in it like setting of server, data and time, network, keyboard, mouse etc.
Working with Terminal Window
To work with the terminal window you need to click Start menu >> system tools >> terminal.
The terminal window provides command-line interface with GUI’s features, as shown in the figure below:
This window acts like a character-based terminal and you can execute commands/utilities as like in terminals.
Network Configuration:
To configure you need to click network option of system settings (of a start here), as shown in the figure below:
After clicking the network option of the above window a window will appear on the screen with the title ‘Network configuration’ (shown in the figure below).
From this window, you can add connected cards (Internet card, LAN card) to your system. You can also edit pre-defined networks. This window provides you with the facility to go through the various network options like add network, delete a network, etc.
Working with Pop-up Menu:
Whenever you click right button, a menu appears on the screen known as ‘Pop-up-menu’, which provides you with a quick working with various options available, like create a new directory, new file (text, Html), access to GD drive, etc.
Creating a new directory: To create a new directory click right mouse button and select
Create new >> Directory as shown in the figure:
Type the name of directory you want to create and click Ok button.
Creating a New Text File: To create a new text file click right button of mouse and select Create new >> Text file as shown in the figure:
Type the name of file you want to create and click OK button.
Question 4.
What is the Graphical User Interface (GUI)? Explain it with reference to LINUX. (UP 2008)
Answer:
Graphical User Interface: Today, computers have an operating system which is called GUI’s. A GUI (Graphical User Interface) operating system is one which is capable of executing the commands by displaying a menu from which the user can select a command using the mouse. The GUI features of LINUX is known as the X-window system or simply X (this x- window does not mean the Microsoft’s Windows operating system). The GUI is a bitmapped display, while the command line interface is character-based display. The X Free 86 is the Red Hat’s version of the x-window system. This x-window system was created in 1984 at the Massachusetts Institute of Technology (MIT). In the x-window system, several windows can be opened, each running a different application.
The x-window system works on client-server technology. The x-server is a process that displays information from applications (x-clients) using the x-GUI. Any application/program that makes requests of the x-server will become the x-client. Some systems have a graphic login that automatically starts the x-server when the system boots.
Linux is a multi-user operating system. It means multiple users can work on it and to maintain the security among different users we need to login in Linux by giving user name and password. After the computer boot and the operating system has started, the operating system asks for user name and password. On the login window, there are several buttons with various functions; you need to give user name and password to start with the Linux desktop and ignore the other buttons. Linux allows us to work with different desktop environments like KDE, GNOME, etc. By default, Red Hat Linux starts you off with a GNOME desktop.
Question 5.
What do you mean by Vi text editor in LINUX? Describe it. (UP 2008, 19)
Or
What is an ‘Editor’? Explain in detail the features in the context of Vi Text Editor. (UP 2009)
Answer:
Vi Text Editor: An editor is a utility program enabling the user to create or modify text files. The visual editor or vi displays a window of text for edit operations. The vi editor is used by the following command:
# vi filename ↵
By default, the vi editor will be open in command mode. The ESC key is used to switch over from command mode to edit mode. The vi editor has three modes: command, insert, and last line mode, firstly the vi editor opens in command mode, where you can move the cursor around, delete or append text: When you are in inert mode, you can insert text. You cannot move a cursor around while you are in insert mode. Whereas last line mode is for commands beginning with: as well as command starting with /, ? or !. Whenever you type the last line command, your cursor moves to the last line of your screen.
vi commands are case sensitive, the ‘a’ command is different from ‘A’ command.
Editing a New File: To create a new file, the syntax is: vi < filename >
type i, start typing the text you want to insert. Do not press Return key after typing the i; only start typing your input text.
Saving Your File: To save a file type: wq. when you type:, your cursor will move to the bottom of the screen, zz is the alternate command to save but it is not safer than wr, zz is easier! Normally, you shouldn’t have problems using zz. : q ! is used to exit from vi editors without saving.
Some of the most commonly Used Vi Commands:
Command → Meaning
<Esc> → Used to return from command mode.
<Ret> → Used to go to the first non-blank character of the next line.
<-> → Go to the first non-blank character of the previous line.
<a> → Used to append text after the cursor.
<A> → Used to append text at the end of the current line.
<dd> → Used to delete the current line.
<D> → Used to delete.
<u> → Used to undo the last change.
<U> → Used to undo all changes to the current line.
<x> → Delete the current character.
<zz> → Used to save changes and exit.
Question 6.
Explain CLI in LINUX. (UP 2005, 12)
Answer:
Command Line Interface (CLI): Before icons and windows tools
over computer screens, commands are typed to run most computers. On UNIX systems, from which Red Hat Linux was derived, the program used to interpret and manage commands was referred to as the shell. The shell interface provides a way to run programs, work with the file system, compile computer code, and manage the computer. If you type something wrong on a command line, the shell ensures that you have to delete the entire line and start over. As you edit a command line, you can type regular characters. The character appears at the location of your cursor. You can use right (→) and left (←) arrow keys to move the cursor from one end to the other on the command line. There are many keystrokes you can use to edit your command
lines.
Keystrokes for Editing Text in Command Lines:
Keystroke → Meaning
Alt + t → Switch positions of current and previous words
Alt + U → Change the current word to upper case
Alt + l → Change the current word to lower case
Alt + c → Change the current word to the initial capital
Ctrl + d → Delete the current character
Ctrl + t → Switch positions of current and previous characters
Ctrl + v → Insert a special character
Keystrokes for Editing Text in Command Lines:
Keystroke → Meaning
Alt + d → Cut the word followed by the cursor
Alt + y → Paste the earlier cut text
Ctrl + c → Delete the entire line
Ctrl + k → Cut text to the end of line
Ctrl + u → Cut text to the beginning of the line
Ctrl + w → Cut the word
Ctrl + y → Paste latest cut text
Question 7.
What is the GUI? What are its advantages? (UP 2006, 07, 08, 11)
Answer:
Graphical User Interface (GUI). Today, computers have an operating system which is called GUIs. A GUI operating system is one which is capable of executing the commands by displaying a menu from which the user can select a command using the mouse.
The powerful framework for working with graphical applications in Linux is referred to as the X-Window System. X handles the function of operating X-based graphical user interface (GUI) applications and displaying them on an X server process. GUI system contains icons, window frames, menus and colours, or a combination of these items are called themes.
Advantages of GUI: Following are the advantages of CUI:
- GUI makes extensive use of icons, buttons, bars and boxes to perform the same task.
- Commands can be activated by dragging and clicking a mouse on the screen.
- GUI uses a system of pull-down means to help users select among various command options.
- GUI software saves learning time because computing does not require different commands for each application.
- Common functions such as getting help, saving files, or printing is performed the same way.
- Complex service of commands can be made simple by linking icons.
Question 8.
What do you know about password protection in LINUX?
Answer:
Password protection is a very popular feature nowadays. Choosing good passwords is the first and most necessary step for having a secure system. You must remember these points while choosing a password.
- Do not use your login name or your name.
- Do not use proper names of any kind.
- Do not use any contiguous letters on the keyboard.
- Do not use strings that you can forget very easily or note it down at a secured place.
- Avoid using a combination of capital and small letters.
You can change your password periodically. For this, you can set an expiration date of Linux password by using “Change” command.
Linux Operating System Short Answer Type Questions (4 Marks)
Question 1.
What is Grep Command?
Answer:
Grep: The name grep stands for global regular expression printer. The term regular expression refers to the generalized search patterns that grep accepts. The grep command is the least versatile. It simply prints any line, it finds that matches the pattern. The grep command searches out the patterns globally and prints out the lines containing them.
Example: grep pattern filename.
Here grep searches the named file (filename) for the Pattern (pattern) and prints out the lines containing the pattern. .
Grep raj employee searches the file inventory for the string of characters raj. It is important to realize that grep searches for the string raj and not the word raj. By this, we mean it searches for the consecutive characters “r”, “a”, and “j” without caring whether they form a word or just part of a word. Thus, the output is as follows:
Rajeev 400
Ranveer 300
deshraj 200
Each line contains the string raj.
Question 2.
Define the ls command of LINUX.
Answer:
ls: This command is used to get a listing of the contents in the current directory in columns. The ls command can also give listings of other directories without having to go to those directories. This command can also handle wild characters such as the * and? e.g., ls b* will list all files starting with lower case b, ls b ? will list all two-character file names beginning with lower case b. Some of the more common switches are:
- ⇒ ls -a: To view a hidden file including those beginning with the ‘..’
- ⇒ ls -l: To view a long listing showing file attributes and file permissions.
- ⇒ ls -s: To view the listing showing the size of each file rounded up to the nearest kilobyte.
- ⇒ ls -S: To view the list of files according to file size.
- ⇒ ls -r: Gives the listing in reverse order.
- ⇒ ls -t: To view the directory according to time.
- ⇒ ls -la: This will list all the files in a long format showing full file details.
Question 3.
Define cd command of LINUX.
Answer:
cd: cd command is used to change the directory and your location to whatever directory you specify, cd home will change to the directory named home located inside the current directory, cd/home/main will change to the directory called main within the home directory.
Syntax: $ cd/home/main
Here $ shows the Linux prompt.
Question 4.
Explain any one File Search command.
Answer:
File Search Command
find: This command recursively examines the specified directory tree to look for files matching some file attributes, and then takes some specified action on those files.
Syntax ⇒ find [path-list] [selection-criteria] [action]
selection – criteria
- – name < filename > ⇒ selects the file specified.
- – user < username > ⇒ selects files owned by user.
- – type d ⇒ selects directories.
- – size <+n/-n > ⇒ selects files that are greater than/less than ‘n’ blocks (1 block = 512 bytes)
- – mtime < n/+n/-n > ⇒ selects files that have been modified on exactly n days/more than n days/less than n days.
Examples:
⇒ find/home/Harsh – name “*.cpp” – print
find /home /Harsh -m time 5 – print
Here print action will print the file on the screen.
Question 5.
Describe important parts of LINUX.
Or
Discuss the application of LINUX. (UP 2014)
Answer:
Three important parts of LINUX are:
- Kernel: It controls the sources of computer, allotting them to different users and tasks.
- Shell: It acts as a command interpreter. It takes the commands and passes it to the operating system.
- File system: It is a logical method for organizing and storing large amount to information in a way which makes it easy to manage.
Question 6.
LINUX commands are divided into which categories?
Answer:
LINUX commands are divided into the following categories:
- Directory oriented commands: ls, mkdir, pwd, etc.
- File oriented commands: cat, cp, rm, etc.
- File access commands: chmod, chgrp, head, etc.
- General-purpose commands date, who, man, etc.
- File search commands: find, grep.
Question 7.
Explain X-Windows in the LINUX operating system. (UP 2019)
Answer:
X-Windows: Linux is the powerful framework for working with graphical applications and it is referred to as X-windows system. X handles the function of opening X-based graphic user interface (GUI) applications and displaying them on an X-server process. LINUX has an X-based Desktop environment to provide a desktop metaphor and Windows manager to provide the GUI application like icons, window frames, menus and colours, or a combination of these items called themes.
Linux Operating System Very Short Answer Type Questions (2 Marks)
Question 1.
Which command in LINUX is used to copy the content of one file to another?
Answer:
cp command is used to copy the content of one file to another.
Question 2.
vi stands for what?
Answer:
vi stands for the visual editor.
Question 3.
Which command is used to create a new directory?
Answer:
mkdir command is used to create a new directory.
Question 4.
Name different modes in which vi editors can be opened.
Answer:
The three modes in which the vi editor is opened are the command, insert and last line.
Question 5.
Who developed LINUX and when?
Answer:
Linus Torvalds developed LINUX in 1991.
Question 6.
What are the three categories of files in LINUX?
Answer:
Ordinary, directory and special.
Question 7.
A place where we give commands in LINUX is known as…
Answer:
Shell prompt/Command prompt.
Question 8.
Which command is used to change the name of a file in LINUX?
Answer:
mv Command.
Question 9.
Which command is used to change the password?
Answer:
Change Command.
Question 10.
Write the name of a safety tool in Linux. (UP 2017)
Answer:
Clam AV.
Linux Operating System Objective Type Questions (1 Marks)
There are four alternative answers for each part of the questions. Select the correct one and write in your answer book:
Question 1.
Torvalds introduced LINUX in:
(a) 1990
(b) 1991
(c) 1992
(d) 1993.
Answer:
(b) 1991
Question 2.
Vi Editor is one of the famous Linux developed by:
(a) Bill Joy
(b) Linus Torvalds
(c) Charles Babbage
(d) Herman Hollerith.
Answer:
(a) Bill Joy
Question 3.
Vi stands for:
(a) Video editor
(b) Visual editor
(c) Virtual editor
(d) None of these.
Answer:
(b) Visual editor
Question 4.
Shell in Linux works as:
(a) CLI
(b) Kernel
(c) X-windows
(d) G.U.I.
Answer:
(a) CLI
Question 5.
In order to copy the contents of one file to another, which of the following commands is used:
(a) copy
(b) copy file
(c) cp
(d) cat.
Answer:
(c) cp
Question 6.
Linux is equivalent to which operating system? (UP 2014)
(a) DOS
(b) WINDOWS
(c) UNIX
(d) None of these.
Answer:
(c) UNIX
Question 7.
Which key is used to move into command mode from insert mode in (UP 2015)
(a) Ins
(b) Esc
(c) Tab
(d) Enter.
Answer:
(b) Esc
Question 8.
To move into command mode from insert mode this key is used:
(a) Tab
(b) Esc
(c) Enter
(d) Insert.
Answer:
(b) Esc
Question 9.
Toe move into Ex mode form command mode this key is used:
(a) ‘;’
(b) >
(c) :
(d) =
Answer:
(c) :
Question 10.
To copy the contents one file to another this command is used:
(a) copy
(b) cp
(c) cat
(d) copy file.
Answer:
(b) cp
Question 11.
Several commands can be given on a single command line by using:
(a) ‘:’
(b) ‘+’
(c) ‘/’
(d) ‘;’
Answer:
(d) ‘;’
Question 12.
GUI is: (UP 2017)
(a) Graphic up Interface
(b) Graphical User Internet
(c) Graphic User Interface
(d) The interface of Graphical User.
Answer:
(c) Graphic User Interface
Question 13.
What is called the basic unit of LINUX OS? (UP 2019)
(a) shell
(b) kernel
(c) utility
(d) service program.
Answer:
(b) kernel