Linux

100 Essential Linux Commands Every Beginner Should Know

📅 August 2026 • ⏱ 8 min read

Introduction

Linux is one of the most powerful operating systems used by developers, system administrators, cloud engineers, and cybersecurity professionals. Learning basic Linux commands is the first step toward mastering Linux.

Essential Linux Commands

  • pwd – Show the current working directory.
  • ls – List files and directories.
  • ls -l – Display files with detailed information.
  • ls -la – List all files, including hidden files.
  • cd – Change the current directory.
  • cd .. – Move to the parent directory.
  • cd ~ – Move to the home directory.
  • mkdir – Create a new directory.
  • mkdir -p – Create nested directories.
  • rmdir – Remove an empty directory.
  • touch – Create an empty file.
  • cp – Copy files or directories.
  • cp -r – Copy directories recursively.
  • mv – Move or rename files.
  • rm – Delete files.
  • rm -r – Remove directories recursively.
  • file – Identify the type of a file.
  • stat – Display detailed file information.
  • find – Locate files and directories.
  • locate – Quickly search for files.
  • cat – Display file contents.
  • less – Read large files page by page.
  • more – Display file contents page by page.
  • head – Show the beginning of a file.
  • tail – Show the end of a file.
  • tail -f – Monitor a file as it changes.
  • grep – Search for text in files.
  • grep -r – Search text recursively.
  • sort – Sort lines of text.
  • uniq – Remove consecutive duplicate lines.
  • wc – Count lines, words, and characters.
  • cut – Extract sections from lines.
  • tr – Translate or replace characters.
  • sed – Search and modify text streams.
  • awk – Process and analyze text.
  • diff – Compare two files.
  • tee – Write output to a file and terminal.
  • echo – Display text or variables.
  • nano – Edit text files in the terminal.
  • vim – Advanced terminal text editor.
  • whoami – Show the current username.
  • id – Display user and group information.
  • who – Show currently logged-in users.
  • w – Show logged-in users and their activity.
  • passwd – Change a user's password.
  • su – Switch to another user.
  • sudo – Execute commands with elevated privileges.
  • chmod – Change file permissions.
  • chown – Change file ownership.
  • chgrp – Change the group ownership of a file.
  • df -h – Show disk usage in human-readable format.
  • du -sh – Show the size of a directory.
  • lsblk – List block storage devices.
  • mount – Mount a filesystem.
  • umount – Unmount a filesystem.
  • fdisk – Manage disk partitions.
  • blkid – Display block device information.
  • sync – Flush filesystem buffers.
  • dd – Copy and convert raw data.
  • du – Estimate file and directory space usage.
  • ps – Display running processes.
  • ps aux – Display detailed process information.
  • top – Monitor running processes in real time.
  • htop – Interactive process monitor.
  • kill – Terminate a process by its PID.
  • killall – Terminate processes by name.
  • pkill – Terminate processes using a pattern.
  • jobs – Display active shell jobs.
  • bg – Resume a stopped job in the background.
  • fg – Bring a background job to the foreground.
  • free -h – Show memory usage.
  • uptime – Show system uptime and load.
  • uname -a – Display system and kernel information.
  • hostname – Display the system hostname.
  • date – Display the current date and time.
  • dmesg – Display kernel messages.
  • systemctl – Manage system services.
  • journalctl – View system logs.
  • reboot – Restart the system.
  • shutdown – Shut down the system.
  • ip – Display and manage network configuration.
  • ping – Test network connectivity.
  • curl – Transfer data from or to a URL.
  • wget – Download files from the internet.
  • ssh – Connect securely to a remote system.
  • scp – Securely copy files between systems.
  • sftp – Transfer files securely using SSH.
  • ss – Display network connections and sockets.
  • dig – Query DNS information.
  • nslookup – Look up DNS information.
  • apt – Manage packages on Debian-based systems.
  • apt update – Update package information.
  • apt upgrade – Upgrade installed packages.
  • dnf – Manage packages on Fedora-based systems.
  • pacman – Manage packages on Arch Linux.
  • tar – Create or extract archive files.
  • gzip – Compress files.
  • gunzip – Decompress gzip files.
  • zip – Create ZIP archives.
  • unzip – Extract ZIP archives.
  • history – Display previously executed commands.
  • man – Display the manual for a command.
  • clear – Clear the terminal screen.
  • alias – Create shortcuts for commands.
  • env – Display environment variables.
  • export – Set environment variables.
  • which – Show the location of a command.
  • whereis – Locate binary, source, and manual files.
  • help – Display help for shell built-in commands.
  • exit – Exit the current shell session.

Examples


mkdir MyProject
cd MyProject
touch index.html
ls
pwd

Basic File Management Example


mkdir LinuxProject
cd LinuxProject
touch file.txt
echo "Hello Linux" > file.txt
cat file.txt
cp file.txt backup.txt
mv backup.txt backup-file.txt
ls -l

Searching and Filtering Example


grep "Linux" file.txt
find . -name "*.txt"
cat file.txt | grep "Linux"

System Information Example


whoami
uname -a
hostname
uptime
free -h
df -h

Conclusion

These 100 Linux commands form a strong foundation for Linux administration, development, system troubleshooting, networking, and server management. Practice them regularly and use man command to learn more about any command and its available options.

Safety note: Be careful with commands such as rm -r, dd, fdisk, chmod, chown, and system shutdown or reboot commands. Incorrect usage can result in data loss or system unavailability.

← Back to Blog