Day 14: Create a Linux & Git-GitHub Cheat Sheet

Vishal BhosaleVishal Bhosale
3 min read

You have completed the Linux & Git-GitHub hands-on tasks, and I hope you have learned something interesting from it.

Now, let's create an interesting assignment that will not only help you in the future but also benefit the DevOps community!

Tasks with Answers: Create a Cheat Sheet

Let’s make a well-articulated and documented cheat sheet with all the commands you learned so far in Linux and Git-GitHub, along with a brief description of their usage.

Show us your knowledge mixed with your creativity 😎.

Guidelines

  • The cheat sheet should be unique and reflect your understanding.

  • Include all the important commands you have learned.

  • Provide a brief description of each command's usage.

  • Make it visually appealing and easy to understand.

Linux Commands / Git Commands

File and Directory Management

  • ls - Lists files and directories.

  • cd <directory> - Changes the directory.

  • pwd - Prints current directory.

  • mkdir <directory> - Creates a new directory.

  • rm <file> - Removes a file.

  • rm -r <directory> - Removes a directory and its contents.

  • cp <source> <destination> - Copies files or directories.

  • mv <source> <destination> - Moves or renames files or directories.

  • touch <file> - Creates or updates a file.

Viewing and Editing Files

  • cat <file> - Displays file content.

  • less <file> - Views file content one screen at a time.

  • nano <file> - Edits files using nano editor.

  • vim <file> - Edits files using vim editor.

System Information

  • uname -a - Displays system information.

  • top - Shows real-time system processes.

  • df -h - Displays disk usage.

  • free -h - Displays memory usage.

Permissions

  • chmod <permissions> <file> - Changes file permissions.

  • chown <owner>:<group> <file> - Changes file owner and group.

Networking

  • ping <host> - Sends ICMP echo requests.

  • ifconfig - Displays or configures network interfaces.

Git Commands

Configuration

Repository Management

  • git init - Initializes a new repository.

  • git clone <repository> - Clones a repository.

Basic Operations

  • git status - Shows working tree status.

  • git add <file> - Stages changes.

  • git commit -m "message" - Commits changes.

  • git push - Pushes changes to remote repository.

  • git checkout -b dev - Create a new branch from master.

  • git checkout - switch to another branch and check it out into your working directory.

  • git log --oneline --graph --all - visualize the branch structure.

  • git push origin dev - Push Changes to GitHub.

  • git merge dev - merge it into master/main.

  • git log - show all commits in the current branch’s history.

0
Subscribe to my newsletter

Read articles from Vishal Bhosale directly inside your inbox. Subscribe to the newsletter, and don't miss out.

Written by

Vishal Bhosale
Vishal Bhosale

Hello, I started my journey as a software tester and later discovered that I am interested in DevOps. So as a transiting of career to DevOps engineer. I am practicing the #100daysofdevops Challenge for self-improvement and learning the process of DevOps. I am sharing my experience with you, you can contact me at vishalabhosale30@gmail.com