0% found this document useful (0 votes)
16 views

Lecture-1_Course Handouts Linux

Uploaded by

Aryan Rajput
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
16 views

Lecture-1_Course Handouts Linux

Uploaded by

Aryan Rajput
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 20

Linux and Shell Programming

Cyber Security Specialization Core-I

Dr Vimal Kumar (Course Instructor),


Assistant r. Professor-SCSET
Bennett University Greater Noida
Outline

Objectives of the Course Structure &


Course Outcomes Book Resources
Course Credits

What you will


Assessment Industrial loose for not
Q&A
Components Certifications attending the
classes/Labs?
Objective
Essential ideas behind the open-source operating system approach

Programming. knowledge of Linux and shell script

Understand the backbone of cybersecurity

Course involves
• Basic Linux commands
• Shell scripting
• File structure and management
• Processes
• Inter-process communication
• Socket programming
• Security
COURSE OUTCOMES (CO)

1 2 3
CO1: To articulate CO2: To write Shell CO3: To design and
Linux commands that Programming using write applications to
are used to manipulate Linux commands. manipulate internal
system operations at kernel-level Linux File
an admin level. systems.
Course Structure & Credits
L T P C Theory Modules: 03

Theory Lectures: 28 Hours


2 0 4 4
Lab Sessions: 56 Hours (28+28 Self Lab)

Continuous Lab Assessments: 20

Marks per Lab: 02

The Linux Kernel Project: 27/11/2024 (Tentative)

Probable Industry Talks: 01

Resources will be available on LMS


Text & Reference Books
Textbooks Reference Books

• M. Ebrahim and A Mallett, Mastering • W.R. Stevens, UNIX Network


Linux Shell Scripting: A Practical Guide Programming (3 ed.), PHI Publications,
to Linux Command-Line, Bash Scripting, 2017. ISBN 978-8120307490.
and She (2 ed.), Packt Publication, 2018.
ISBN 978-1788990554.
• R. Blum and C. Bresnahan, Linux
Command Line and Shell Scripting Bible
(3 ed.), Wiley, 2016. ISBN 978-
1118983843.
Assessment

S. Component Marks Date of Evaluation (Tentative)


No.
1 Mid Term 10 As per schedule notified by CoE

2 End Term Examination 40 As per schedule notified by CoE

3 MOOC Certification 10 27/11/2024


from the notified list
4 Lab Continuous 20 As per timetable. 10 Best Labs will be considered, 2
Evaluation marks of each Lab
5 Linux Kernel Project/ 20 Evaluation-1 (5 Marks) Hackathon (15 Marks)
Hackathon 4th Week of August 24 29/11/2024
Total 100
What you will loose if not attended the classes/Labs?

Installation and administration of Linux OS

Articulation of Linux commands that are used to manipulate


system operations at an admin level

Write Shell Programming using Linux commands

Design and write applications using shell script to manipulate


internal kernel-level Linux File systems and security scripts.

May loose Theory/lab marks due to continuous lab


evaluation/missing classes
What is Linux?
• An Open source OS,
written by Linus
Torvalds.
• Four parts of Linux
• Kernel
• Utilities
• Graphical Desktop
• Applications Software
System Memory Management

• Virtual Memory using swap space


• Memory locations grouped into
blocks are called pages
• Kernel keeps track of used pages
through page tables
• Swap-out
• Swap-in
Software Program Management

• Running program is a process, a foreground or a background process


• Kernel controls the processes
• init process---first process created by kernel
• When the kernel starts, it loads the init process into virtual memory
• Some Linux implementations contain a table of processes to start automatically on bootup.
• On Linux systems, this table is usually located in the special file /etc/inittabs.
Software Program Management

• The popular Ubuntu Linux distribution utilize the /etc/init.d folder, which contains scripts for starting
and stopping individual applications at boot time.
• The scripts are started via entries under the /etc/rcX.d folders, where X is a run level.
• The init utilizes run levels. There are 5 init run levels in the Linux.

• At run level 1&2, only the basic system processes are started, along with one console terminal
process. This is called single-user (admin) mode.
• At run level 3&4, most application software, such as network support software, is started.
• At level 5, the GUI X-windows is started
Hardware Management
• Any device that Linux must communicate with needs device driver code to be inserted into kernel
• Driver code allows the kernel to pass data back and forth to the device
• Two methods are used to insert device driver code into kernel
• Drivers compiled into the kernel
• Drivers' modules are added to the kernel
• The Linux system identifies hardware devices as special files, called device files.
• There are three classifications of device files:
• Character: Character device files are for devices that can only handle data one character at a time.
Examples: modems, and terminals

• Block: Block files are for devices that can handle data in large blocks at a time, such as disk drives

• Network: The network fi le types are used for devices that use packets to send and receive data.
Examples are network cards and a special loopback device
Hardware Management

Linux creates special All communication with Each node has a unique
files, called nodes, for the device is performed number pair that
each device on the through the device identifies it to the Linux
system. node. kernel.

The minor device


The number pair Similar devices are number is used to
includes a major and a grouped into the same identify a specific
minor device number. major device number. device within the major
device group.
File System
Management
• The Linux kernel can
support different types of
filesystems to read and
write data to and from
hard drives.
• Table 1-1 lists the
standard filesystems that
a Linux system can use to
read and write data.
The core bundle of utilities
supplied for Linux systems iscalled
the coreutils package.

The GNU
The GNU coreutils package
Utilities consists of three parts:

• Utilities for handling files


• Utilities for manipulating text
• Utilities for managing processes
The Shell Utility
Shell provides a way for users to start programs, manage fi les on the filesystem, and manage processes running on the Linux system.

The core of the shell is the command prompt.

The command prompt is the interactive part of the shell.

It allows you to enter text commands, and then it interprets the commands and executes them in the kernel.

You can also group shell commands into files to execute as a program. Those files are called shell scripts.

Table 2 shows the Linux Shells


A video by The Linux Foundation
• https://www.youtube.com/watch?v=5ocq6_3-nEw
Timeline
Thanks
Q&A

You might also like