PARSHVANATH CHARITABLE TRUST’S
A. P. SHAH INSTITUTE OF TECHNOLOGY
APSIT DEV PS CLUB
2025
BASIC & BASH SCRIPTING
Presentation by:
Vinay Suryarao
Ismaeel Shaikh
Linux Kernel
What is Linux? The Linux kernel is the core part of the Linux
operating system — think of it as the “brain” that
sits between your computer’s hardware and
Linux is an open-source, operating system that serves as the software.
foundation for running applications, managing hardware, and
controlling system resources. It was first created by Linus Torvalds
The Shell
in 1991 and has since grown into one of the most widely used
operating systems in the world
This is the program we'll be using. It's a
Because it’s open-source, anyone can view, modify, and distribute
Command-Line Interface (CLI) that takes our
its code, which has led to the creation of many distributions (or
typed commands and tells the kernel what to do.
“distros”) such as Ubuntu, Fedora, Debian, Kali Linux, and CentOS.
It's our direct line to the computer's brain.
Each distro is tailored for different uses — for example, Ubuntu is
The Terminal
known for being beginner-friendly, while Kali Linux is focused on
cybersecurity and penetration testing.
The Linux terminal is a text-based interface that
lets you interact with the operating system by
typing commands instead of clicking on
graphical menus.
01
In Linux, a user is an identity
used to log in and interact
with the system.
What is a Every user has a username,
User in 02 a unique user ID (UID), and
is associated with one or
more groups.
Linux?
03 Users have their own home
directory, files, and permissions.
Types of users in Linux
The Linux system uses these accounts to determine who can access what.
There are mainly three types of users in Linux
01 02 03
Root User System Users Regular User
The superuser with full Created for system A user with limited
control over the system processes and services privileges and can only
and can access or modify (e.g., www-data for web access their own files
any file or setting. servers). and allowed programs.
Creating a User Deleting a User
Command: sudo adduser vinay Command: sudo deluser vinay
Creates a new user named 'vinay' with a home Deletes 'vinay' but keeps their files.
directory and password prompt.
Setting/Changing Password Listing All Users
Command: sudo passwd vinay Command: cat /etc/passwd
Sets or changes the password for the user 'vinay'. Shows all user accounts on the system.
Renaming a User Adding a Group
Command: sudo usermod -l newname vinay Command: sudo groupadd developers
Changes username from 'vinay' to 'newname'. Creates a new group named 'developers'.
File Management
File management in Linux refers to the process of creating, organizing,
storing, retrieving, modifying, moving, and deleting files and directories
on a Linux system.
It’s one of the most essential aspects of working with an operating
system because all data, configurations, programs, and even devices in
Linux are represented as files.
Creation Modification
Changing file content or
Making new files or
metadata (nano, vim, chmod,
directories.(touch , mkdir)
chown).
Organization Movement
Structuring files in directories Relocating files/directories
and subdirectories. Linux File to other paths (mv).
Management
Navigation Copying
Moving between directories Duplicating files or
to locate files (cd, ls). directories (cp).
Viewing Deletion
Reading file contents without Removing files or directories
editing them (cat, less, head, (rm, rmdir)
tail).
Commands of File Management
01 List files and directories 06 Create a directory
Command: ls Command: mkdir foldername
02 List files with details 07 Create multiple directories
Command: ls -l Command: mkdir dir1 dir2 dir3
03 Show hidden files 08 Remove an empty directory
Command: ls -a Command: rmdir foldername
04 Change directory 09 Create an empty file
Command: cd /path/to/directory Command: touch file.txt
05 Move to home directory 10 Copy a File
Command: cd ~ Command: cp file.txt /path/to/destination/
11 View file contents
Command: cat file.txt
Process
Management
Process management in Linux is the handling of all running applications
and tasks on your system. Every command you run and every program
you open is a process, which the OS creates, schedules, monitors, and
terminates for efficient resource use.
Commands for Job Control
Command: sleep 100 Command: fg %1
This is a foreground process. Your terminal is busy. Brings job #1 back to the foreground.
Command: jobs Command: bg %1
Lists your background jobs. You'll see sleep 100 is Resumes job #1 in the background. jobs will now
"Stopped". show it "Running".
Commands for Viewing Process
Command: ps Command: top
Gives a detailed snapshot of all processes. Your live system monitor, like the "Task Manager."
Command: pstree
Shows processes in a tree format. Great for seeing
which processes started others.
Commands for Controlling Processes
Command: kill <PID> Command: killall <name>
Terminates a process using its Process ID. Get the Kills all processes with a specific name (e.g., killall
PID from ps or top. firefox). Easier but use with care!
Command: nice -10 gnome-terminal Command: sudo renice -n <new priority> -p
<PID>
It launches gnome-terminal with a higher priority It changes the priority (nice value) of a running
(lower nice value), meaning it gets more CPU time process (identified by <PID>), requiring sudo if
than default-priority processes. setting a higher priority (i.e., lower nice value).
Memory
Management
Managing your system's RAM (short-term memory) and disk space (long-
term storage).
Why Does It Matter?
Keeps your system fast, stable, and responsive. Helps you troubleshoot
when your system is slow or an application freezes.
Commands of Memory Management
Command: free -h Command: du -sh <directory>
Shows human-readable RAM usage. The most important Disk Usage. Shows the total size of a specific
column is available, which is the real memory your apps directory. Where; -s = summary, -h = human-
can use. readable. Example: du -sh /var/log
Command: cat /proc/meminfo Command: vmstat
The detailed source file for all memory information. A powerful tool to watch virtual memory and CPU
free is just a pretty summary of this file. statistics live.
Command: df -h / df -T
Disk Free. Shows usage for all mounted filesystems.
Where; -h = human-readable, -T = show filesystem
Type (e.g., ext4).
THANK
YOU