Exploring Linux to Understand Cloud Computing Infrastructure

Exploring Linux to Understand Cloud Computing Infrastructure

Recently, I’ve started exploring Cloud Computing, and I’m learning Linux to better understand the servers, cloud platforms, and computing infrastructure that power the digital world.

🐧 Introduction to Linux Operating System

An Operating System (OS) is a fundamental software program that acts as a bridge between a computer’s hardware and the user. It manages hardware resources such as the CPU, memory, storage devices, and input/output devices while providing an interface for users and applications to interact with the system efficiently. Without an operating system, it would be impossible to run programs or perform basic tasks on a computer.

Some popular operating systems include:

  • 🪟 Windows — Known for its user-friendly interface, widely used for personal computers.
  • 🍏 macOS — Developed by Apple, known for stability, security, and seamless integration with Apple hardware.
  • 🐧 Linux — A free and open-source operating system widely used in servers, supercomputers, embedded systems, and even mobile devices.

🔹 What is Linux OS?

Linux is a Unix-like operating system that provides a robust environment for managing hardware and software. It acts as an interface between the user and the hardware, enabling seamless communication between software applications and physical components.

Some of the key features of Linux are:

✔️ Security — Linux is highly secure due to its permissions system, user management, and open-source nature, which allows vulnerabilities to be identified and fixed quickly.

✔️ Stability — Linux systems rarely crash and are capable of running for months or even years without rebooting.

✔️ Scalability — Linux can run on small devices like Raspberry Pi, on desktops, as well as on huge servers and supercomputers.

✔️ Flexibility — Users can choose from different distributions (distros) and customize the system according to their needs.

✔️ Community Support — A large global community provides tutorials, forums, and free software packages.

🏗️ Basic Structure of Linux OS

Article content

  1. Application → Software programs (e.g., browser, media player, games) that need OS support.
  2. Shell → Command interpreter; passes instructions from user/applications to the kernel.
  3. Kernel → Core of the OS; manages CPU, memory, storage, and devices.
  4. Hardware → Physical components (CPU, RAM, hard disk, I/O devices).

📦 Linux Distributions (Distros)

A Linux distribution (or distro) is a version of Linux that bundles the kernel with extra software such as desktop environments, package managers, and system tools.

🔹 Popular Linux distros:

  • 🟣 Ubuntu — Beginner-friendly, desktop/server use
  • 🔵 Fedora — Latest features, developer-focused
  • 🟥 Debian — Stable, base for many distros
  • ⚔️ Kali Linux — Security & penetration testing
  • 🏢 CentOS / Red Hat — Enterprise & servers

🖥️ Ways to Use/Install Ubuntu on Windows

  • WSL (Windows Subsystem for Linux): Run wsl --install in PowerShell
  • Docker: Run Ubuntu inside lightweight containers
  • Virtual Machine: Install Ubuntu ISO on VirtualBox/VMware
  • AWS EC2: Launch Ubuntu server instance in the cloud

📦 Package Manager in Linux

A package manager helps install, update, and remove software while managing dependencies automatically.

  • APT (Ubuntu/Debian): apt install package-name
  • YUM / DNF (Red Hat/CentOS/Fedora)
  • Pacman (Arch Linux)

📂 Linux Folder Structure

Linux organizes files into a hierarchical directory structure:

Article content

📂 User Data

  • /home → User personal files
  • /root → Home directory of the root (superuser) account

⚙️ System Binaries & Commands

  • /bin → Essential user commands (ls, cp, mv, etc.)
  • /sbin → System admin commands (shutdown, reboot, ifconfig)
  • /usr/bin → Extra user commands
  • /usr/sbin → Extra system admin commands

📚 Libraries

  • /lib → Shared libraries for /bin and /sbin
  • /usr/lib → Libraries for user applications

💻 System Boot & Processes

  • /boot → Bootloader, kernel files
  • /proc → Virtual files with process/system info
  • /dev → Device files (hard disks, USBs)
  • /run → Runtime process info

📂 Configuration & Logs

  • /etc → Configuration files
  • /var → Logs, spool, cache
  • /tmp → Temporary files (auto-deleted after reboot)

🌐 Mount Points & External Storage

  • /mnt → Temporary mount point
  • /media → Auto-mount external devices

📦 Extra & Optional Software

  • /opt → Optional software
  • /srv → Service data (web/FTP servers)
  • /data → (Optional) custom data storage

🐧 Essential Linux Commands

📂 File & Directory Management

  • mkdir cloud -> Create a folder named cloud.
  • cd cloud -> Move into cloud folder.
  • pwd -> Show the current directory path, e.g. /home/komal/cloud.
  • touch file1 -> Create an empty file file1.
  • touch file2 → Create an empty file file2.
  • ls → List files/folders. Output: file1 file2.
  • ls -l → Show file details (permissions, owner, size).
  • rm file1 → Delete file1.
  • rm -r cloud → Delete cloud folder and all its contents.
  • cp file2 cloud → Copy file2 into cloud folder.
  • mv file2 file1 → Rename file2 to file1.
  • clear → Clear the terminal screen to start fresh.

📝 File Viewing & Editing

  • cat file1 → View contents of file1.
  • nano file1 → Open file1 in nano editor to write/edit.
  • vi file1 → Open file1 in vi editor for advanced editing.
  • less file1 → Scroll through file1 page by page.
  • head file1 → Show first 10 lines of file1.
  • tail file1 → Show last 10 lines of file1.
  • echo “Hello Komal” | tee file1 → Print Hello Komal and save it in file1.
  • cut -b 4 file1 → Extract the first 4 word from file1.

🔗 Links

  • Soft Link: ln -s original.txt softlink.txt → Creates a shortcut; if the main file is deleted, the soft link breaks and won’t work.
  • Hard Link: ln original.txt hardlink.txt → Creates a direct link; if the main file is deleted, the hard link still works.

🔒 Permissions & Ownership

Article content

  • chmod 755 file1 Give execute permission to file1.
  • chown komal file1 → Make user komal the owner of file1.

⚙️ Process & System Management

  • ps aux → Show all running processes .
  • top → Monitor CPU/memory usage and processes in real time.
  • kill 1234 → Stop process with PID 1234.
  • sudo systemctl start docker → Start Docker service.
  • sudo systemctl status docker → Check Docker service status.

💾 Disk & Storage Management

  • df -h → Check disk space usage.
  • du -sh cloud → Show total size of cloud folder.
  • find cloud -name “file1” Search for file1 inside cloud.
  • grep “error” file1 → Search for error in file1.

👤 User & Login

  • whoami → Show current user.
  • who → Show all logged-in users.
  • w → Show logged-in users and activity.
  • last → Show login history.

📊 File Comparison & Sorting

  • sort file1 → Sort lines in file1 alphabetically.
  • cmp file1 file2 → Compare file1 and file2 byte by byte.
  • diff file1 file2 → Show differences between file1 and file2.

📦 File Compression & Extraction

  • zip cloud.zip file1 file2 → Compress file1 and file2 into cloud.zip.
  • unzip cloud.zip → Extract files from cloud.zip.
  • tar -cvf cloud.tar file1 file2 → Create a tar archive.
  • tar -xvf cloud.tar → Extract tar archive.
  • tar -czvf cloud.tar.gz file1 file2 → Create compressed tar (gzip).
  • tar -xzvf cloud.tar.gz → Extract compressed tar (gzip).

👤 User and Group Management

  • sudo useradd -m jethalal → Creates a new user jethalal with a home directory /home/jethalal.
  • sudo passwd jethalal → Sets a password for the user jethalal.
  • su jethalal → Switches to the user jethalal and navigates to their home directory.
  • sudo userdel jethalal → Deletes the user jethalal along with their home directory.
  • sudo groupadd cloud → Creates a new group called cloud.
  • sudo gpasswd -a jethalal cloud → Adds the user jethalal to the cloud group.
  • sudo gpasswd -M iyer,bhide,tappu cloud → Sets the cloud group members to multiple users: iyer, bhide, and tappu, replacing any existing members.

Conclusion

Linux is a powerful, open-source OS that powers desktops, servers, and cloud platforms. Learning its structure and commands is essential for anyone exploring Cloud Computing and modern computing environments.

To view or add a comment, sign in

Others also viewed

Explore content categories