Day 14 Linux & Git-GitHub Cheat Sheet: Essential Commands for DevOps

Hi there! I'm Fauzeya 👩💻, a passionate DevOps Engineer with a background in Computer Science Engineering🎓. I’m committed to enhancing security🔒, efficiency⚙️, and effectiveness in software development and deployment processes. With extensive knowledge in cloud computing☁️, containerization📦, and automation🤖, I aim to stay updated with the latest tools and methodologies in the DevOps field. Currently, I’m on a journey to deepen my understanding of DevOps I enjoy sharing my learning experiences and insights through my blog, 📝where I cover topics related to DevOps practices, tutorials, and challenges. I believe in continuous growth and learning and am excited to connect with fellow tech enthusiasts and professionals🤝. Let’s embark on this journey together!🚀
In the world of DevOps, proficiency with Linux and Git is essential. This cheat sheet consolidates key commands that every DevOps engineer should know. Whether managing servers or collaborating on code, these commands will become your trusted allies.
This cheat sheet is divided into two sections: Linux commands and Git commands. Each command is accompanied by a brief description, allowing for quick reference. Let's dive into the essential commands!
Linux cheat sheet🐧
| Command | Description |
|----------------------------|-------------------------------------------------------|
| `ls` | List files and directories in the current directory. |
| `cd [directory]` | Change to the specified directory. |
| `pwd` | Print the current working directory. |
| `mkdir [directory]` | Create a new directory. |
| `rm [file]` | Remove a file. |
| `cp [source] [dest]` | Copy files or directories. |
| `mv [source] [dest]` | Move or rename files or directories. |
| `chmod [permissions] [file]` | Change file permissions. |
| `grep [pattern] [file]` | Search for a specific pattern in a file. |
| `find [directory] -name [filename]` | Search for files in a directory. |
| `nano [file]` | Open a file in the nano text editor. |
| `top` | Display running processes. |
| `ps aux` | List all running processes. |
| `df -h` | Show disk space usage. |
| `du -sh [directory]` | Show the size of a directory. |
Git Cheatsheet 🌳
| Command | Description |
|--------------------------------|------------------------------------------------------|
| `git init` | Initialize a new Git repository. |
| `git clone [url]` | Clone an existing repository from a URL. |
| `git status` | Show the status of changes in the working directory. |
| `git add [file]` | Stage changes to a file for commit. |
| `git commit -m "[message]"` | Commit staged changes with a descriptive message. |
| `git push [remote] [branch]` | Push local changes to a remote repository. |
| `git pull [remote] [branch]` | Fetch and merge changes from a remote repository. |
| `git branch` | List all branches in the repository. |
| `git checkout [branch]` | Switch to a specified branch. |
| `git merge [branch]` | Merge changes from one branch into the current branch.|
| `git log` | Show commit history. |
| `git stash` | Stash changes in the working directory. |
| `git remote -v` | Show remote repository URLs. |
📚Mastering Linux and Git commands is crucial for any aspiring DevOps engineer. This cheat sheet is a quick reference guide to enhance efficiency and productivity. I encourage you to share your experiences and
additional tips in the comments below!
If you found this cheat sheet helpful, please share it with your colleagues or fellow DevOps enthusiasts! Follow my blog for more insights and resources on DevOps practices.🚀




