Linux System Administration & Automation


This is the 2nd week of 90 Days of DevOps - 2025 Edition! by Shubham Londe. Where I explored Linux system administration and automation, covering essential topics such as user management, file permissions, log analysis, process control, volume mounts, and shell scripting.
I loved this challenge because I had to explore and learn the new commands and concepts like htop, mount or loop devices. which enhanced my knowledge and widened the my knowledge over linux. I have provide a the screen shots of my task below
1️⃣ User & Group Management
- Create a user
devops_user
and add them to a groupdevops_team
.
Create a user
devops_user
and add them to a groupdevops_team
.→ command for this task would be
sudo usermod -aG devops_team devops_user
Restrict SSH login for certain users in
/etc/ssh/sshd_config
.→ Add this line
DenyUsers <username>
2️⃣ File & Directory Permissions
Create
/devops_workspace
and a fileproject_notes.txt
.Set permissions:
- Owner can edit, group can read, others have no access.
Use
ls -l
to verify permissions.
3️⃣ Log File Analysis with AWK, Grep & Sed
Use
grep
to find all occurrences of the word "error" ( there was no error word in the log file )Use
awk
to extract timestamps and log levels.
Use
sed
to replace all IP addresses with [REDACTED] for security.→
sed -E 's/([0-9]{1,3}\.){3}[0-9]{1,3}/[REDACTED]/g' Linux_2k.log
4️⃣ Volume Management & Disk Usage
Create a directory
/mnt/devops_data
.Mount a new volume (or loop device for local practice).
Verify using
df -h
andmount | grep devops_data
.
5️⃣ Process Management & Monitoring
Start a background process (
ping
google.com
> ping_test.log &
).Use
ps
,top
, andhtop
to monitor it→
PS
→
TOP
→
HTOP
6️⃣ Automate Backups with Shell Scripting
Write a shell script to back up
/devops_workspace
asbackup_$(date +%F).tar.gz
.Save it in
/backups
and schedule it usingcron
.Make the script display a success message in green text using
echo -e
.
Subscribe to my newsletter
Read articles from Subrat Yadav directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by
