Skip to main content

Command Palette

Search for a command to run...

Day 2 - Basics Of Linux and Some Commands

Updated
โ€ข3 min read
Day 2 - Basics Of Linux and Some Commands
A

๐Ÿš€ Welcome to the world of DevOps with Aakash! ๐ŸŒ

Hey tech enthusiasts! ๐Ÿ‘‹ I'm Aakash, a dedicated freelance Linux System Admin @xFusionCorp, and I'm on a mission to conquer the world of DevOps. Currently, I'm immersed in building exciting projects and sharing my learning experiences with you all.

๐Ÿ› ๏ธ My Tech Arsenal:

  • Docker
  • Linux
  • Kubernetes
  • Jenkins
  • AWS
  • Python
  • Java
  • Prometheus
  • Grafana
  • Ansible
  • Terraform

Join me in navigating the intricate realms of AWS DevOps technology. Let's embrace learning with gratitude and thrive in this ever-evolving landscape!

๐Ÿค Connect with me for:

  • Friendly chats
  • Shared experiences
  • Learning moments

Follow my journey on Twitter and Linkedin for daily insights and tech goodness. Let's build, automate, and innovate our way through the exciting world of DevOps! ๐Ÿš€ #DevOps #AWS #TechEnthusiast #InnovationJourney #90DaysOfDevOps

What is Linux?

Linux is a Unix-based open-source Operating System developed by Linus Torvalds in September 1991. There are a tons of operating systems that use Linux as their base. Technically they are called "Linux Distributions" or "Flavors" . Some of the widely used Linux Flavors are Debian, Ubuntu, Kali Linux to name a few.

Let's Understand It's Architecture to the very basics:

Linux Architecture Diagram

Kernel:

The kernel is the core component of an operating system. This provides a platform for programs and various services to run on top of it. The Linux Kernel is written in C Language and it talks directly with the hardware. All the commands that run on a Linux system are written in C and stored in the kernel.

Shell:

It is a special user program that provides an interface for the user to interact with the operating system. Shell accepts human-readable commands from users and converts them into something which the kernel can understand. It is a command language interpreter that executes commands read from input devices such as keyboards or from files.

Enough of the basic theory, Now let's heads up to some basic Commands

Linux Basic Commands:

Some Basic Commands:

  1. To list all the files in a directory(folder) :

     ls
    
  2. To Make a Directory:

     mkdir <file_name>
    
  3. To make a file:

     touch <file_name>
    
  4. To make a directory and a file inside of it in one command:

     mkdir -p <directory_name>/<file_name>    : -p flag stands for parent i.e. first parent i.e. directory will be created and then the child i.e file .
    
  5. To check the user:

     whoami
    
  6. To check the path of present directory i.e. Directory you are currently in:

     pwd
    
  7. To print on screen:

     echo
    
  8. To read the contents of a file:

     cat <file_name>
    
  9. To seek help for a command:

     [command] --help    This will tell you about the details of the command.
    
  10. List all files in a directory including hidden ones:

    ls -a     the -a flag is used to display all files including the hidden ones.
    

Understanding a command:

Understanding a command is the most crucial part when starting with Linux. It looks complex but is straight and easy. Lets Understand it using a few examples:

  • Copy : cp

  • Change Directory : cd

  • List : ls

  • Make Directory: mkdir

In these examples we can see few bold letters, this pattern is carried on throughout Linux commands be it basics or even advanced.

Summary

Linux is an open-source operating system with distributions like Debian and Ubuntu. Its architecture includes a kernel (core component) and a shell (user interface). Basic commands include "ls" (list files), "mkdir" (make directory), and "touch" (make file). Other commands like "whoami," "pwd," and "echo" perform user-related tasks. Using "--help" with a command provides details. Commands follow consistent patterns, like "cp" for copy and "cd" for change directory.

Hope you find this insightful. Ending this with a beautiful quote by the creator of Linux, Linus Torvalds himself-

The Linux philosophy is 'Laugh in the face of danger'. Oops. Wrong One. 'Do it yourself'. Yes, that's it.

Happy Learning.

90DaysOfDevOps

Part 38 of 39

In this series I will be positing my learnings of DevOps for 90 days continuously. We will be starting from the basics covering linux and will go upto covering the advanced concepts of DevSecOps.

Up next

Day 1 - Introduction to DevOps

What is DevOps? In the dynamic world of tech, DevOps emerges as the harmonious blend of "Development" and "Operations." Picture this: Development crafts the project from scratch, while Operations gracefully deploys and makes it accessible to users. A...

More from this blog

D

DevOps with Aakash: Unleashing DevOps Excellence

44 posts

I'm Aakash, a freelance Linux System Admin @xFusionCorp, diving deep into the world of Docker, Kubernetes, Jenkins, AWS, and more. Let's navigate AWS DevOps tech together! Connect with me for friendly chats, shared experiences, and learning moments. Follow my journey on Twitter and Linkedin for daily insights. Let's build, automate, and innovate in the exciting world of DevOps! ๐ŸŒ