Skip to main content

What is Linux? History & Distributions

 Linux Fundamentals: Complete Beginner's Guide with Simple Explanations

Everything you need to know about Linux :

📅 Published: Feb 2026
⏱️ Estimated Reading Time: 12 minutes
🏷️ Tags: Linux Basics, Command Line, Beginners Guide, File System, DevOps Foundation


🐧 What is Linux? History & Distributions

What is Linux?

Imagine Linux as the operating system (like Windows or macOS) that runs on most servers worldwide. But there's a key difference: Linux is open-source, which means anyone can see how it works, modify it, and share it for free. It was created by Linus Torvalds in 1991 as a hobby project that grew into something huge!

Why does this matter for you? Because when you work in DevOps or system administration, you'll be managing Linux servers. Almost all websites, mobile apps (Android runs on Linux), cloud services, and supercomputers use Linux behind the scenes.

What are Linux Distributions?

Think of Linux as a car engine. Different companies put that engine in different car bodies with different features:

  • Ubuntu = Family sedan (easy to use, great for beginners)

  • CentOS/RHEL = Business fleet car (stable, reliable for companies)

  • Alpine = Motorcycle (lightweight, perfect for containers)

bash
# To check which Linux you're using:
cat /etc/os-release

This command shows your Linux version, just like checking your car's model.


Understanding Kernel, Shell & Filesystem

The Kernel: Linux's Brain

The kernel is the core program that controls everything. It manages:

  • CPU (processor time)

  • Memory (RAM usage)

  • Devices (disks, keyboards, networks)

  • Security (who can do what)

Analogy: If Linux were a restaurant, the kernel would be the head chef who manages all kitchen operations but never talks to customers.

The Shell: Your Interface

The shell is how you talk to Linux. When you type commands, the shell translates them for the kernel. The most common shell is Bash (Bourne Again Shell).

Analogy: The shell is like a waiter who takes your order (command) and tells the chef (kernel) what to cook.

The Filesystem: Everything is a File

In Linux, everything is a file:

  • Documents = files

  • Folders = files

  • Hardware devices = files

  • Network connections = files

This makes everything consistent. You use the same commands to work with documents, printers, or network cards.

bash
# See your kernel version (the "brain" version)
uname -r

# Check your shell (your "translator")
echo $SHELL

🏗️ Linux Architecture: User Space vs Kernel Space

Simple Explanation:

Imagine a secure office building:

  • Kernel Space = Secure vault room (only authorized personnel)

  • User Space = Regular office area (where everyone works)

What happens when you run a command:

  1. You type ls in user space

  2. Shell sends request to kernel space

  3. Kernel accesses the hard disk securely

  4. Results come back to user space

  5. You see the file list

Why this separation? Security! If a program crashes in user space, it won't crash the whole system. The kernel stays protected.

bash
# See what's running in user space (regular programs)
ps aux

# Kernel manages these, but you see results in user space

⌨️ Basic Linux Commands Explained

Navigation Commands:

bash
pwd     # "Print Working Directory" - Shows where you are
        # Like looking at your GPS location

ls      # "List" - Shows files in current folder
        # Like opening a drawer to see what's inside

cd      # "Change Directory" - Move to different folder
        # Like walking from living room to kitchen

File Operations:

bash
# Creating
mkdir folder_name   # Make new folder (directory)
touch file.txt      # Create empty file

# Viewing
cat file.txt        # Show entire file contents
less file.txt       # View file page by page (press 'q' to exit)

# Copying & Moving
cp file1.txt file2.txt  # Copy file (make duplicate)
mv old.txt new.txt      # Rename or move file

# Deleting
rm file.txt             # Remove file permanently
# WARNING: No recycle bin in Linux!

Why These Commands Matter:

As a DevOps engineer, you'll use these commands daily to:

  • Navigate server folders

  • Check configuration files

  • Create scripts

  • Manage application files


💻 Working with Command Line (CLI vs GUI)

Why DevOps Prefers Command Line:

GUI (Graphical User Interface) = Clicking buttons with mouse
CLI (Command Line Interface) = Typing commands

Example Task: Install software and check its status

GUI way:

  1. Open software center

  2. Search for program

  3. Click install

  4. Open another window to check status

  5. Click through menus

CLI way:

bash
sudo apt install nginx
systemctl status nginx

Done in 2 commands!

CLI Advantages:

  1. Faster: Type vs click

  2. Repeatable: Same commands work every time

  3. Automate: Can write scripts

  4. Remote: Work on servers anywhere via SSH

  5. Documentation: Commands can be saved and shared

Essential CLI Tips:

bash
# Tab completion - Saves typing
# Type: cd /usr/loc [Press Tab]
# Auto-completes to: cd /usr/local/

# Command history
history          # See all past commands
!!               # Run last command again

# Get help
man command_name  # Full manual
command_name --help  # Quick help

🔐 File Permissions and Ownership

Why Permissions Matter:

Linux is multi-user - many people can use the same server. Permissions control:

  • Who can read files

  • Who can modify files

  • Who can run programs

Understanding Permission Notation:

text
-rwxr-xr-- 1 user group 1024 Feb 10 file.txt
│└─┬──┴─┬──┘
│  │    └── Others: read only (r--)
│  └─── Group: read and execute (r-x)
└────── Owner: read, write, execute (rwx)

Three types of people:

  • Owner (u): File creator

  • Group (g): Group of users

  • Others (o): Everyone else

Three types of permissions:

  • r = read (view file)

  • w = write (edit/delete)

  • x = execute (run as program)

Changing Permissions:

bash
# Numeric way (easier):
# r=4, w=2, x=1
chmod 755 script.sh  # Owner: rwx(7), Group: r-x(5), Others: r-x(5)

# Letter way (more readable):
chmod u+x script.sh  # Add execute for owner
chmod o-w file.txt   # Remove write for others

# Changing ownership:
chown username:groupname file.txt

Real Examples:

bash
# Web server files (readable by all)
chmod 644 index.html      # Owner: read/write, Others: read only

# Script file (executable)
chmod 755 backup.sh       # Everyone can read/run, only owner can edit

# Secret configuration (private)
chmod 600 config.yaml     # Only owner can read/write

📁 File Types and Links

Different File Types:

Linux has 7 file types. Most common:

  • - = Regular file (documents, images)

  • d = Directory (folder)

  • l = Symbolic link (shortcut)

bash
# Check file type
file document.pdf    # Shows "PDF document"
file /dev/sda        # Shows "block device"

Hard Links vs Soft Links:

Hard Link = Clone of original file

  • Both files share same content

  • Delete original → clone still works

  • Can't link across different disks

Soft Link = Shortcut to original file

  • Points to original file location

  • Delete original → shortcut breaks

  • Can point anywhere

bash
# Create original file
echo "Hello" > original.txt

# Create hard link (clone)
ln original.txt hardlink.txt

# Create soft link (shortcut)
ln -s original.txt shortcut.txt

# Check both
ls -li  # Shows they're different

When to use:

  • Soft links: For shortcuts, version switching

  • Hard links: For backups, disk space saving


🗂️ File System Hierarchy Explained

Linux Folder Structure:

Linux organizes files in a tree structure starting from / (root):

text
/
├── /bin/     # Essential programs (ls, cp, rm)
├── /etc/     # Configuration files (like settings)
├── /home/    # User home folders (your personal space)
├── /var/     # Variable data (logs, databases)
├── /tmp/     # Temporary files (deleted on reboot)
├── /usr/     # User programs (bigger applications)
└── /opt/     # Optional software (manually installed)

What Goes Where:

  • Your files: /home/yourname/

  • System settings: /etc/

  • Log files: /var/log/ (system diary)

  • Programs: /usr/bin/

  • Temporary: /tmp/ (safe to clean)

bash
# Check disk usage
df -h  # Like checking storage on your phone

# Find where a program is installed
which python3  # Shows "/usr/bin/python3"

Why This Structure Matters:

As a DevOps engineer, you need to know:

  • Where to find logs when troubleshooting

  • Where to put configuration files

  • Where applications are installed

  • How to check disk space


Practical Examples for Beginners

Example 1: Setting Up a Web Server

bash
# 1. Install web server
sudo apt install nginx

# 2. Check it's running
systemctl status nginx

# 3. View default webpage
cat /var/www/html/index.nginx-debian.html

# 4. Check logs if something goes wrong
tail -f /var/log/nginx/access.log

Example 2: Daily Backup Script

bash
# Create backup script
nano ~/backup.sh

# Add these lines:
#!/bin/bash
cp -r /home/myapp/data /backup/data-$(date +%Y%m%d)
echo "Backup completed: $(date)" >> /backup/log.txt

# Make it executable
chmod +x ~/backup.sh

# Run it
./backup.sh

 Common Problems & Solutions

Problem: "Permission Denied"

Why it happens: You don't have rights to access a file or folder.

Solution:

bash
# Check current permissions
ls -l filename

# If you own the file:
chmod +x filename  # Add execute permission

# If you don't own it (need admin):
sudo chmod +x filename
# Enter password if prompted

Problem: "Command Not Found"

Why it happens: Program isn't installed or not in your PATH.

Solution:

bash
# Check if installed
which programname

# Install it
# On Ubuntu:
sudo apt install programname
# On CentOS:
sudo yum install programname

Problem: "No Space Left on Device"

Why it happens: Disk is full.

Solution:

bash
# Check disk space
df -h

# Find large files
du -sh /* | sort -rh | head -5

# Clean up
sudo apt clean          # Clear package cache
sudo rm -rf /tmp/*     # Clear temp files (careful!)

📋 Quick Reference Cheat Sheet

What you want to doCommandExample
See where you arepwdpwd
List fileslsls -la
Change foldercdcd /home
Create filetouchtouch notes.txt
Create foldermkdirmkdir projects
View filecatcat config.txt
Edit filenanonano file.txt
Copy filecpcp file.txt backup/
Move/renamemvmv old.txt new.txt
Delete filermrm trash.txt
Check permissionsls -lls -l script.sh
Change permissionschmodchmod 755 script.sh
Check disk spacedf -hdf -h
Get helpmanman ls

🎓 Learning Path Recommendation

  1. Week 1: Master basic navigation (pwdlscd)

  2. Week 2: Learn file operations (cpmvrm)

  3. Week 3: Understand permissions (chmodchown)

  4. Week 4: Practice with real projects

Remember: Everyone starts as a beginner. The key is practice, not perfection.


🔗 Practice Safely with Real Workflows

Want to practice these Linux fundamentals in a safe, guided environment? Try our hands-on labs where you can:

  • Practice commands without breaking anything

  • Work through real DevOps scenarios

  • Get instant feedback on your commands

  • Build real projects step-by-step

👉 Practice safely with real workflows at SKY Tech:
https://devops.trainwithsky.com


Still Have Questions?

Q: I'm afraid of breaking things. What should I do?
A: Start with a virtual machine or use online Linux playgrounds. You can't break those!

Q: How long to become comfortable with Linux?
A: With 30 minutes daily practice, you'll be comfortable in 1 month, proficient in 3 months.

Q: Do I need to memorize all commands?
A: No! Even experts use Google. Focus on understanding concepts, not memorization.

Have specific questions about Linux basics? Ask in the comments below - we'll explain in simple terms! 👍

Comments

Popular posts from this blog

Introduction to Terraform – The Future of Infrastructure as Code

  Introduction to Terraform – The Future of Infrastructure as Code In today’s fast-paced DevOps world, managing infrastructure manually is outdated . This is where Terraform comes in—a powerful Infrastructure as Code (IaC) tool that allows you to define, provision, and manage cloud infrastructure efficiently . Whether you're working with AWS, Azure, Google Cloud, or on-premises servers , Terraform provides a declarative, automation-first approach to infrastructure deployment. Shape Your Future with AI & Infinite Knowledge...!! Read In-Depth Tech & Self-Improvement Blogs http://www.skyinfinitetech.com Watch Life-Changing Videos on YouTube https://www.youtube.com/@SkyInfinite-Learning Transform Your Skills, Business & Productivity – Join Us Today! In today’s digital-first world, agility and automation are no longer optional—they’re essential. Companies across the globe are rapidly shifting their operations to the cloud to keep up with the pace of innovatio...

📊 Monitoring & Logging in Kubernetes – Tools like Prometheus, Grafana, and Fluentd

  Monitoring & Logging in Kubernetes – Tools like Prometheus, Grafana, and Fluentd Monitoring and logging are essential for maintaining a healthy and well-performing Kubernetes cluster. In this guide, we’ll cover why monitoring is important, key monitoring tools like Prometheus and Grafana, and logging tools like Fluentd to help you gain visibility into your cluster’s performance and logs. Shape Your Future with AI & Infinite Knowledge...!! Want to Generate Text-to-Voice, Images & Videos? http://www.ai.skyinfinitetech.com Read In-Depth Tech & Self-Improvement Blogs http://www.skyinfinitetech.com Watch Life-Changing Videos on YouTube https://www.youtube.com/@SkyInfinite-Learning Transform Your Skills, Business & Productivity – Join Us Today! 🚀 Introduction In today’s fast-paced cloud-native environment, Kubernetes has emerged as the de-facto container orchestration platform. But deploying and managing applications in Kubernetes is just half the ba...

🔒 Kubernetes Security – RBAC, Network Policies, and Secrets Management

  Kubernetes Security – RBAC, Network Policies, and Secrets Management Security is a critical aspect of managing Kubernetes clusters. In this guide, we'll cover essential security mechanisms like Role-Based Access Control (RBAC) , Network Policies , and Secrets Management to help you secure your Kubernetes environment effectively. Shape Your Future with AI & Infinite Knowledge...!! Want to Generate Text-to-Voice, Images & Videos? http://www.ai.skyinfinitetech.com Read In-Depth Tech & Self-Improvement Blogs http://www.skyinfinitetech.com Watch Life-Changing Videos on YouTube https://www.youtube.com/@SkyInfinite-Learning Transform Your Skills, Business & Productivity – Join Us Today! 🚀 Introduction: Why Kubernetes Security Is Non-Negotiable As Kubernetes becomes the backbone of modern cloud-native infrastructure, security is no longer optional—it’s mission-critical . With multiple moving parts like containers, pods, services, nodes, and more, Kuberne...