Essential Linux Commands Cheat Sheet for Beginners

Essential Linux Commands Cheat Sheet for Beginners
09/05/2025 •

📘 Introduction – Essential Linux Commands Cheat Sheet

Linux is a powerful, open-source operating system widely used in servers, development environments, cloud infrastructure, cybersecurity, and more. Mastering basic Linux commands is essential for system administrators, developers, and IT professionals to manage files, processes, networks, and user permissions efficiently.

Essential Linux Commands Cheat Sheet for Beginners

This cheat sheet provides a concise reference to essential Linux commands, grouped by functionality such as file management, networking, process control, and system monitoring. Whether you’re a beginner learning the command line or a professional needing a quick refresher, this guide aims to boost your productivity and command-line confidence.

Here’s a list of basic and important Linux operating system commands along with their uses. These are essential for beginners and system administrators alike:


🔹 1. File and Directory Management

CommandUse
lsLists files and directories in the current directory.
cdChanges the current directory.
pwdPrints the current working directory.
mkdirCreates a new directory.
rmdirRemoves an empty directory.
rmRemoves files or directories (-r for recursive).
cpCopies files or directories.
mvMoves or renames files or directories.
touchCreates a new empty file.
findSearches for files and directories.
treeShows directory structure in a tree format (install needed).

🔹 2. File Viewing and Editing

CommandUse
catDisplays the content of a file.
less / moreViews file content one page at a time.
headShows the first 10 lines of a file.
tailShows the last 10 lines (use -f to follow a live log).
nanoOpens a simple text editor.
vi or vimOpens the powerful VI/Vim editor.

🔹 3. File Permissions and Ownership

CommandUse
chmodChanges file permissions.
chownChanges file ownership.
ls -lLists files with permissions and ownership.
umaskDisplays or sets default permission mask.

🔹 4. Process Management

CommandUse
psLists running processes.
topDisplays real-time processes.
htopInteractive version of top (install needed).
killSends a signal to a process (default: terminate).
killallKills processes by name.
nice / reniceSets process priority.

🔹 5. Package Management

• Debian/Ubuntu (apt):

CommandUse
apt updateUpdates the package list.
apt upgradeInstalls available updates.
apt install <pkg>      Installs a package.
apt remove <pkg>   Removes a package.

• RHEL/CentOS (yum or dnf):

CommandUse
yum install <pkg>Installs a package.
yum remove <pkg> Removes a package.

🔹 6. Networking

CommandUse
ip a or ifconfigShows network interfaces.
ping <host>Checks connectivity.
netstat -tulnpLists listening ports (may need net-tools).
ss -tulnModern alternative to netstat.
curl <url>Transfers data from/to a server.
wget <url>Downloads files from the web.
nslookup / digDNS lookup tools.

🔹 7. Disk and Storage

CommandUse
df -hShows disk space usage.
du -sh <dir>Shows disk usage of a directory.
mount / umountMounts or unmounts devices.
lsblkLists block devices.
fdisk -lLists partition tables.

🔹 8. User Management

CommandUse
adduser / useraddAdds a new user.
passwdChanges user password.
usermodModifies user info.
deluser / userdelDeletes a user.
groupsShows groups of a user.

🔹 9. System Monitoring

CommandUse
uptimeShows how long the system has been running.
free -hShows memory usage.
vmstatReports system performance.
iostatCPU and I/O stats (needs sysstat package).
dmesgShows system boot and kernel messages.
journalctlViews system logs on systemd systems.

🔹 10. Miscellaneous

CommandUse
man <command>Shows manual/help for a command.
historyShows command history.
aliasCreates shortcut commands.
clearClears the terminal screen.
echoPrints messages to the screen.
dateDisplays current date/time.
whoamiShows current user.
uname -aDisplays system information.

🧾 Summary

This document includes:

  • File and Directory Management: Commands to navigate, create, copy, move, and delete files and folders.
  • File Viewing and Editing: Tools to read or edit file content.
  • Permissions and Ownership: Managing access rights for files and users.
  • Process Management: Viewing and controlling system processes.
  • Package Management: Installing and removing software using package managers like apt and yum.
  • Networking Commands: Checking connectivity, downloading data, and troubleshooting networks.
  • Disk and Storage: Monitoring disk usage and managing devices.
  • User Management: Adding, modifying, or deleting users and groups.
  • System Monitoring: Commands for viewing system resource usage and logs.
  • Miscellaneous Tools: Useful utilities like man, alias, history, and system info tools.

This guide serves as a quick reference for day-to-day Linux operations and helps build a strong foundation in system usage and administration.


https://ubuntu.com

https://sanchitgurukul.com/basic-networking

https://sanchitgurukul.com/network-security

Essential Linux Commands Cheat Sheet for Beginners

This article provided insights on the topic. For latest updates and detailed guides, stay connected with Sanchit Gurukul.

Disclaimer: This article may contain information that was accurate at the time of writing but could be outdated now. Please verify details with the latest vendor advisories or contact us at admin@sanchitgurukul.com.

Discover more from

Subscribe now to keep reading and get access to the full archive.

Continue reading