DevOps Linux & Git Commands Cheat Sheet ππ§π» | Day 12 of 90 Days of DevOps

π©βπ» As a seasoned software engineer with 7+ years of experience, my expertise includes:
- π Developing web applications using Javascript (frontend and backend)
- πΌ Working across diverse industries like construction, finance, marketing, and entrepreneurship
- π Holding a postgraduate degree in Master of Computer Applications from the University of Pune
π§ My technical prowess lies in:
- βοΈ Leading Javascript frameworks: React, Node.js, and Express.js
- π Delivering robust and scalable web applications with the best software engineering practices
π± Excitingly, I've started my DevOps learning journey with #90DaysOfDevOps to enhance my skills in this area.
π§ Beyond technical skills, I offer:
- π‘ Exceptional problem-solving abilities and a strong aptitude for learning new technologies
- π€ A collaborative mindset, making me a valuable team player in diverse environments
π My passion is in delivering high-quality software solutions that solve real-world problems. If you're seeking a skilled and experienced software engineer for top-notch web applications, let's connect and explore potential opportunities together! π€
Hi everyone, welcome to my #90DaysOfDevOps challenge! In this blog post, I will share with you a comprehensive cheat sheet of all the Linux commands and Git commands that I have learned and used from day 1 to day 11 of my online training on DevOps. This cheat sheet will help you master the basics of Linux, Git, and GitHub.
Let's get started! π
Linux Commands:
π
pwd: Prints the current working directory.pwdThis command displays the current directory you are in.
π
ls: Lists files and directories.ls -lThis command lists all files and directories in a long format.
π
mkdir: Creates a new directory.mkdir new_directoryThis command creates a new directory with the specified name.
β¬οΈ
cd: Changes directory.cd /path/to/directoryThis command changes your current directory to the specified path.
βοΈ
touch: Creates a new file.touch new_file.txtThis command creates a new empty file with the given name.
π¦
cp: Copies files and directories.cp file.txt /path/to/destinationThis command copies the file or directory to the specified destination.
π
mv: Moves or renames files/directories.mv old_name.txt new_name.txtThis command renames the file or moves it to a new location.
ποΈ
rm: Removes files/directories.rm file.txtThis command deletes the specified file or directory.
π
grep: Searches for patterns in files.grep "keyword" file.txtThis command searches for the specified keyword in the file.
π
chmod: Changes file permissions.chmod +x script.shThis command changes the permissions of the file to allow execution.
βοΈ
nano: Text editor for editing files.nano file.txtThis command opens the file in the Nano text editor for editing.
π€
useradd: Adds a new user to the system.useradd johnThis command creates a new user with the given username.
π€
userdel: Deletes a user from the system.userdel johnThis command deletes the user with the specified username.
π₯
groupadd: Adds a new group to the system.groupadd developersThis command creates a new group with the given name.
π₯
groupdel: Deletes a group from the system.groupdel developersThis command deletes the group with the specified name.
Git Commands:
π
git init: Initializes a new Git repository.git initThis command creates a new Git repository in the current directory.
π
git status: Shows the status of the working tree and the staging area.git statusThis command shows which files are modified, staged, untracked, etc.
β
git add: Adds files to the staging area.git add file.txtThis command adds the specified file to the staging area for the next commit.
πΎ
git commit: Commits changes to the repository.git commit -m "Added new feature"This command commits the staged changes with the given commit message.
π
git checkout: Switches branches or restores files from a branch.git checkout feature_branchThis command switches to the specified branch.
ποΈ
git branch: Lists, creates, or deletes branches.git branch -d feature_branchThis command deletes the specified branch.
π
git push: Pushes local changes to a remote repository.git push origin masterThis command pushes the local changes to the "master" branch of the remote repository.
π
git merge: Merges branches.git merge feature_branchThis command merges the specified branch into the current branch.
GitHub Commands:
π
git clone: Clones a remote repository to your local machine.git clone https://github.com/username/repo.gitThis command clones the repository to your local machine.
β
git remote add: Adds a new remote repository.git remote add origin https://github.com/username/repo.gitThis command adds the remote repository with the specified name and URL.
β‘οΈ
git pull: Pulls changes from a remote repository.git pull origin masterThis command pulls the latest changes from the "master" branch of the remote repository.
And that's it! You now have a handy cheatsheet of all the essential Linux, Git, and GitHub commands that will support you in your DevOps journey. From managing files and directories to handling user accounts and mastering version control, these commands are fundamental for every DevOps engineer.
I hope you find this cheat sheet helpful and an excellent reference guide in your daily work.
If you have any questions, comments, or suggestions, feel free to leave them below or contact me on my π LinkedIn or π GitHub profiles.
Thank you for joining me in my #90DaysOfDevOps challenge, and stay tuned for more exciting updates!




