Fundamentals 10 min read

Master the 29 Essential Linux Commands Every Beginner Needs

This guide introduces 29 fundamental Linux command‑line tools—from navigating directories with ls and cd to managing processes with ps and top—providing clear descriptions and examples so newcomers can efficiently perform common tasks across any Linux distribution.

MaGe Linux Operations
MaGe Linux Operations
MaGe Linux Operations
Master the 29 Essential Linux Commands Every Beginner Needs

Although Linux distributions support many graphical user interfaces, the command‑line interface (bash) remains simple and fast for many tasks. Commands are instructions that can shut down the computer, list files, display text, or show messages.

If you are a beginner, we have collected basic Linux commands useful across distributions.

1. ls – List

ls lists the contents of the current working directory (files and folders), similar to opening a folder in a GUI.

2. mkdir – Make Directory

mkdir <new-directory-name> creates a new directory.

3. pwd – Print Working Directory

pwd displays the current working directory.

4. cd – Change Directory

cd <directory> sets the given folder as the current working directory.

5. rmdir – Remove Directory

rmdir <directory-name> deletes the specified directory.

6. rm – Remove

rm <file-name> deletes a file or folder; rm -r <directory-name> removes a directory recursively.

7. cp – Copy

cp <source-file> <destination-file> copies a file; cp -r copies directories recursively.

8. mv – Move

mv <source> <destination> moves or renames files and folders.

9. cat – Concatenate and Print Files

cat <file> displays the contents of a file on the standard output.

10. tail – Print Last Lines

tail <file-name> shows the last 10 lines of a file; tail -n N shows the last N lines.

11. less – View File Page by Page

less <file-name> displays a file one screen at a time, useful for large text files; navigation keys such as Ctrl+F and Ctrl+B move forward and backward.

12. grep – Search Text

grep "<string>" <file-name> searches for a string in a file; -i ignores case; -r searches recursively.

13. find – Locate Files

find <folder-to-search> -name <file-name> searches case‑sensitively; -iname searches case‑insensitively.

Example: find <folder-to-search> -iname <file-name>

14. tar – Archive Files

tar creates, lists, and extracts tar archives. Examples: tar -cvf <archive-name.tar> <files> (create), tar -tvf <archive.tar> (list), tar -xvf <archive.tar> (extract).

15. gzip – Compress Files

gzip <filename> compresses a file; gzip -d <filename> decompresses it.

16. unzip – Extract ZIP Archives

unzip <archive.zip> extracts a zip file; unzip -l <archive.zip> lists its contents.

17. help – Command Help

<command-name> --help or -h displays usage information for a command.

18. whatis – One‑Line Description

whatis <command-name> shows a brief description of the command.

19. man – Manual Pages

man <command-name> displays the manual page for a command.

20. exit – End Session

exit terminates the current terminal session.

21. ping – Test Network Connectivity

ping <remote-host-address> sends packets to a remote host to check network connectivity and server status.

22. who – Show Logged‑In Users

who lists the usernames of currently logged‑in users.

23. su – Switch User

su <username> switches to another user account; the superuser can switch without a password.

24. uname – System Information

uname displays system information such as kernel name, hostname, kernel version, and hardware type; uname -a shows all details.

25. free – Memory Usage

free shows free, used, and swap memory; free -m displays values in MB, free -g in GB.

26. df – Disk Space

df reports disk usage for file systems; df -h presents the output in a human‑readable format.

27. ps – Process Status

ps lists the processes currently running on the system.

28. top – Real‑Time Process Monitor

top displays processes sorted by CPU usage; top -u <username> shows processes for a specific user.

29. shutdown – Power Off or Reboot

shutdown powers off the computer; shutdown -r reboots it.

Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

LinuxShellcommand-lineSystem Administrationbasics
MaGe Linux Operations
Written by

MaGe Linux Operations

Founded in 2009, MaGe Education is a top Chinese high‑end IT training brand. Its graduates earn 12K+ RMB salaries, and the school has trained tens of thousands of students. It offers high‑pay courses in Linux cloud operations, Python full‑stack, automation, data analysis, AI, and Go high‑concurrency architecture. Thanks to quality courses and a solid reputation, it has talent partnerships with numerous internet firms.

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.