๐Ÿš€ Day 1: Linux Essentials โ€“ Basic Commands, File System & Permissions

Series: 30 Days DevOps Interview Preparation
Author: Tathagat Gaikwad


๐Ÿ‘‹ Introduction

Welcome to Day 1 of the 30 Days of DevOps Interview Preparation Challenge! Whether you're transitioning from support, just starting in IT, or preparing for a DevOps role, mastering Linux is non-negotiable.

Linux is the backbone of most cloud environments and containerized systems. Knowing how to navigate and manipulate it efficiently will give you an edge in any DevOps interview.


๐Ÿง  What Youโ€™ll Learn Today

1๏ธโƒฃ Linux File System Basics

Understanding the file system hierarchy is crucial. Here's a quick rundown of important directories:

DirectoryDescription
/Root directory โ€“ top of the hierarchy
/binEssential binaries like ls, cp
/etcSystem config files
/varLog files, spools
/usrUser-installed applications
/homeUser personal directories
/tmpTemporary files

2๏ธโƒฃ Commonly Used Linux Commands

Master these commands for everyday DevOps work:

๐Ÿ“‚ File/Directory Handling

ls -l           # List with details
cd /path        # Change directory
pwd             # Print current directory
mkdir demo      # Make new directory
touch file.txt  # Create a file
rm -rf dir/     # Delete folder forcefully

๐Ÿ” System Information

uname -a        # OS details
df -h           # Disk usage
top             # Live system resource usage
whoami          # Current user
uptime          # System running time

๐Ÿ”Ž Searching Files

find /var/log -type f -name "*.log"
grep "error" /var/log/syslog

3๏ธโƒฃ Understanding Permissions in Linux

Permissions determine who can do what on a file/folder.

๐Ÿ”‘ Types of Permissions

  • r โ€“ read

  • w โ€“ write

  • x โ€“ execute

๐Ÿ” Command Examples

chmod 755 script.sh     # rwxr-xr-x
chown user:group file   # Change owner and group
ls -l file.txt          # View permissions

๐Ÿงฎ Numeric Mode

ValuePermission
7rwx
6rw-
5r-x
4r--

Example: chmod 644 file.txt gives read/write to owner and read-only to group and others.


๐ŸŽฏ Interview Questions to Practice

Here are some commonly asked Linux questions in DevOps interviews:

  • What does chmod 777 do? Is it safe?

  • Explain the Linux file permission model.

  • What is the difference between a symbolic link and a hard link?

  • How do you find large files on the system?

  • What is the sticky bit in Linux?


๐Ÿงช Hands-on Tasks

Try these on a local VM or WSL (Windows Subsystem for Linux):

  • Create a directory /demo, add a file, and set custom permissions.

  • Use find to locate .log files larger than 10MB.

  • View and explain /etc/passwd and /etc/shadow.


๐Ÿ“Œ Wrap-Up

Today was all about building a strong Linux foundation. As we move ahead in this 30-day journey, this knowledge will be the base for mastering automation, scripting, containerization, and cloud infrastructure.

0
Subscribe to my newsletter

Read articles from Tathagat Gaikwad directly inside your inbox. Subscribe to the newsletter, and don't miss out.

Written by

Tathagat Gaikwad
Tathagat Gaikwad