30 Basic Linux Commands for Beginners (With Simple Examples)

Learning Linux for the first time can feel overwhelming — dozens of commands, strange symbols, and a terminal window that looks intimidating. But once you start using it, you’ll see that Linux is extremely powerful, and even a handful of basic commands can help you feel more confident and in control of your system.

In this beginner-friendly guide, you’ll learn 30 of the most essential Linux commands with simple explanations and examples to help you understand exactly how they work.


What Is a Linux Command?

A Linux command is an instruction typed into the terminal to tell the operating system what to do. Whether you want to view files, navigate folders, install software, or manage users, everything can be done through commands.


Why Beginners Should Learn Linux Terminal Commands

You don’t need to memorize hundreds of commands. Even learning just 30 important ones can make you productive. These commands help you:

  • Navigate the file system comfortably
  • Manage files and directories
  • Check system information
  • Work faster than using a GUI
  • Troubleshoot system issues

30 Basic Linux Commands Every Beginner Should Know

1. pwd – Print Working Directory

Shows the folder you are currently in.

pwd

2. ls – List Files

Displays files and directories in the current location.

ls

3. cd – Change Directory

Moves you to another directory.

cd /home/user/Documents

4. clear – Clear Terminal

Cleans up your screen for better readability.

clear

5. mkdir – Make Directory

Creates a new folder.

mkdir projects

6. rmdir – Remove Directory

Deletes an empty folder.

rmdir old_folder

7. touch – Create a Blank File

Creates an empty file.

touch file.txt

8. cp – Copy Files or Folders

Copies a file to another location.

cp file.txt backup/

9. mv – Move or Rename File

Moves or renames a file.

mv file.txt folder/

10. rm – Remove File

Deletes a file.

rm file.txt

11. cat – View File Contents

Displays the entire content of a file.

cat notes.txt

12. nano – Edit Files

Opens a file in a simple text editor.

nano notes.txt

13. less – Scroll Through File

Lets you view large files page by page.

less bigfile.log

14. head – Show First 10 Lines

Displays the top part of a file.

head file.txt

15. tail – Show Last 10 Lines

Displays the bottom part of a file.

tail file.txt

16. grep – Search Inside Files

Searches for specific words or phrases.

grep "error" log.tx

17. find – Locate Files

Finds a file by name.

find / -name file.txt

18. whoami – Show Current User

Shows the username that is logged in.

whoami - Linux command
whoami

19. uname – System Information

Displays system info.

uname -a Linux command output
uname -a

20. df – Disk Space Usage

Shows available disk space.

df -h

21. du – Folder Size

Displays the size of files and directories.

du -h foldername

22. top – Monitor System Processes

Shows running processes in real time.

top

If you want a nicer interface like below. Use this command:

Linux htop interface
htop

If you don’t have htop installed, use this command to install it:

sudo apt install htop

23. ps – View Active Processes

Displays current processes.

ps aux

If you’re looking for a specific program so you can use the command from point 24, just use this command to find out the PID of the program you want to end:

ps aux | grep "name of the program"

24. kill – Stop a Process

Ends a program using its process ID (PID).

kill 1234

25. history – View Command History

Shows previously used commands.

history

26. chmod – Change File Permissions

Updates read/write permissions.

chmod 755 script.sh

27. chown – Change File Owner

Changes file ownership.

chown user:user file.txt

28. apt-get or yum – Install Packages

Used to install or update software.

Apt-get:

sudo apt-get update
sudo apt-get install package-name

Yum:

yum update
yum install package-name

29. man – Manual Pages

Displays help documentation for commands.

man ls

30. exit – Close Terminal

Closes the terminal session.

exit

Tips for Mastering Linux Faster

  • Practice using commands daily
  • Use man for help whenever needed
  • Combine commands with pipes (|) later as you advance
  • Don’t worry about making mistakes — the terminal is your best learning tool

Final Thoughts

Learning Linux doesn’t have to be difficult. With these 30 basic commands, you now have the foundation to navigate your system easily and perform essential tasks without fear. As you grow more comfortable, you’ll discover more advanced commands and shortcuts that help you work even faster and smarter.

The key is practice — the more you use them, the more natural they feel.

Stay in the Loop

Get the daily email from ScoHostings that makes reading the news actually enjoyable. Join our mailing list to stay in the loop to stay informed, for free.

Latest stories

You might also like...