Skip to main content

Command Palette

Search for a command to run...

Linux & Git Cheat-Sheet

Day-12 #90daysofdevops

Published
β€’2 min readβ€’View as Markdown
N

Nikhil Patil

πŸ‘¨β€πŸ’» I love Linux & DevOps! πŸ’»

🐧 LinuxπŸ‘¨β€πŸ’» | DevOps & Cloud Enthusiast | 🌍 Azure Admin | πŸ› οΈ Ansible | πŸ“‚ Git | 🐳 Docker | πŸ”‘ OpenLDAP | πŸ–₯️ System Admin | | πŸš€ Jenkins πŸ› οΈ

🏠 Pune

🌟 I'm really into using and managing computers with Linux. I also like making things work smoothly and quickly.

πŸ“– I work with Microsoft Azure, use tools like Ansible and Git to automate tasks, and make software run in containers with Docker.

πŸ”’ I handle access and security using OpenLDAP, and I'm all about keeping systems running smoothly.

🌐 Exploring opportunities in cloud and DevOps.

πŸ“§ Get in touch: nikrpatil1997@gmail.com

Linux Cheat-Sheet

  1. ls: List files and directories.

  2. pwd: Print the current working directory.

  3. cd: Change the directory.

  4. mkdir: Create a new directory.

  5. rm -r: remove the directory recursively

  6. df: Display disk space usage.

  7. crontab: to add commands in crontab so that they will run on schedule.

  8. rm: Remove the files

  9. touch: Create an empty file

  10. passwd: To set a password of any username.

  11. mv: Move or rename files and directories.

  12. ps: Show the currently running processes.

  13. chown: Change file ownership.

  14. cat: Concatenate and display the contents of a file.

  15. uname -r: show the version of the kernel

  16. find: Search for files and directories

  17. id: To check the id of any username.

  18. whoami: show the current logged-in username

  19. usermod: To change the id of any username.

  20. chgrp: Change group owner.

  21. groupadd: To create a new group.

  22. useradd: To add a user.

  23. setfacl: To add, modify or delete ACL on any file/directory.

  24. grep: Search for a pattern in a file.

  25. history: show a list of previously used commands

  26. cp: Copy files and directories.

  27. getfacl: To get the current ACL on any file/directory.

  28. du: Show the disk usage of files and directories.

  29. man: Display the manual page for a specific command.

  30. userdel: To delete any user.

  31. yum: To install any package.

  32. chmod: Change file permissions.

  33. head: Display the beginning lines of a file.

  34. tail: Display the ending lines of a file.

  35. systemctl: To manage system services.

Git Cheat-sheet

  1. git reset - reset the repository state

  2. git clone - download remote repository to the local

  3. git status - check the status of the git directory

  4. git merge - merge two branches

  5. git stash - temporarily save changes not committed

  6. git pull - pull changes from the remote repository and merge

  7. git revert - undo the changes made in a previous commit.

  8. git config - to set configurations

  9. git push - push the files to the remote repository

  10. git diff - show the difference between the working directory and the staging area

  11. git rebase - update the commit history

  12. git init - initialize the directory

  13. git log - check the commit history

  14. git fetch - fetch changes from the remote repository

  15. git add - add files to commit

  16. git rm - remove files from working directory

  17. git cherry-pick - applies specific commit from one to another branch

  18. git checkout - switch to different branches