Skip to main content

Command Palette

Search for a command to run...

Day 12 - DevOps Mastery Cheatsheet (Dec 8, 2023)

Published
3 min read
Day 12 - DevOps Mastery Cheatsheet  (Dec 8, 2023)
M

Hey there! I'm currently working as an Associate DevOps Engineer, and I'm diving into popular DevOps tools like Azure Devops,Linux, Docker, Kubernetes,Terraform and Ansible. I'm also on the learning track with AWS certifications to amp up my cloud game. If you're into tech collaborations and exploring new horizons, let's connect!

Linux Commands

Navigation

  • cd [directory]: Change directory. Move to the specified directory.

  • ls: List files and directories. Display the contents of the current directory.

  • pwd: Print working directory. Show the current working directory's full path.

File Operations

  • touch [filename]: Create a new file. Generates an empty file with the specified name.

  • cp [source] [destination]: Copy file or directory. Duplicate a file or directory to a specified location.

  • mv [source] [destination]: Move or rename file or directory. Move a file or directory to a new location or rename it.

  • rm [file]: Remove/delete file. Delete a file permanently.

Text Manipulation

  • cat [file]: Display content of a file. Output the content of a file to the terminal.

  • grep [pattern] [file]: Search for a pattern in a file. Find and display lines matching a specified pattern in a file.

  • echo [text] > [file]: Create or overwrite content in a file. Write text to a file, overwriting existing content.

  • nano [file]: Open a text editor. Launch the Nano text editor to create or edit files.

File Permissions

  • chmod [permissions] [file]: Change file permissions. Modify the access permissions of a file.

  • chown [owner]:[group] [file]: Change file owner and group. Assign a new owner and group to a file.

Process Management

  • ps: Display running processes. Show a snapshot of the currently running processes.

  • kill [PID]: Terminate a process. End a running process using its Process ID.

Git-GitHub Commands

Repository Basics

  • git init: Initialize a new Git repository. Start a new Git project in the current directory.

  • git clone [repository]: Clone a repository. Copy a remote repository to the local machine.

  • git status: Show the status of changes. Display the current state of the working directory.

Making Changes

  • git add [file]: Add changes to the staging area. Stage modifications for the next commit.

  • git commit -m "[message]": Commit changes with a message. Record changes to the repository with a descriptive message.

Branching

  • git branch: List branches. Display a list of all branches in the repository.

  • git checkout [branch]: Switch to a branch. Change to the specified branch.

  • git merge [branch]: Merge changes from a branch. Combine changes from the specified branch into the current branch.

Remote Collaboration

  • git remote add origin [remote repository]: Add a remote repository. Set a remote repository for the project.

  • git push -u origin [branch]: Push changes to a remote repository. Upload local branch changes to the remote repository.

  • git pull origin [branch]: Pull changes from a remote repository. Retrieve changes from the remote repository and merge them into the local branch.

More from this blog

DevOps Journey with M Hassan

174 posts

I am writing these blogs because I recently completed a comprehensive DevOps course where I gained in-depth knowledge of the topics mentioned. As I progressed through the course, I realized the importance of having a concise and accessible resource to revise and reinforce my understanding of each topic. Therefore, I decided to create cheat sheets in the form of blog posts. These cheat sheets will not only serve as a handy reference for myself but also benefit others who are also interested in mastering DevOps concepts. By documenting each topic and providing concise explanations, I aim to create a valuable resource that simplifies complex concepts and facilitates hands-on practice. This way, I can solidify my own understanding while helping others on their DevOps journey.