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

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

ยท

4 min read

I'm thrilled to share with you a comprehensive and creatively designed cheat sheet that covers all the essential commands you've learned during the Linux & Git-GitHub hands-on journey. ๐Ÿค“ Whether you're a beginner or an experienced developer, this cheat sheet will be your go-to reference for daily tasks. Let's dive in and level up our skills!

Linux Commands ๐Ÿง

๐Ÿš€Table of Contents ๐Ÿ“‘

SectionCommands Covered
File Manipulationls, cd, cp, mv, rm
Text Processingcat, grep, sed, awk
System Informationuname, df, top, ps
Package Managementapt, yum, dnf, pacman
Network Managementping, ifconfig, netstat
User Administrationuseradd, passwd, sudo
File Permissionschmod, chown, chgrp
Compressiontar, zip, unzip, gzip
Task Automationcron, at, systemd

File Manipulation ๐Ÿ“‚

CommandUsage
ls๐Ÿ“„๐Ÿ“List files and directories
cd๐Ÿšช๐Ÿ“‚Change directory
cp๐Ÿ“โžก๏ธ๐Ÿ“ฆCopy files or directories
mv๐ŸššโœจMove or rename files
rm๐Ÿ—‘๏ธ๐ŸšซRemove files or directories

Text Processing โœ‰๏ธ

CommandUsage
cat๐Ÿฑ๐Ÿ“„Display file content
grep๐Ÿ”๐Ÿ“ƒSearch text in files
sed๐ŸŒŠ๐Ÿ–‹๏ธStream text editor
awk๐Ÿฆ‰๐Ÿ”งText manipulation tool

System Information ๐Ÿ’ป

CommandUsage
uname๐Ÿ’ก๐Ÿ”Display system information
df๐Ÿ’ฝ๐Ÿ“ŠDisk space usage
topโซ๐Ÿ”„Monitor system processes
ps๐Ÿ”„๐Ÿ“‹Display running processes

Package Management ๐Ÿ“ฆ

CommandUsage
apt๐Ÿ“ฆ๐Ÿ”—Debian/Ubuntu package manager
yum๐Ÿฅก๐Ÿ“ฆCentOS/Fedora package manager
dnf๐ŸŒŸ๐Ÿ“ฆNext-gen Fedora package mgr
pacman๐Ÿง๐Ÿ“ฆArch Linux package manager

Network Management ๐ŸŒ

CommandUsage
ping๐Ÿ“๐ŸŒCheck network connectivity
ifconfig๐Ÿ“ก๐Ÿ”ŒNetwork interface config
netstat๐Ÿ“Š๐ŸŒNetwork statistics

User Administration ๐Ÿ‘ค

CommandUsage
useradd๐Ÿ‘ฅโž•Add a user
passwd๐Ÿ”๐Ÿ”’Change user password
sudo๐Ÿฆธโ€โ™‚๏ธ๐Ÿ›ก๏ธExecute commands with superuser

File Permissions ๐Ÿ”

CommandUsage
chmod๐Ÿ”๐Ÿ”’Change file permissions
chown๐Ÿ‘ค๐Ÿ”งChange file owner
chgrp๐Ÿ‘ฅ๐Ÿ”งChange file group

Compression ๐Ÿ“ฆ

CommandUsage
tar๐Ÿ“ฆ๐Ÿ”—Archive files
zip๐Ÿค๐Ÿ”—Create compressed zip archive
unzip๐Ÿ—ƒ๏ธ๐Ÿ”“Extract files from zip archive
gzip๐ŸŒช๏ธ๐Ÿ“ฆCompress files

Task Automation โฐ

CommandUsage
cronโฒ๏ธ๐Ÿ“…Schedule tasks
at๐Ÿ•’๐Ÿš€Execute commands once
systemd๐Ÿ”„๐Ÿ› ๏ธSystem and service manager

Git-GitHub Commands ๐ŸŒฑ

CommandDescriptionExample Usage
git initInitialize a new Git repository.git init (Start tracking current directory)
git cloneClone a repository from a URL.git clone <URL> (Clone a repository)
git addAdd changes to the staging area.git add file.txt (Stage changes)
git commitCommit staged changes with a message.git commit -m "Added new feature" (Commit with message)
git pullFetch and merge changes from a remote repository.git pull origin main (Pull changes from "main" branch)
git pushPush local changes to a remote repository.git push origin develop (Push to "develop" branch)
git branchList, create, or delete branches.git branch feature (Create "feature" branch)
git mergeMerge two or more branches.git merge feature (Merge "feature" into current branch)
git logDisplay commit history.git log --oneline (Compact commit history)
git resetUnstage changes or reset to a previous commit.git reset HEAD file.txt (Unstage changes)
git stashTemporarily save changes without committing.git stash save "WIP" (Stash changes)
git remoteManages remote repositoriesgit remote add origin github.com/user/repo.git
git statusShows the status of your working directorygit status

Conclusion

Feel free to share this cheat sheet with your fellow developers and friends! Let's make learning and collaborating even more exciting and productive! ๐ŸŒŸ

Remember, knowledge grows when shared. ๐ŸŒฑ Keep coding, keep exploring, and keep building amazing things! ๐Ÿš€

#HappyLearning #DevOpsCommunity #LinuxGitCheatSheet

ย