0% found this document useful (0 votes)
4 views20 pages

Linux Lab Manual (AD-505)

The document outlines a series of experiments for a Linux lab course (IT-505) for Information Technology students. Each experiment focuses on different aspects of Unix/Linux, including basic commands, file management, scripting, and system configuration. The document also includes problem definitions, objectives, expected viva questions, and space for faculty signatures.

Uploaded by

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

Linux Lab Manual (AD-505)

The document outlines a series of experiments for a Linux lab course (IT-505) for Information Technology students. Each experiment focuses on different aspects of Unix/Linux, including basic commands, file management, scripting, and system configuration. The document also includes problem definitions, objectives, expected viva questions, and space for faculty signatures.

Uploaded by

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

DEPARTMENT OF

IT & AIDS

Name of Student : …………………..

Name of Lab : Lab (Linux)

Subject Code : IT- 505

Branch : Information Technology

Year/Sem : III/V

Affiliated to Rajiv Gandhi Prodyogiki Vishwavidyalaya, Bhopal (MP)


INDEX
S. No. Name of Experiment Date Sign Remark

1. Introduction to Unix/Linux operating system.

2. Installation, Configuration & Customizations of Unix/Linux.

3. To Study basic & User status Unix/Linux Commands.

4. Study & use of commands for performing arithmetic operations


with Unix/Linux.

5 Create a file called wlcc.txt with some lines and display how many
lines, words and characters are present in that file.

6 Append ten more simple lines to the wlcc.txt file created above and
split the appended file into 3 parts. What will be the names of these
split files? Display the contents of each of these files. How many lines
will be there on the last file?

7 Given two files each of which contains names of students. Create a


program to display only those names that are found on both the
files.

8 Create a program to find out the inode number of any desired file.

9 Study & use of the Command for changing file permissions.

10 Write a pipeline of commands, which displays on the monitor as


well as saves the information about the number of users using the
system.

11 Execute shell commands through vi editor.

12 Write a shell script that accepts any number of arguments and prints
them in the reverse order.

13 Write a shell script to find the smallest of three numbers that are
read from the keyboard.

14 Study & installation of Firewall & Proxy server.


List of Experiments
Lab(Linux)(IT- 505)
1. Introduction to Unix/Linux operating system..

2. Installation, Configuration & Customizations of Unix/Linux.

3. To Study basic & User status Unix/Linux Commands.

4. Study & use of commands for performing arithmetic operations with Unix/Linux.

5. Create a file called wlcc.txt with some lines and display how many lines, words and
characters are present in that file.

6. Append ten more simple lines to the wlcc.txt file created above and split the appended
file into 3 parts. What will be the names of these split files? Display the contents of each
of these files. How many lines will be there on the last file?

7. Given two files each of which contains names of students. Create a program to display
only those names that are found on both the files.

8. Create a program to find out the inode number of any desired file.

9. Study & use of the Command for changing file permissions.

10. Write a pipeline of commands, which displays on the monitor as well as saves the
information about the number of users using the system.

11. Execute shell commands through vi editor.

12. Write a shell script that accepts any number of arguments and prints them in the reverse
order

13. Write a shell script to find the smallest of three numbers that are read from the
keyboard.

14. Study & installation of Firewall & Proxy server.


EXPERIMENT NO. 1

EXPERIMENT NO. 1

Unit/Topic: 1/ Introduction
PROBLEM DEFINITION:
Introduction to Unix/Linux operating system

OBJECTIVE:
To understand the basics of Unix/Linux.

THEORY INVOLVED:

EXPECTED VIVA QUESTIONS:

Q.1 What is Linux?


Q.2 Difference between Unix and Linux.
Q.3 Explain Linux Features.

NAME OF FACULTY:

SIGNATURE:

DATE:
EXPERIMENT NO. 2

EXPERIMENT NO. 2

Unit/Topic: 7/ Installation
PROBLEM DEFINITION:
Installation, Configuration & Customizations of Unix/Linux.

OBJECTIVE:
To understand the Installation, Configuration & Customizations of Unix/Linux.

THEORY INVOLVED:

EXPECTED VIVA QUESTIONS:

Q.1 How will you get the details about Ubuntu in computer?
Q.2 What do you Mean by Swap space partition and why swapping is required?
Q.3 What are the different types of OS ?

NAME OF FACULTY:

SIGNATURE:

DATE:
EXPERIMENT NO. 3

EXPERIMENT NO. 3

Unit/Topic: 2/ Basic commands


PROBLEM DEFINITION:
To Study basic & User status Unix/Linux Commands.

OBJECTIVE:
To understand the use of basic commands.

THEORY INVOLVED:
UNIX commands can often be grouped together to make even more powerful commands.
Unix General Purpose commands: date, who, who am I,cal,echo.

File Handling utilities:


Directory related commands : pwd,mkdir,cd,rmdir,ls
File related commands: cat, cp, mv, rm, chmod, chown, chgrp, file, find,touch
Filters: cat, head, tail, cut, paste, cmp, comm, sort, more, less, etc.
Network Related commands: telnet, ftp, rlogin, arp

Disk and backup utilities : df, du and cpio ,tar

Advanced filters : grep

INPUT SET:

OUTPUT SET:

EXPECTED VIVA QUESTIONS:


Q.1 Difference between who and who am i command.
Q.2 How to use filter commands?
Q.3 Explain about various file handling commands.

NAME OF FACULTY:
SIGNATURE:
DATE:
EXPERIMENT NO. 4

EXPERIMENT NO. 4

Unit/Topic: 2/ Arithmetic Operation


PROBLEM DEFINITION:
Study & use of commands for performing arithmetic operations with Unix/Linux.

OBJECTIVE:
Implementation of arithmetic commands.

THEORY INVOLVED:
1. Log in to the system
2. Open Ubuntu terminal
3. Type bc

The most basic element in bc is the number. BC stands for “Basic calculator” Numbers are arbitrary
precision numbers. This precision is both in the integer part and the fractional part. All numbers are
represented
internally in decimal and all computation is done in decimal.

INPUT SET:

OUTPUT SET:

EXPECTED VIVA QUESTIONS:


Q.1 What is bc commands?
Q.2 How to get floating point result by using bc commands?
Q.3 How to perform different operations using bc commands?

NAME OF FACULTY:
SIGNATURE:
DATE:
EXPERIMENT NO. 5

EXPERIMENT NO. 5

Unit/Topic: 3/ File commands


PROBLEM DEFINITION:
Create a file called wlcc.txt with some lines and display how many lines, words and characters are
present in that file.

OBJECTIVE:
To implement commands of file system.

THEORY INVOLVED:
wc (Stands for word count) is a command in Unix-like operating systems.

The program reads either standard input or a list of files and generates one or more of the following
statistics: newline count, word count, and byte count.

Syntax:

wc <filename>

Options:

wc -l <filename> print the line count

wc -c <filename> print the byte count

wc -m <filename> print the character count

wc -L <filename> print the length of longest line

wc -w <filename> print the word count


Steps:

1. Log in to the system

2. Use Ubuntu terminal to create a file called wlcc.txt by using cat

command which contain some text.

3. Correct typing errors during creation

4. Save the file

5. Type wc command to display lines, word, character

6. Logout of the file

INPUT SET:

OUTPUT SET:

EXPECTED VIVA QUESTIONS:

Q.1 What is use of wc command?


Q.2 Difference file and directory.
Q.3 How to find number of characters in a file?

NAME OF FACULTY:

SIGNATURE:

DATE:
EXPERIMENT NO. 6

EXPERIMENT NO. 6

Unit/Topic: 3/File commands


PROBLEM DEFINITION:
Append ten more simple lines to the wlcc.txt file created above and split the appended file into 3 parts.
What will be the names of these split files? Display the contents of each of these files. How many lines
will be there on the last file?
.
OBJECTIVE:
To understand the concept to splitting file.

THEORY INVOLVED:
Split is a UNIX utility most commonly used to split a file into two or more smaller files.
The command-syntax is: split [option] [Input] [Prefix]
The default behavior of split is to generate output files of a fixed size, default 1000 lines. The files are
named by appending aa, ab, ac, etc. to output filename. If the output filename is not given, the default
filename of x is used, for example, xaa, xab, etc. When a hyphen (-) is used instead of input filename,
data is derived from standard input .

INPUT SET:

OUTPUT SET:

EXPECTED VIVA QUESTIONS:

Q.1 What is split command?


Q.2 Difference between append and split.
Q.3 What are the names of splitted files?

NAME OF FACULTY:
SIGNATURE:
EXPERIMENT NO. 7
DATE:
EXPERIMENT NO. 8

EXPERIMENT NO. 7
Unit/Topic: 3/ Comparing file
PROBLEM DEFINITION:
Given two files each of which contains names of students.Create a program to display only those names
that are found on both the files..

OBJECTIVE:
To understand the concept of comparing files.

THEORY INVOLVED:
Comm : Compare two sorted files line-by-line.
Syntax :Comm [option] ... File 1 file 2
Compare sorted files FILE1 and FILE2 line-by-line. With no options, comm produces three-column
output. Column one contains lines unique to FILE1, column two contains lines unique to FILE2, and
column three contains lines common to both files. Each of these columns can be suppressed
individually with options.
Options
-1 suppress column 1 (lines unique to FILE1)
-2 suppress column 2 (lines unique to FILE2)
-3 suppress column 3 (lines that appear in both files)

INPUT SET:

OUTPUT SET:

EXPECTED VIVA QUESTIONS:


Q.1 What is the use of comm command?
Q.2 Difference between cmp and comm command.
Q.3 How to display unique content of file?

NAME OF FACULTY:
SIGNATURE:
DATE:
EXPERIMENT NO. 9

EXPERIMENT NO. 8

Unit/Topic: 1/ Introduction
PROBLEM DEFINITION:
Create a program to find out inode number of any desired file.

OBJECTIVE:
To understand the basics of Unix/Linux.
THEORY INVOLVED:
In basic words, an Inode number is just like an index number of a book. You may quickly locate the chapters
you wish to read by browsing the index page. You won’t be able to discover the proper information without an
index page, and you’ll have to go through the entire book to find a certain subject, which is a complete waste
of time. The same applies to inodes in Linux. An inode is a data structure that points refer to the individual
blocks, making the file. All of the administrative data required to read a file is included in the inode. The
metadata for each file is kept in inodes in a table structure and this data includes:

 File types ( executable, block special etc )


 Permissions ( read, write etc )
 UID ( Owner )
 GID ( Group )
 FileSize
 Time stamps including last access, last modification and last inode number change.
 File deletion time
 Number of links ( soft/hard )
 Location of ile on harddisk.
 Some other metadata about file.

EXPECTED VIVA QUESTIONS:


Q.1 What is inode number?
Q.2 what command is used to find out inode number of any file .

NAME OF FACULTY:
SIGNATURE:
DATE:
EXPERIMENT NO.
10

EXPERIMENT NO. 9

Unit/Topic: 1/ Introduction

PROBLEM DEFINITION:

Study and use of commands for changing file permissions.

OBJECTIVE:

To understand the basics of Unix/Linux.

THEORY INVOLVED:

To change directory permissions in Linux, use the following:

 chmod +rwx filename to add permissions.


 chmod -rwx directoryname to remove permissions.
 chmod +x filename to allow executable permissions.
 chmod -wx filename to take out write and executable permissions.

Note that “r” is for read, “w” is for write, and “x” is for execute. This only changes the permissions for the
owner of the file.

EXPECTED VIVA QUESTIONS:

Q.1 Which commad is used to find out file permission of any file.

Q.2 what are different types of file permissions.

NAME OF FACULTY:

SIGNATURE:
EXPERIMENT NO.
DATE: 11

EXPERIMENT NO. 10

Unit/Topic: 1/ Introduction

PROBLEM DEFINITION:

Write a pipeline commands which display on the monitor as well as saves the
information about number of users using the system.

OBJECTIVE:

To understand the basics of Unix/Linux.

THEORY INVOLVED:

EXPECTED VIVA QUESTIONS:

Q.1 What is pipelining

Q.2 How can we get number of users on any system by using pipeline command.

NAME OF FACULTY:

SIGNATURE:

DATE:
EXPERIMENT NO.
12

EXPERIMENT NO. 11

Unit/Topic: 1/ Introduction

PROBLEM DEFINITION:

Execute shell commands through vi editor.

OBJECTIVE:

To understand the basics of Unix/Linux.

THEORY INVOLVED:

EXPECTED VIVA QUESTIONS:

Q.1 What is pipelining

Q.2 How can we get number of users on any system by using pipeline command.

NAME OF FACULTY:

SIGNATURE:

DATE:
EXPERIMENT NO.
13

EXPERIMENT NO. 12

Unit/Topic: 1/ Introduction

PROBLEM DEFINITION:

Write a shell script that accepts any number of arguments and prints them in
reverse order.

OBJECTIVE:

To understand the basics of Unix/Linux.

THEORY INVOLVED:

EXPECTED VIVA QUESTIONS:

Q.1 What is shell scripting

Q.2 What are arguments.

NAME OF FACULTY:

SIGNATURE:

DATE:
EXPERIMENT NO.
14

EXPERIMENT NO. 13

Unit/Topic: 1/ Introduction

PROBLEM DEFINITION:

Write a shell script to find the smallest of three numbers that are read from
keyboard

. OBJECTIVE:

To understand the basics of Unix/Linux.

THEORY INVOLVED:

EXPECTED VIVA QUESTIONS:

Q.1 What is shell scripting

Q.2 What are arguments.

NAME OF FACULTY:

SIGNATURE:

DATE:
EXPERIMENT NO.
15

EXPERIMENT NO. 14

Unit/Topic: 1/ Introduction

PROBLEM DEFINITION:

Study and installation of firewall and proxy server

OBJECTIVE:

To understand the basics of Unix/Linux.

THEORY INVOLVED:

EXPECTED VIVA QUESTIONS:

Q.1 What is firewall

Q.2 What is proxy server.

NAME OF FACULTY:

SIGNATURE:

DATE:
EXPERIMENT NO.
16

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy