Skip to main content

Command Palette

Search for a command to run...

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

Published
β€’4 min read
Day 14 Task: Create a Linux & Git-GitHub Cheat Sheet
P

Greetings! πŸ‘‹ I'm Priyadarshi Ranjan, a dedicated DevOps Engineer embarking on an enriching journey. Join me as I delve into the dynamic realms of cloud computing and DevOps through insightful blogs and updates. πŸ› οΈ My focus? Harnessing AWS services, optimizing CI/CD pipelines, and mastering infrastructure as code. Whether you're peers, interns, or curious learners, let's thrive together in the vibrant DevOps ecosystem. 🌐 Connect with me for engaging discussions, shared insights, and mutual growth opportunities. Let's embrace the learning curve and excel in the dynamic realm of AWS and DevOps technology!

Finally!! πŸŽ‰

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!

Task: 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.

Sample Linux & Git-GitHub Cheat Sheet


Linux Commands

  1. ls: Lists all files and directories in the current directory.

    • Usage: ls

    • Example: ls -l (detailed list view)

  2. cd: Changes the current directory.

    • Usage: cd [directory]

    • Example: cd /home (moves to the /home directory)

  3. pwd: Prints the working directory.

    • Usage: pwd

    • Example: pwd (displays the current directory path)

  4. cp: Copies files or directories.

    • Usage: cp [source] [destination]

    • Example: cp file.txt /backup/ (copies file.txt to /backup/ directory)

  5. mv: Moves or renames files or directories.

    • Usage: mv [source] [destination]

    • Example: mv oldname.txt newname.txt (renames the file)

  6. rm: Removes files or directories.

    • Usage: rm [file]

    • Example: rm -r folder (removes folder and its contents)

  7. chmod: Changes the file permissions.

    • Usage: chmod [permissions] [file]

    • Example: chmod 755script.sh (sets the permission to rwxr-xr-x)

  8. chown: Changes the file owner.

    • Usage: chown [owner] [file]

    • Example: chown user:group file.txt (changes the owner to user and group)

  9. grep: Searches text using patterns.

    • Usage: grep [pattern] [file]

    • Example: grep 'error' logfile.txt (searches for the word 'error' in logfile.txt)

  10. find: Searches for files in a directory hierarchy.

    • Usage: find [directory] -name [filename]

    • Example: find /home -name "*.txt" (finds all .txt files in /home directory)


Git & GitHub Commands

  1. git init: Initializes a new Git repository.

    • Usage: git init

    • Example: git init myproject (creates a new repository in the myproject directory)

  2. git clone: Clones a repository into a new directory.

  3. git status: Displays the state of the working directory and the staging area.

    • Usage: git status

    • Example: git status (shows which changes have been staged, which haven't, and files that aren’t being tracked by Git)

  4. git add: Adds file contents to the staging area.

    • Usage: git add [file]

    • Example: git add . (adds all changes to the staging area)

  5. git commit: Records changes to the repository.

    • Usage: git commit -m "[message]"

    • Example: git commit -m "Initial commit" (commits the changes with a message)

  6. git push: Updates the remote repository with the committed changes.

    • Usage: git push [remote] [branch]

    • Example: git push origin main (pushes the changes to the main branch of the remote repository)

  7. git pull: Fetches and merges changes from the remote repository to the local repository.

    • Usage: git pull [remote] [branch]

    • Example: git pull origin main (fetches and merges changes from the main branch of the remote repository)

  8. git branch: Lists, creates, or deletes branches.

    • Usage: git branch

    • Example: git branch new-feature (creates a new branch called new-feature)

  9. git checkout: Switches branches or restores working tree files.

    • Usage: git checkout [branch]

    • Example: git checkout main (switches to the main branch)

  10. git merge: Merges two or more development histories together.

    • Usage: git merge [branch]

    • Example: git merge new-feature (merges new-feature branch into the current branch)


Conclusion

Creating this cheat sheet not only solidifies your understanding but also provides a handy reference for future projects. Use this task to showcase your knowledge and creativity, making something both informative and visually appealing

Connect and Follow Me on Socials

LINKDIN | GITHUB |TWITTER

More from this blog

Priyadarshi Ranjan

71 posts

As a DevOps engineer, I leverage automation and continuous integration to streamline development workflows, ensuring robust and scalable deployments.

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