(TWN) DevOps Prerequisite: Linux

Understanding Linux OS, its file systems and commands is a first important step for anyone who wants to be a DevOps engineer/Cloud Engineer or a IT Infrastructure Engineer.



In this post, we will explore on:

What is Linux? Why is Linux needed? What is it used for? What is the Linux file system? Why is knowing Linux commands important? Commands of Linux.

What is Linux?

Linux is an open-source operating system based on the Unix architecture. It is known for its stability, security, and flexibility, making it a popular choice for servers, desktops, and embedded systems.

Linux distributions, such as Ubuntu, Fedora, and Debian, package the kernel with various software tools and libraries, providing users with a complete operating environment. Linux is widely used in server environments due to its efficiency and reliability.

What is Linux file system?

The Linux file system is a hierarchical structure used to organise and store files on Linux operating systems. The Linux file system is structured in a tree-like format, starting from a root directory denoted by /. All files and directories stem from this root. Note: This is different from windows which uses a drive-letter-based structure where each drive can have its own root. 

Why is it important to learn learn? Especially for DevOps engineers

Learning Linux is one of the most valuable IT skills today. Linux powers most of the servers, cloud platforms, and even everyday devices. 

Linux commands are executes in our 

- Servers (Web servers, enterprise servers and data centres)

- Cloud Servers (Linux VMs)

"Engineers often SSH into cloud servers and execute commands to configure apps, scale workloads, and secure systems"

Linux comes in handy for DevOps engineers as the role involves a lot of provisioning and maintaining of resources. 

Why is knowing Linux commands important?

1. Linux command give you direct control over processes, networking and file systems. 

2. Shell scripting such as Bash & zsh is the backbone of automation deployment scripts.

3. On servers, we only have CLI (no GUI)

Linux Commands Cheat sheet:

🔍 Navigation & File Management

  • pwd → Print working directory

  • ls → List files in directory

  • cd <dir> → Change directory

  • touch <file> → Create empty file

  • cp <src> <dest> → Copy file/directory

  • mv <src> <dest> → Move/rename file/directory

  • rm <file> → Remove file

  • rm -r <dir> → Remove directory recursively

  • find <path> -name <file> → Search for files


📂 Viewing & Editing Files

  • cat <file> → View file contents

  • less <file> → Scroll through file

  • head <file> → Show first 10 lines

  • tail <file> → Show last 10 lines

  • nano <file> → Edit file in Nano editor

  • vim <file> → Edit file in Vim editor


👥 User & Permission Management

  • whoami → Show current user

  • id → Show user ID and groups

  • adduser <name> → Add new user

  • passwd <user> → Change password

  • chmod <perm> <file> → Change file permissions

  • chown <user>:<group> <file> → Change file owner


⚙️ Process & System Monitoring

  • ps → Show running processes

  • top → Real-time process monitoring

  • htop → Interactive process viewer (if installed)

  • kill <pid> → Kill process by ID

  • df -h → Show disk usage

  • du -sh <dir> → Show directory size

  • free -h → Show memory usage

  • uptime → Show system uptime


🌐 Networking

  • ping <host> → Test connectivity

  • curl <url> → Fetch data from URL

  • wget <url> → Download file from URL

  • ifconfig or ip addr → Show network interfaces

  • netstat -tulnp → Show active connections

  • ssh user@host → Connect to remote server


📦 Package Management

(varies by distro)

  • Debian/Ubuntu:

    • apt update → Update package list

    • apt upgrade → Upgrade packages

    • apt install <pkg> → Install package

  • RedHat/CentOS:

    • yum install <pkg> → Install package

    • dnf update → Update packages


📑 Archiving & Compression

  • tar -cvf archive.tar <files> → Create tar archive

  • tar -xvf archive.tar → Extract tar archive

  • gzip <file> → Compress file

  • gunzip <file.gz> → Decompress file

  • zip archive.zip <files> → Create zip archive

unzip archive.zip → Extract zip archive










Popular posts from this blog

5 Daily Improvement by Gaur Gopal Das

DevOps (Development Operations) Part 1: Introduction