Written by students who passed Immediately available after payment Read online or as PDF Wrong document? Swap it for free 4.6 TrustPilot
logo-home
Class notes

Linux for DevOps Learning

Rating
-
Sold
-
Pages
32
Uploaded on
15-08-2025
Written in
2025/2026

Best beginner guide for Linux as a Devops Engineer.

Institution
Course

Content preview

LINUX
01 July 2025 13:34




🐧 What is Linux?
• Linux is an Operating System (OS) — like Windows or macOS.
• But unlike them, Linux is open-source, meaning it's free and its code is publicly available.
• Linux is used in servers, cloud computing, mobile (Android), embedded systems, and DevOps
tools.


🧱 Basic Components of Linux OS
Component Explanation
Kernel The core part of Linux that talks to hardware (like CPU, RAM, disks).
Shell A program that lets you interact with the OS via commands.
File System Organizes and stores data. Everything in Linux is treated as a file (even devices).
GUI Optional — Linux can have graphical interfaces like GNOME or KDE, but often used via
terminal.


📁 Linux Directory Structure
Linux starts with root (/) directory. Below it, there are folders with fixed purposes:
Directory Purpose
/ Root of the file system
/home User folders (like C:\Users)
/bin Essential command binaries (like ls, cp, mv)
/etc System config files
/var Variable files (like logs)
/tmp Temporary files
/usr User programs and libraries
/root Home directory of the root (admin) user
/dev Device files (like USB, hard disks)
/proc System and process info (virtual folder)


💻 Basic Linux Commands
Command Use
pwd Show current directory
ls List files and folders
cd Change directory
mkdir Make a directory
touch Create an empty file
cp Copy files/folders


Basic info Page 1

,mv Move or rename files
rm Delete files
cat Show file contents
clear Clear the terminal
exit Close the terminal or shell


👤 User and Permissions
Linux is multi-user. Every file and folder has permissions and ownership.
Users:
• root: Superuser (admin)
• Normal users: Limited access
Permissions:
• Each file has 3 types of permissions for:
○ Owner
○ Group
○ Others
Permission types:
• r → read
• w → write
• x → execute
Example:
-rwxr-xr-- 1 user group 1234 Jul 1 file.sh
Breakdown:
• -rwxr-xr--
○ rwx (owner): full permission
○ r-x (group): read & execute
○ r-- (others): read only


🧠 Package Management (Installing Software)
• Ubuntu/Debian-based:
○ apt-get install <package-name>
• Red Hat/CentOS:
○ yum install <package-name> or dnf install
• Others: May use pacman, zypper, snap, flatpak


🔍 Processes and System Monitoring
Command Description
ps Show running processes
top Live view of system usage (CPU, memory)
kill Stop a process
htop Better version of top (if installed)


🧰 File Compression and Archiving
Command Description
tar -cvf Create archive

Basic info Page 2

,tar -cvf Create archive
tar -xvf Extract archive
gzip, gunzip Compress and decompress files


🔑 Important Concepts
Concept Meaning
Shell Script A file with commands you can execute like a program (.sh)
Cron Job Schedule a task to run automatically
Log files Located in /var/log, useful for troubleshooting
SSH Remote login to a Linux machine (ssh user@ip)
Sudo Temporarily run commands as root user (sudo <command>)


⚙ How It Helps in DevOps
Linux is the foundation of:
• Cloud servers (AWS EC2, GCP, Azure)
• CI/CD pipelines
• Docker & Kubernetes
• Automation tools like Ansible, Terraform



📘 What Are CRUD Operations?
CRUD stands for:
• C – Create
• R – Read
• U – Update
• D – Delete
In Linux, CRUD operations can be performed on:
• Files
• Directories
• File content
• System records (like user data or processes)


🟩 C – CREATE Operations in Linux
➤ Create a File
touch filename.txt
Example:
touch notes.txt
➤ Create a File with Content
echo "Hello, Linux!" > hello.txt
OR
cat > data.txt
Type your content
Press Ctrl+D to save
➤ Create a Directory (Folder)
mkdir foldername
Example:

Basic info Page 3

, Example:
mkdir projects
➤ Create Nested Directories
mkdir -p devops/scripts/yaml


🟦 R – READ Operations in Linux
➤ View File Content
cat filename.txt
less filename.txt # Scrollable
more filename.txt # Page-wise output
➤ View First or Last Lines
head filename.txt # First 10 lines
tail filename.txt # Last 10 lines
➤ Read a Directory
ls # List files
ls -l # Detailed view
ls -a # Show hidden files
➤ Read a Specific Line (Using sed or awk)
sed -n '3p' filename.txt # Show 3rd line
awk 'NR==3' filename.txt # Another method


🟨 U – UPDATE Operations in Linux
➤ Append to File
echo "New line" >> file.txt
➤ Edit File (Using Editors)
• nano filename.txt – beginner-friendly terminal editor
• vim filename.txt – powerful but advanced editor
➤ Replace Text in File
sed -i 's/oldtext/newtext/g' filename.txt
Example:
sed -i 's/Devops/Linux DevOps/g' notes.txt
➤ Rename File or Folder
mv oldname.txt newname.txt
➤ Move File to Different Location
mv file.txt /home/user/docs/


🟥 D – DELETE Operations in Linux
➤ Delete a File
rm filename.txt
➤ Delete a Directory
rm -r foldername
➤ Force Delete
rm -rf foldername


Basic info Page 4

Written for

Institution
Course

Document information

Uploaded on
August 15, 2025
Number of pages
32
Written in
2025/2026
Type
Class notes
Professor(s)
Sir rafay
Contains
All classes

Subjects

$10.99
Get access to the full document:

Wrong document? Swap it for free Within 14 days of purchase and before downloading, you can choose a different document. You can simply spend the amount again.
Written by students who passed
Immediately available after payment
Read online or as PDF

Get to know the seller
Seller avatar
fawadrashid85

Get to know the seller

Seller avatar
fawadrashid85 Self
Follow You need to be logged in order to follow users or courses
Sold
-
Member since
8 months
Number of followers
0
Documents
2
Last sold
-

0.0

0 reviews

5
0
4
0
3
0
2
0
1
0

Recently viewed by you

Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Working on your references?

Create accurate citations in APA, MLA and Harvard with our free citation generator.

Working on your references?

Frequently asked questions