DEV Community

Cover image for 🐧 Top 10 Linux Commands Every Beginner Must Know
Mubarak
Mubarak

Posted on

🐧 Top 10 Linux Commands Every Beginner Must Know

Learning Linux might feel scary at first, but once you master a few essential commands, you’ll be navigating like a pro. In this tutorial, I’ll walk you through 10 must-know Linux commands with real examples and outputs you can try on your own terminal.

Let's get started.🚀

1) pwd – Print Working Directory 📂

This command shows the full path of the folder you are currently in.
Enter fullscreen mode Exit fullscreen mode

👉 This command is helpful when you get lost in multiple directories.


2) ls – List Files

This command lists the files and folders in your current location.
Enter fullscreen mode Exit fullscreen mode

These are other options to use:

  • ls -l → shows details (permissions, size, date).
  • ls -a → shows hidden files (those starting with a dot .).

3) cd – Change Directory

This command can be used to move into another folder.
Enter fullscreen mode Exit fullscreen mode

  • cd .. → go back one folder.
  • cd ~ → jump back to your home directory.

4) mkdir – Make Directory 📂

This command creates a new folder.
Enter fullscreen mode Exit fullscreen mode


5) touch – Create an Empty File

This command is a quick way to create new files in linux.
Enter fullscreen mode Exit fullscreen mode


6) cp – Copy Files and Directories

 This command copies files/folders from one place to another.
Enter fullscreen mode Exit fullscreen mode


7) mv – Move or Rename Files

 This command is used to move or rename files/folders.
Enter fullscreen mode Exit fullscreen mode

Rename example:


8) 8. rm – Remove Files

 This command deletes files/folders. ⚠️ Careful—there’s no recycle bin!
Enter fullscreen mode Exit fullscreen mode

Once you delete a file in linux, it’s gone permanently unlike windows/mac. There’s no built-in "trash" the system doesn’t move it anywhere, it just erases the reference to it immediately.

Delete folders:


9) cat – View File Content

 This command displays text inside a file.
Enter fullscreen mode Exit fullscreen mode


10) man – Manual Pages

  This command shows help and documentation for any command.
Enter fullscreen mode Exit fullscreen mode

Press q to quit the manual.


📌 In Summary

These 10 beginner-friendly Linux commands are the foundation of working in the terminal. Once you’re comfortable with them, you can explore more advanced topics like file permissions, system processes, and package management.

Make sure you practice daily. The more you type these commands, the faster you know how to use them better.

Top comments (0)