DEV Community

Cover image for Day 2: Setting Up Virtual Machines and Exploring Linux Basics
Kanavsingh
Kanavsingh

Posted on

Day 2: Setting Up Virtual Machines and Exploring Linux Basics

Hello everyone! Welcome to Day 2 of my 30-day DevOps journey. Today, I'll be sharing insights from sections 3 and 4 of the "DevOps Beginners to Advanced with Projects" course by Imran Teli. We'll be diving into setting up virtual machines (VMs) and exploring the basics of Linux.

_Section 3: Setting Up Virtual Machines

What is a Virtual Machine?

A Virtual Machine (VM) is a software emulation of a physical computer. It runs an operating system and applications like a physical computer but is isolated from the underlying hardware. This allows multiple VMs to run on a single physical machine, making it a versatile tool for development and testing environments.

Why Use Virtual Machines?

Isolation: VMs provide a completely isolated environment for running applications, ensuring that the software runs in a consistent and secure manner.

Resource Efficiency: Multiple VMs can share the resources of a single physical machine, improving resource utilization.
Scalability: VMs can be easily created, cloned, and destroyed, providing a flexible and scalable environment for various development needs.

Here's a step-by-step guide to setting up a VM:

Choose a Hypervisor: A hypervisor is software that creates and manages VMs. Popular hypervisors include VMware, VirtualBox, and Hyper-V.
Install the Hypervisor: Download and install the hypervisor of your choice on your host machine.
Create a New VM:
Open the hypervisor and select the option to create a new VM.
Allocate resources such as CPU, memory, and storage for the VM.
Choose the operating system you want to install on the VM.
Install the Operating System: Insert the installation media (ISO file) for the chosen OS and follow the installation prompts.
Configure the VM: After the OS installation, configure network settings, install necessary updates, and set up any additional software required.

Section 4: Exploring Linux Basics

Why Linux?
Linux is a powerful and flexible operating system that is widely used in the DevOps world. Its open-source nature, robustness, and extensive toolset make it an ideal choice for servers, development environments, and cloud infrastructure.

Basic Linux Commands
Here are some fundamental Linux commands that every DevOps professional should know:

Navigating the Filesystem:
ls: List directory contents.
cd: Change directory.
pwd: Print working directory.
File and Directory Operations:
touch [file]: Create a new file.
mkdir [directory]: Create a new directory.
rm [file]: Remove a file.
rmdir [directory]: Remove an empty directory.
cp [source] [destination]: Copy files or directories.
mv [source] [destination]: Move or rename files or directories.
File Viewing and Editing:
cat [file]: View file contents.
nano [file]: Edit a file using the Nano text editor.
vi [file]: Edit a file using the Vi text editor.
System Monitoring and Management:
top: Display running processes and system resource usage.
ps: Display currently running processes.
df: Display disk space usage.
free: Display memory usage.
Permissions and Ownership
Changing Permissions:
chmod [permissions] [file]: Change the permissions of a file or directory.
Changing Ownership:
chown [user]:[group] [file]: Change the owner and group of a file or directory.
My Learning Experience
Setting up virtual machines and getting hands-on with Linux has been a rewarding experience. Understanding how to create and manage VMs provides a strong foundation for creating isolated and scalable development environments. Learning Linux basics is essential for any DevOps professional, as it is the backbone of many server and cloud environments.

What's Next?
Tomorrow, I'll be diving into more advanced Linux commands and scripting, which are crucial for automating tasks and managing systems efficiently. Stay tuned for more exciting insights!

Connect with Me
Feel free to connect with me on LinkedIn for more updates and to join the conversation. Let's learn and grow together in this exciting field of DevOps!

Top comments (0)