KEMBAR78
Syllabus of Linux | PDF | Computer File | Linux Distribution
0% found this document useful (0 votes)
72 views13 pages

Syllabus of Linux

Uploaded by

marsyes27
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)
72 views13 pages

Syllabus of Linux

Uploaded by

marsyes27
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/ 13

Syllabus

Linux Lab

Experiment 1: Install virtual player and Linux.

Theory:
History of UNIX, The UNIX philosophy, GUI, Overview of the Linux Operating System,
Unix commands, Introduction to VI editor

Lab:
Step 1: Install VMware Workstation 15 Player or VirtualBox by Oracle.
i. VMware Workstation 15 Player is a virtualization software that allows you to run
multiple operating systems on a single physical machine. You can download it from the
VMware website and follow the installation instructions.
ii. VirtualBox is another popular virtualization software that provides similar functionality.
You can download it from the Oracle website and install it on your computer.
Step 2: Download an installation .iso for a Linux distribution like Ubuntu, Fedora, or any other
of your choice.
i. An .iso file is a disk image of the Linux distribution you want to install. It contains all the
necessary files for the operating system.
ii. You can download the .iso file from the official website of the Linux distribution you
prefer. For example, if you want to use Ubuntu, you can visit the Ubuntu website and
download the .iso file for the desired version.
Step 3: Install the .iso from the virtual VBox or VMware Workstation
i. Launch VMware Workstation or VirtualBox on your computer.
ii. Create a new virtual machine by clicking on the "New" or "Create" button, depending on
the software you are using.
iii. Follow the on-screen instructions to set up the virtual machine. This includes specifying
the name, location, and specifications for the virtual machine, such as the amount of
RAM and storage allocated.
iv. During the setup process, you will be prompted to select the installation .iso file. Browse
and select the .iso file you downloaded in Step 2.
v. Complete the virtual machine setup by following the remaining on-screen instructions.
This may involve selecting the operating system type, configuring network settings, and
specifying storage options.
vi. Once the setup is complete, start the virtual machine. It will boot from the .iso file and
begin the Linux installation process.
vii. Follow the installation prompts and provide any required information, such as username,
password, and partitioning options.
viii. Once the installation is complete, you will have a fully functional Linux virtual machine
running within VMware Workstation or VirtualBox.
Experiment 2: Practice some basic commands on Linux

Theory: Overview of file systems in Linux, File permissions and ownership, modifying file
permissions and ownership, Creating and editing files using text editors

Lab:
i. Basic Navigation Commands: Teach essential commands for navigating the file system,
such as:
ls (list): Display the contents of a directory.
cd (change directory): Move between directories.
Pwd (print working directory): Show the current directory.
mkdir (make directory): Create new directories.
rmdir (remove directory): Remove empty directories.
ii. File Operations: Introduce fundamental file operations using the following commands:
touch: Create new files.
cp (copy): Copy files and directories.
mv (move): Move or rename files and directories.
rm (remove): Delete files and directories
iii. File Viewing and Editing: Introduce commands for viewing and editing files, such as:
cat: Display file contents.
less or more: View files with pagination.
head and tail: Show the beginning or end of a file.
nano or vim: Basic text editors.
iv. User Management: Discuss commands for user management tasks, including:
whoami: Display the current user.
who: Show users currently logged in.
passwd: Change the password for the current user.
sudo (superuser do): Execute commands with administrative privileges.
v. System Information: Introduce commands for gathering system information, such as:
uname: Display system information.
df (disk free): Show disk space usage.
top or htop: Monitor system processes.
history: View command history.
Experiment 3: Files and Directories commands

Theory: File Manipulation Commands, File Compression and Archiving, File Searching,
File System Navigation and Management, File Transfer

Lab:
i. Working with Files:
touch: Create an empty file or update the access/modify timestamps of an existing file.
cp: Copy files and directories.
mv: Move or rename files and directories.
rm: Remove files and directories.
cat: Concatenate and display the contents of a file.
less: Display the contents of a file one page at a time.
head: Display the first few lines of a file.
tail: Display the last few lines of a file.
ii. File Permissions and Ownership:
Explain the ls -l command to display detailed file information, including permissions and
ownership.
Discuss the three sets of permissions: owner, group, and others.
Explain the chmod command to modify file permissions.
Discuss the chown and chgrp commands to change file ownership and group.
iii. Advanced File and Directory Operations:
find: Search for files and directories based on various criteria.
grep: Search for specific patterns within files.
tar: Archive files and directories into a single file.
gzip/gunzip: Compress and decompress files.
ln: Create hard and symbolic links.
Experiment 4: Shell Programming

Theory: Introduction to BASH shell scripting, Basics of Shell Scripting, Types of Shell,
Shell variable, Shell Keywords, Basic Operator, Positional Parameters

Lab:
i. Write a simple shell script that prints "Hello, World!" when executed.
ii. Create a script that prompts the user to enter their name and then displays a personalized
greeting.
iii. Write a script that takes two numbers as input and performs various arithmetic operations
like addition, subtraction, multiplication, and division.
iv. Create a script that asks the user to enter their age and displays a message based on
whether they are eligible to vote or not.
Experiment 5: Shell Programming

Theory: Command Line Argument, Array, Conditional Statements, Decision Making,

Lab:
i. Write a script that takes a number as input and checks whether it is a prime number or
not.
ii. Write a script that calculates the sum of the digits of a given number.
iii. Create a script that checks whether a given number is an Armstrong number or not.
Experiment 6: Shell Programming

Theory: Shell Loops, Loop control, IO Redirections, Shell Function, Regular Expressions,
Script Debugging and Troubleshooting

Lab:
i. Write a script that checks whether a given number is a palindrome or not. A palindrome
number reads the same backward as forward.
ii. Write a script that calculates the greatest common divisor (GCD) and the least common
multiple (LCM) of two given numbers.
iii. Create a script that takes multiple numbers as input and sorts them in ascending or
descending order.
Experiment 7: Shell Programming

Theory: Introduction to Processes, Process states, and process hierarchy, Process


Management Commands: Viewing and monitoring running processes, Terminating or
killing processes, Process Prioritization and Scheduling.

Lab:
i. Write a script that takes a filename as input and checks if it exists. If the file exists,
display its content; otherwise, prompt the user to create the file.
ii. Create a script that prints the numbers from 1 to 10 using a loop.
iii. Write a script that takes a filename as a command line argument and counts the number
of lines, words, and characters in that file.
iv. Create a script that defines a function to calculate the factorial of a given number and call
that function with different inputs.
Experiment 8: Shell Programming

Theory: Process Control and Signals, Process Monitoring and Resource Usage, Process
Communication, Process Synchronization, Background Processes and Job Control, System
Monitoring and Logging

Lab:
i. Write a script that checks the file permissions of a given file and displays whether it is
readable, writable, or executable by the current user.
ii. Create a script that prompts the user to enter a string and then performs operations like
string length, string concatenation, and string comparison.
iii. Write a script that searches for a specific pattern in a given file and displays the matching
lines.
iv. Create a script that displays various system information like the current date and time,
logged-in users, system uptime, etc
Experiment 9: Shell Programming

Theory: System Performance Monitoring, System Security and User Management.

Lab:
i. Write a script that renames all files in a directory by adding a prefix or suffix to the
filenames.
ii. Create a script that searches for files in a specified directory and its subdirectories, based
on certain criteria like file extension or file size.
iii. Write a script that generates the Fibonacci series up to a given number, using loops or
recursive functions.
Experiment 10: Shell Programming

Theory: Writing modular and reusable code, Script optimization

Lab:
i. Write a script that takes a string as input and calculates its length.
ii. Create a script that takes a string as input and prints its reverse.
iii. Write a script that prompts the user to enter two strings and concatenate them together.
Experiment 11: Shell Programming

Theory: Interacting with Users: Interactive shell scripts, Parsing and Processing Data
Formats, Interacting with Databases

Lab:
i. Write a script that takes a sentence as input and splits it into individual words.
ii. Create a script that checks whether a given string is a palindrome or not.
Experiment 12: Building a Rule-Based Expert System using Shell Scripting

Theory:
Process Automation and Job Scheduling: Automating repetitive tasks using shell scripts,
System Administration Scripts, Managing services and daemons.

Lab:
Objective: The objective of this lab exercise is to build a simple rule-based expert system using
shell scripting. The expert system will provide recommendations based on a set of predefined
rules.
Instructions:
i. Create a shell script named "expert_system.sh".
ii. Implement a set of rules using conditional statements (if-elif-else) within the script. Each
rule should check for specific conditions and provide a corresponding recommendation.
iii. Example rules:
a) If the user is experiencing fever, recommend taking a fever reducer medication.
b) If the user has a sore throat, recommend gargling with warm saltwater.
c) If the user has a cough and congestion, recommend drinking warm fluids and
taking cough syrup.
d) Feel free to add more rules based on your desired expert system topic.
iv. Prompt the user to input their symptoms.
v. Based on the user's input, evaluate the rules one by one and display the appropriate
recommendation(s) for the symptoms identified.
vi. If none of the rules match the user's symptoms, provide a general recommendation or
message.
vii. Test the expert system by running the script and providing different sets of symptoms to
observe the recommendations.
viii. Modify the rules or add new rules as needed to refine the expert system's behavior.
ix. Document the logic and rules implemented in the script, along with any modifications or
additions made.
x. Write a summary report discussing the challenges faced, observations made, and
improvements that can be made to enhance the expert system's functionality.
Textbooks
1. Dayanand Ambawade, and Deven Shah, "Linux Labs and Open Source Technologies",
Dreamtech Press, 2014.
2. Paul W Browning, "101 Labs - Linux LPIC1: Includes Linux Essentials", Reality Press Ltd,
2019.

You might also like