Estimated reading: 3 minutes 73 views

🐧 Linux/Unix Tutorial – Learn Linux Commands and Shell Scripting (2025 Guide)

πŸš€ Master Linux and Unix with this beginner-to-pro tutorial. Learn essential commands, shell scripting, file management, and system administration.


πŸ” What is Linux/Unix?

Linux and Unix are multiuser, multitasking operating systems widely used across desktops, servers, cloud infrastructure, and embedded devices.

  • πŸ†“ Linux: Open-source and community-developed (based on Unix)
  • 🧱 Unix: Proprietary system used in large enterprises (AIX, Solaris)

🎯 Why Learn Linux/Unix?

Linux is the foundation of modern IT and cloud services.

βœ… Key Benefits:

  • πŸ’‘ Open-source and cost-free
  • πŸ” Highly secure and stable
  • ⚑ Fast and efficient
  • πŸ‘¨β€πŸ’» Preferred by DevOps, sysadmins, and developers
  • πŸ’» CLI-based control and automation

βš–οΈ Linux vs Unix – Key Differences

πŸ“Œ Feature🐧 Linux🧱 Unix
LicenseOpen-source (GNU/GPL)Proprietary (paid)
UsageDesktops, servers, IoTHigh-end servers
DistrosUbuntu, CentOS, FedoraAIX, Solaris, HP-UX

🧾 Basic Linux Commands

Run these in the terminal:

pwd           # Show current directory
ls            # List directory contents
cd /path      # Change directory
touch file    # Create a new file
mkdir dir     # Make a new directory
rm file       # Remove file
cp src dest   # Copy file
mv src dest   # Move or rename file

πŸ“š View manual pages:

man ls

πŸ“ Working with Files & Directories

πŸ“ Create/Edit Files:

nano file.txt
vi file.txt

πŸ”’ Permissions & Ownership:

chmod 755 file
chown user:group file
ls -l  # View file permissions

πŸ—‚οΈ Understanding Linux File System

πŸ“‚ DirectoryπŸ” Purpose
/homeUser directories
/binSystem binaries
/etcConfiguration files
/usrUser-installed software
/varVariable data like logs
/rootSuperuser home directory

πŸ‘₯ User & Group Management

βž• Add Users/Groups:

sudo adduser john
sudo groupadd devs

πŸ‘₯ Assign User to Group:

sudo usermod -aG devs john

πŸ”„ Switch User:

su - john

πŸ”„ Process Management

πŸ“Š View & Kill Processes:

top
ps aux
kill <PID>

⏳ Background Jobs:

command &
jobs
fg %1

πŸ“¦ Package Management by Distro

Ubuntu/Debian:

sudo apt update
sudo apt install nginx

Red Hat/CentOS:

sudo yum install httpd

Arch Linux:

sudo pacman -S package

🐚 Shell Scripting Basics

Create a shell script file:

#!/bin/bash
echo "Welcome to Linux!"

πŸ› οΈ Make Executable:

chmod +x script.sh
./script.sh

πŸ“Œ Use variables, loops, conditionals for automation.


🌐 Networking Commands

ip a                  # Show IP addresses
ping google.com       # Test internet connection
netstat -tuln         # View open ports
ss -tuln              # Faster alternative to netstat
scp file user@ip:/path # Secure file transfer

πŸ“ˆ System Monitoring & Logs

πŸ’½ Check Disk/Memory:

df -h      # Disk usage
free -m    # Memory usage

πŸ“‘ Read Logs:

cat /var/log/syslog
tail -f /var/log/auth.log

⏰ Cron Jobs – Task Scheduling

Edit User Crontab:

crontab -e

Example:

0 5 * * * /home/user/backup.sh

πŸ“… Runs script daily at 5 AM.


🧰 Essential Linux Tools

  • πŸ” grep – Text searching
  • πŸ“ awk – Text & column processing
  • 🧹 sed – Stream editing
  • πŸ“¦ tar – Archive/unarchive files
  • 🌐 curl – Fetch from URLs
  • πŸ’Ύ wget – Download web files

πŸ§‘β€πŸ’» Top Linux Distros to Explore

  • 🐧 Ubuntu – Best for beginners
  • 🧱 Debian – Stable and open
  • πŸ›‘οΈ CentOS / Rocky Linux – Enterprise-friendly
  • πŸ§ͺ Kali Linux – Cybersecurity & hacking
  • πŸ” Arch Linux – DIY & advanced control

πŸ“š Best Resources to Learn Linux/Unix


βœ… Conclusion

Linux/Unix is the bedrock of servers, cloud, and DevOps. Whether you’re building automation, managing infrastructure, or just exploring the CLI, learning Linux will level up your tech journey.

πŸ’ͺ Start small with commands, build scripts, and master system tasks step by step.


πŸ“Œ Summary – Recap & Next Steps

πŸ” Key Takeaways:

  • Learn CLI basics, user and process management
  • Write shell scripts to automate tasks
  • Understand system architecture and filesystem hierarchy
  • Monitor and secure your Linux environment effectively

βš™οΈ Practice daily, try real-world exercises, and install a Linux VM or dual boot to gain hands-on experience.


Share Now :

Leave a Reply

Your email address will not be published. Required fields are marked *

Share

Linux/Unix Tutorial

Or Copy Link

CONTENTS
Scroll to Top