๐ 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:
Directory | Description |
/ | Root directory โ top of the hierarchy |
/bin | Essential binaries like ls , cp |
/etc | System config files |
/var | Log files, spools |
/usr | User-installed applications |
/home | User personal directories |
/tmp | Temporary 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
โ readw
โ writex
โ 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
Value | Permission |
7 | rwx |
6 | rw- |
5 | r-x |
4 | r-- |
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.
Subscribe to my newsletter
Read articles from Tathagat Gaikwad directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by
