Skip to content

Basic Linux Commands – Your First Kung Fu Moves

Welcome, young grasshopper. Now that you’ve installed Linux, it’s time to learn the sacred commands that will make you a true terminal warrior. Forget clicking—real pros use the keyboard. 🥋

Your terminal is your dojo. Here’s how to move like a ninja:

bash
pwd  # Shows where you are. Never get lost in the void.
ls   # List files. Because "Where the heck is my stuff?" is a common question.
cd   # Move between directories. Like walking, but cooler.

Example:

bash
cd /home  # Teleports you to the home directory.
cd ..     # Takes you one level up, like climbing a tree.
cd ~      # Instantly returns you home. Magic!

File and Directory Mastery

Creating Stuff:

bash
touch file.txt  # Summon a new (empty) file from the void.
mkdir dojo      # Create a new training ground (directory).

Removing Stuff (Use With Caution! ⚠️)

bash
rm file.txt     # Delete a file (poof, it's gone).
rmdir dojo      # Remove an empty directory.
rm -rf dojo     # Destroy a directory and everything inside (nuclear mode).

Warning: rm -rf / = Instant regret. Do not attempt.

Finding Stuff Like a Pro

bash
find / -name "secret.txt"  # Search for secret.txt across your system.
grep "password" file.txt   # Find lines containing 'password' in file.txt.

Example:

bash
grep "error" /var/log/syslog  # Find errors in system logs (a common activity).

System Monitoring – Know Your Enemy

bash
top     # Shows which processes are eating your CPU like hungry ninjas.
htop    # A better version of top (if installed).
df -h   # Show disk space (so you don’t run out mid-battle).
free -m # Show memory usage (so you know when to panic).

Becoming the Superuser

bash
whoami       # Find out who you are. Deep.
sudo !!      # Run the last command as root (useful when you forget sudo).
su -         # Become root (dangerous, but powerful).

Your First Real Test

Type this into your terminal:

bash
echo "I am a Linux Kung Fu warrior"

If it prints the message back, congratulations! You’ve taken your first step into the world of Linux mastery. 🥋🐧

Built by noobs, for noobs, with love 💻❤️