Skip to content

Basic Commands – Your First Steps in the Linux Dojo πŸ₯‹πŸ§ ​

Welcome, young grasshopper! 🏯 You have entered the sacred dojo of Linux Kung Fu. Before you can wield the mighty power of scripts and automation, you must first tame the command line.

Fear not! Your training begins now. Master these basic commands, and soon you shall navigate Linux like a true ninja! πŸ₯·πŸ’»

Think of Linux as a giant dojo, with directories (folders) acting as different training rooms. You must learn how to move silently through them.

Moving Between Folders ​

CommandWhat It Does (in ninja terms)
pwdπŸ—Ί Shows where you are in the dojo (Print Working Directory)
lsπŸ‘€ Looks around the room (Lists files & folders)
ls -laπŸ•΅οΈ Unveils hidden scrolls (Shows all files, including hidden ones)
cd dojoπŸšͺ Walks into the dojo (Moves into a directory)
cd ..πŸšΆβ€β™‚οΈ Walks back to the previous room (Go up one level)
cd ~🏠 Teleports back to your home base (Home directory)
cd -πŸ”„ Moves back to where you just were (Switch directories)

Mastering File & Directory Creation ​

A ninja must know how to create and destroy files and folders without leaving a trace!

πŸ“œ Creating & Removing Files ​

CommandWhat It Does
touch scroll.txtπŸ“ Creates a new, empty file (like a blank scroll)
echo "Ninja rule #1: Stay silent." > rules.txtπŸ—£ Writes text into a file
cat rules.txtπŸ“– Reads a file out loud
rm rules.txtπŸ’€ Destroys a file (Use with caution, young warrior!)

πŸ“‚ Creating & Removing Directories ​

CommandWhat It Does
mkdir secret_dojo🏯 Builds a new training room (Creates a folder)
rm -r secret_dojo🏚 Demolishes the dojo (Removes a folder and all inside)

Training with File Permissions & Ownership ​

Not all ninjas can enter all rooms. Permissions determine who can access what!

πŸ›‘ Changing File Permissions ​

CommandWhat It Does
ls -lπŸ”Ž Shows who owns what in the dojo
chmod +x script.shπŸ—‘ Grants execution powers to a script (Makes it runnable)
chmod 777 secret.txtπŸ›‘ Dangerous! Gives everyone access (Not recommended!)

πŸ‘‘ Changing File Ownership ​

CommandWhat It Does
chown master:warriors scroll.txtπŸ‘‘ Gives ownership of a file to a new master

The Speed Techniques – Aliases & Shortcuts ​

A true ninja doesn't type ls -la every time. We use shortcuts!

🎭 Creating Aliases for Faster Commands ​

CommandWhat It Does
alias ll="ls -la"🏎 Replaces ll with ls -la (Super speed!)
alias ninja="echo I am invisible!"🎭 Creates a fun alias

To make it permanent, add your aliases to:

bash
~/.bashrc  # For Bash users
~/.zshrc   # For Zsh users

Built by noobs, for noobs, with love πŸ’»β€οΈ