DEV Community

Anusha Kuppili
Anusha Kuppili

Posted on

DevOps Prerequisites: Your Ultimate Linux Fundamentals Guide

Hello DevOps enthusiasts! In this post, I’ll walk you through the essential Linux skills you need to kickstart your DevOps journey. Whether you’re new to Linux or transitioning from Windows, mastering these basics will set a strong foundation for working with popular DevOps and cloud tools.


Why Linux is Critical for DevOps

Linux powers the backbone of cloud infrastructure and DevOps tooling. Almost all modern DevOps tools like Docker, Kubernetes, Ansible, and Jenkins either run on Linux or rely on Linux-based environments. Kubernetes master nodes run exclusively on Linux, and Ansible requires a Linux control node as well.

Understanding Linux command-line operations, file systems, package management, and service control is therefore a non-negotiable skill for DevOps professionals.


Key Linux Concepts to Master

1. Command Line Basics

Learn how to navigate and manage files efficiently on the Linux shell:

  • ls — list directory contents
  • cd — change directory
  • pwd — print working directory
  • mkdir — create directories
  • rm — remove files or directories
  • cp — copy files/directories
  • mv — move or rename files
  • touch — create empty files
  • cat — display file contents

Example:

mkdir project && cd project
touch README.md
echo "Welcome to DevOps!" > README.md
cat README.md
Enter fullscreen mode Exit fullscreen mode

2. Understanding Users and Permissions

  • Check current user: whoami
  • Get detailed user info: id
  • Switch user: su username
  • Use sudo for admin privileges

Using sudo instead of logging in as root directly enhances security.


3. Editing Files with vi/vim

vi is a powerful text editor available on almost all Linux systems:

  • Open a file: vi filename
  • Press i to enter insert mode and start editing
  • Press ESC to return to command mode
  • Save changes: :w
  • Quit vi: :q
  • Save and quit: :wq

vi commands to know:

  • x - delete character
  • dd - delete line
  • yy - copy line
  • p - paste

Search inside vi:

/word-to-search
Enter fullscreen mode Exit fullscreen mode

4. Package Management with rpm and yum

On RPM-based systems like CentOS and Red Hat:

  • Install package:
sudo yum install package-name
Enter fullscreen mode Exit fullscreen mode
  • Remove package:
sudo yum remove package-name

text
- List installed packages:  
yum list installed
Enter fullscreen mode Exit fullscreen mode

Yum handles dependencies automatically, simplifying software management.


5. Managing Services with systemctl

Services run in the background and are integral to running applications:

  • Start a service:
sudo systemctl start service-name
Enter fullscreen mode Exit fullscreen mode
  • Enable service at boot:
sudo systemctl enable service-name
Enter fullscreen mode Exit fullscreen mode
  • Check service status:
sudo systemctl status service-name
Enter fullscreen mode Exit fullscreen mode

Example:

sudo systemctl start httpd
sudo systemctl enable httpd
sudo systemctl status httpd
Enter fullscreen mode Exit fullscreen mode

Practice Makes Perfect

Set up a Linux VM or use cloud environments to practice these commands daily. Proficiency in Linux will pay dividends in your DevOps career by enabling you to troubleshoot, automate, and scale infrastructure smoothly.


Final Thoughts

Linux knowledge is the backbone of efficient DevOps workflows. From managing files and users to configuring services and installing software, this foundation is critical before diving into advanced DevOps topics like CI/CD, containerization, and orchestration.

If you want to learn more, follow me for regular tutorials on DevOps, Linux, Cloud, and automation.


Happy Learning and Happy Automating!

— Anusha

https://www.youtube.com/@DataEnthusiastEra

If you found this guide helpful, please share it with your DevOps community!

Top comments (0)