2CupsofJoe

10 Essential Linux Commands

🐧 10 Essential Linux Commands Every Beginner Should Know


🎯 Overview

Getting started with Linux can feel overwhelming, especially when you're first introduced to the terminal. The good news? You only need to learn a handful of core commands to become productive.

In this guide, we’ll cover 10 essential Linux commands that every beginner should know. These commands form the foundation of everyday Linux usage and will help you navigate, manage files, and understand your system.


⚑ Quick Version (TL;DR)

πŸ’‘ Memory Trick:
πŸ‘‰ List β†’ Change β†’ Make β†’ Remove β†’ Copy β†’ Move β†’ Print β†’ Manual β†’ Change Mode β†’ Exit


πŸ“˜ Main Explanation

1. πŸ“‚ ls β€” List Files and Directories

Displays all files and folders in your current directory.

ls

Useful option:

ls -l

Shows detailed information like permissions, owner, and file size.


2. πŸ“ cd β€” Change Directory

Moves you between directories.

cd Documents

Helpful shortcuts:


3. πŸ†• mkdir β€” Create a Directory

Creates a new folder.

mkdir MyNewFolder

4. ❌ rm β€” Remove Files and Directories

Deletes files permanently (no recycle bin).

rm file.txt

⚠️ Be careful:

rm -r folder/

Deletes a directory and everything inside it.


5. πŸ“„ cp β€” Copy Files and Directories

Copies files or folders.

cp file1.txt file2.txt

For directories:

cp -r folder1 folder2

6. 🚚 mv β€” Move or Rename Files

Used to move or rename files.

mv file1.txt file2.txt
mv file.txt /home/user/Documents/

7. πŸ“ pwd β€” Print Working Directory

Shows your current directory path.

pwd

8. πŸ“˜ man β€” Manual Pages

Displays help documentation for commands.

man ls

Press q to exit.


9. πŸ” chmod β€” Change File Permissions

Controls access permissions for files.

chmod u+x script.sh

Adds execute permission for the file owner.


10. πŸšͺ exit β€” Exit the Terminal

Closes your terminal session.

exit

πŸ“Š Command Cheat Sheet

Command Purpose Example
ls List files ls -l
cd Change directory cd Documents
mkdir Create folder mkdir Test
rm Delete files rm file.txt
cp Copy files cp a.txt b.txt
mv Move/rename mv a.txt b.txt
pwd Show location pwd
man Help pages man cp
chmod Permissions chmod +x script.sh
exit Close terminal exit

🧠 Easy Memory Trick

Think of working in Linux like managing a workspace:


πŸ” Real-World Examples

βœ… Scenario 1: Organizing files

mkdir Projects
cd Projects
cp ../notes.txt .

βœ… Scenario 2: Cleaning up files

ls
rm old_file.txt

βœ… Scenario 3: Running a script

chmod +x script.sh
./script.sh

βœ… Final Takeaway

You don’t need to know hundreds of commands to be effective in Linuxβ€”just these 10 will cover most everyday tasks.

πŸ‘‰ Start small, practice often, and experiment in a safe directory.

Once you’re comfortable with these, you’ll be ready to explore more advanced Linux concepts and commands πŸš€