Top 10 Debian Commands Every Beginner Must Know

Published in

on

If you’re new to Debian or any Debian-based Linux distribution (like Ubuntu, Linux Mint, or MX Linux), the command line may feel intimidating at first.

But don’t worry—once you master a few essential commands, you’ll feel much more confident managing your system.

Debian

In this guide, we’ll cover the top 10 Debian commands every beginner must know, along with explanations, examples, and tips to help you get started.

Why Learn Debian Commands?

While Debian offers graphical tools for almost everything, knowing the command line gives you:

  • More control – Perform tasks faster and with precision.
  • Better troubleshooting – Fix issues that GUIs can’t handle.
  • Universal knowledge – Commands work on almost all Linux distros.
  • Confidence – You’ll feel more like a real Linux user.

1. pwd – Print Working Directory.

What it does: Shows your current directory (where you are in the filesystem).

Example:

pwd

Output:

/home/username/Documents

Use this when you’re lost in the terminal and need to know your exact location.

2. ls – List Files and Directories.

What it does: Displays files and folders in your current directory.

Examples:

ls         # Simple list
ls -l      # Long listing (details like permissions, size, date)
ls -a      # Show hidden files (those starting with .)
ls -lh     # Human-readable sizes (KB, MB, GB)

This is the most used Linux command for exploring files.

3. cd – Change Directory.

What it does: Moves you between directories.

Examples:

cd /home/username/Documents   # Go to Documents
cd ..                         # Go one step back (parent directory)
cd ~                          # Go to your home directory

Essential for navigating the filesystem.

4. apt-get / apt – Install, Update, and Remove Software.

Debian uses APT (Advanced Package Tool) for managing software packages.

Examples:

sudo apt update              # Update package lists
sudo apt upgrade             # Upgrade installed packages
sudo apt install firefox-esr # Install Firefox
sudo apt remove gimp         # Remove GIMP
sudo apt autoremove          # Remove unused dependencies

This is the heart of Debian—managing software easily from the terminal.

5. cat – View File Content.

What it does: Displays the content of a file.

Example:

cat /etc/os-release

Output:

PRETTY_NAME="Debian GNU/Linux 12 (bookworm)"

Great for quickly viewing config files and text files.

6. cp – Copy Files and Directories.

What it does: Copies files or directories.

Examples:

cp file.txt backup.txt       # Copy a file
cp -r folder/ backup_folder/ # Copy a directory (recursive)

Use this to duplicate files or make backups.

7. mv – Move or Rename Files.

What it does: Moves or renames files.

Examples:

mv file.txt /home/username/Desktop/  # Move file
mv oldname.txt newname.txt           # Rename file

Think of it as cut-paste + rename in one command.

8. rm – Remove Files and Directories.

What it does: Deletes files or directories.

Examples:

rm file.txt               # Remove a file
rm -r folder/             # Remove a folder and its contents
rm -rf folder/            # Force remove without asking (be careful!)

Warning: Once deleted, it’s gone—no recycle bin. Always double-check before using rm -rf.

9. chmod – Change File Permissions.

Linux uses permissions (read, write, execute) for users, groups, and others.

Examples:

chmod +x script.sh         # Make a file executable
chmod 644 file.txt         # Set read/write for owner, read-only for others

This is crucial when working with scripts or shared files.

10. man – Manual Pages.

What it does: Displays the manual (documentation) for a command.

Examples:

man ls       # Show manual for ls
man chmod    # Show manual for chmod

Press Q to quit the manual.

The man command is your built-in help system in Debian.

Bonus Commands (Very Useful for Beginners).

  • sudo → Run commands as an administrator (root user).
  • df -h → Show disk space usage.
  • free -h → Show available RAM.
  • top or htop → Monitor running processes.
  • echo "text" → Print text in terminal (useful in scripts).

Practical Example: Installing Software and Checking System.

Here’s a mini real-world example using multiple commands:

pwd                         # See where you are
cd ~/Downloads              # Go to Downloads
ls                          # Check files
sudo apt update             # Update system
sudo apt install vlc        # Install VLC media player
df -h                       # Check disk space
free -h                     # Check memory usage

With just a few commands, you can navigate, install apps, and monitor your system.

Final Thoughts.

Learning the top Debian commands is the first step to becoming comfortable with Linux. Once you master commands like ls, cd, apt, and chmod, you’ll find that the terminal is not scary but empowering.

  • If you’re managing files → focus on pwd, ls, cd, cp, mv, rm.
  • If you’re installing software → learn apt and sudo.
  • If you’re exploring → cat and man are your best friends.

Remember: The more you use Debian commands, the faster they’ll become second nature. So enjoy the learning new things and master it.

Leave a Reply

Your email address will not be published. Required fields are marked *