10 Essential Linux Commands banner showing practical server commands

10 Essential Linux Commands Every Beginner Should Know

If you are getting started with Linux, you do not need to memorise hundreds of commands on day one. A small set of practical commands will take you surprisingly far, especially if you work with websites, servers or logs.

This guide covers 10 essential Linux commands that are useful for day to day work, troubleshooting and learning the command line with confidence.

lsgrepfindtaildudfcurl
Quick answer: if you only learn a handful of commands first, start with pwd, ls, cd, grep, find, tail, du, df, chmod and curl.

Why these commands matter

These commands help you answer very practical questions:

  • Where am I in the filesystem?
  • What files are here?
  • How do I move to another folder?
  • How do I find a file?
  • How do I search logs for errors?
  • How do I check disk usage?
  • How do I view live log updates?
  • How do I test a website response from the command line?

If that sounds useful, you are already thinking like someone who will get along nicely with Linux.

1. pwd

pwd stands for print working directory. It tells you your current location in the filesystem.

pwd

Example output:

/home/user/public_html

2. ls

ls lists files and directories. Add -l for detailed output and -a to include hidden files.

ls
ls -l
ls -la

This is one of the first commands you will use constantly.

3. cd

cd changes directory. It lets you move around the filesystem.

cd /var/log
cd ..
cd ~

Use cd .. to go up one level and cd ~ to go back to your home directory.

4. grep

grep searches for text inside files or command output. It is extremely useful for logs, configs and troubleshooting.

grep -i "error" app.log
grep -Ei "error|warning|failed|fatal" app.log
Example output showing grep searching a log for errors and warnings
grep is one of the most useful commands for turning large logs into useful results.

Related: Grep Command Builder, Grep Cheat Sheet, Advanced Grep Techniques.

5. find

find searches the filesystem for files and directories. It is excellent for locating logs, backups, configuration files or recently modified files.

find /var/log -type f -name "*.log"
find . -type f -mtime -1
Example output showing the Linux find command locating log files
Use find when you know roughly what you want, but not exactly where it lives.

Related: Find Command Builder, Find Cheat Sheet.

6. tail

tail shows the end of a file. With -f, it follows updates in real time.

tail -100 error_log
tail -f /usr/local/apache/logs/error_log

This is especially useful for watching logs while reproducing an issue in the browser.

7. du

du shows disk usage for files and directories.

du -sh .
du -sh *
du -h --max-depth=1

Use it to find which folders are using the most space.

8. df

df shows filesystem usage. Add -h for human readable output.

df -h
Example output showing df -h disk usage information
df is one of the fastest ways to check whether a server is running out of space.

Use df for the overview and du for the deeper investigation.

9. chmod

chmod changes file permissions. This is important when working with scripts, uploads or web files.

chmod 644 file.txt
chmod 755 script.sh

Common examples:

  • 644 for regular files
  • 755 for directories and executable scripts

Related: Permissions Cheat Sheet, Permissions Quiz.

10. curl

curl lets you make web requests from the command line. It is very useful for checking headers, testing status codes and troubleshooting websites.

curl -I https://example.com
curl -o /dev/null -s -w "%{http_code}\n" https://example.com

This is useful when you want to confirm whether a site is returning 200, 301, 403 or 500 without opening a browser.

Which commands should you learn first?

GoalBest commands
Move around Linuxpwd, ls, cd
Search files and logsgrep, find, tail
Check disk spacedf, du
Work with permissionschmod
Test websitescurl

Beginner mistakes to avoid

  • Typing commands without checking the path: use pwd and ls first.
  • Forgetting quotes around patterns: especially with find and grep.
  • Mixing up du and df: one shows filesystem totals, the other shows folder usage.
  • Changing permissions randomly: understand what 644 and 755 mean before using chmod.
  • Ignoring real time logs: tail -f can save a lot of time.

FAQ

What are the most important Linux commands for beginners?

Good starting commands include pwd, ls, cd, grep, find, tail, du, df, chmod and curl.

What is the difference between du and df?

df shows filesystem usage, while du shows disk usage for specific folders and files.

Which Linux command is best for searching logs?

grep is usually the first choice for log searches. tail -f is useful for watching logs live.

Which command helps find files in Linux?

find is the most flexible and useful file search command in Linux.

Practice workflow

Practice these commands in a safe folder

Create a small practice directory so you can try commands without touching important files.

mkdir ~/linux-practice
cd ~/linux-practice
touch notes.txt app.log error.log
mkdir logs backups
ls -lah
find . -type f
grep -R "error" .
Example output:
./notes.txt
./app.log
./error.log

When you are ready, test yourself with the Linux quizzes or browse cheat sheets.

FAQ

Frequently Asked Questions

What Linux command should beginners learn first?

Start with pwd, ls, cd, mkdir, cp, mv, rm, cat, grep and find.

How can I practise Linux commands safely?

Use a dedicated practice directory with test files rather than experimenting in important system folders.

What command shows where I am in Linux?

pwd prints the current working directory.

What command searches text in files?

grep searches for text patterns inside files.

$ practise_next --topic grep

Practise this next

Turn the guide into practice with a related quiz, builder, cheat sheet or learning path.