An Operating System (OS) serves as an
interface between the user and computer
hardware, managing essential tasks like
file management, memory management,
and process management.
Popular operating systems include Linux,
Windows, and OS X, among others.
Use the zip command to compress files What is an Operating System?
and directories. Key functions of an OS include memory
management, processor management,
Zipping Files device management, file management,
Example: zip archive.zip file1.txt file2.txt to security, and error detection.
create a zip archive.
Use the unzip command to extract files UNIX is a multiuser, multitasking operating
from a zip archive. system developed in 1969 at Bell Labs by
Ken Thompson and Dennis Ritchie.
Unzipping Files
Example: unzip archive.zip to restore the
original files. It consists of a kernel that manages system
resources and a shell that interprets user
What is UNIX? commands.
Use gpg to encrypt zip files for added Zipping and Unzipping Concepts
security. Linux Basics
UNIX architecture includes the kernel,
Encrypting Zip Files shell, commands and utilities, and a
Example: gpg -c archive.zip to create an hierarchical file system.
encrypted version.
Use the -P option in the zip command to Linux is a popular open-source version of
set a password for a zip file. UNIX, designed for compatibility with
UNIX systems.
Password Protecting Zip Files
Example: zip -P password archive.zip to
create a password-protected archive. Developed by Linus Torvalds in 1991, Linux
has evolved into a mature operating
Introduction to Linux system supporting various hardware
platforms.
find: Searches for files based on name,
type, size, and permissions. Key components of Linux include the
kernel, system libraries, and system utilities.
Using Find Command
Example: find / -name "filename" to search
for a specific file.
Searching for Files and The kernel is the core part of Linux,
locate: Quickly finds files using a pre-built responsible for interacting with hardware
database. Directories and managing system resources.
Using Locate Command
Example: locate "filename" to find all Kernel
occurrences of a file. It provides abstraction to hide low-level
hardware details from applications.
System libraries are functions that allow
application programs to access kernel
Use ls -l to view file permissions and features without needing kernel code
ownership. access rights.
Viewing Ownership and Permissions Components of Linux System
Each file has a user and group owner, with System Library
specific access permissions. They implement most functionalities of
the operating system.
Read (r), write (w), and execute (x)
permissions are granted to users, groups, System utility programs perform
and others. specialized tasks, enhancing the overall
System Utility functionality of the operating system.
Understanding Permissions Permission for Files, Directories,
Permissions can be modified using the
chmod command. and Users
Linux can run on various hardware
Use chown to change the owner of a file or platforms without modification, making it
directory. highly portable.
Portability
Changing File Ownership
The -R option allows recursive changes for
directories and their contents. The source code of Linux is freely available,
allowing community collaboration for
Open Source continuous improvement.
System users: Run background processes. Linux supports multiple users accessing
system resources simultaneously and
User Types Basic Features of Linux allows multiple applications to run
Regular users: Log in and run interactive
processes. Linux Programming Multi-User and Multiprogramming
concurrently.
useradd: Command to create a new user. and Scripting Linux employs various security measures,
including user authentication and
Security controlled access to files.
passwd: Command to set or change a
user's password. Creating and Deleting User Accounts
Linux Users and Groups
userdel: Command to remove a user
account. In Linux, everything is treated as a file,
including directories and hardware device
drivers.
Groups are collections of users that share
access permissions.
Overview
The file system is organized hierarchically,
About Groups starting from the root directory (/).
Each user has a user ID (UID) and belongs
to a group identified by a group ID (GID).
Regular files: Contain data like text and
executable files.
id: Prints user and group IDs. Directory files: Contain lists of files.
Types of Files
man: Displays manual pages for Special files: Include block files, character
commands. Common Commands File System of Linux device files, named pipes, symbolic links,
and sockets.
cal: Displays the calendar.
/: Root directory containing all files and
date: Prints the current date and time. directories.
Basic Linux Commands
cat: Concatenates files and displays output. /home: Default directory for user data.
Common System Directories
cp: Copies files from one location to /bin: Contains standard command files
another. File Management Commands accessible to all users.
mv: Renames or moves files. /etc: Contains system configuration files.
rm: Removes files.
Linux file names can include letters,
numbers, underscores, spaces, periods,
and commas.
The Linux kernel is a monolithic kernel that
interfaces with hardware and manages
system resources. Special characters like question marks and
Rules asterisks are not allowed.
What is the Kernel? Linux File Naming Convention
It operates in kernel space, executing
processes and handling interrupts. File extensions are optional but
recommended for better file management.
Monolithic Kernel: Contains all core
functions and device drivers, allowing
runtime module loading.
General Usage of Linux Kernel
Microkernel: Provides minimal services,
with other functions running as
independent processes. Types of Kernels
Hybrid Kernel: Combines features of both
monolithic and microkernels.