Show Menu

Linux Commands Cheat Sheet (DRAFT) by

What Is a Linux Command? A Linux command is a program or utility that runs on the command line. A command line is an interface that accepts lines of text and processes them into instructions for your computer. Any graphical user interface (GUI) is just an abstraction of command-line programs.28-Feb-2023

This is a draft cheat sheet. It is a work in progress and is not finished yet.

Linux Commands

File and Directory Operations
ls: List files in the current directory.
cd <di­rec­tor­y_n­ame>: Change to a different directory.
mkdir <di­rec­tor­y_n­ame>: Create a new directory.
rm <fi­le_­nam­e>: Remove a file.
rmdir <di­rec­tor­y_n­ame>: Remove an empty directory.

Linux Commands :

Text Manipu­lation
cat <fi­le_­nam­e>: View the contents of a file.
grep <se­arc­h_t­erm> <fi­le_­nam­e>: Search for a specific string in a file.
sed 's/<ol­d_s­tri­ng>­/<n­ew_­str­ing­>/g' <fi­le_­nam­e>: Replace all occurr­ences of a string in a file.

Linux Commands :

System Inform­ation and Management
top: View system processes and resource usage.
ps: List running processes.
kill <pr­oce­ss_­id>: Kill a running process.
df: View disk usage inform­ation.

Linux Commands :

Network and Internet
ping <we­bsi­te_­url>: Check network connec­tivity to a website.
ifconfig: View network interface config­ura­tion.
netstat: View network connec­tions and open ports.
wget <fi­le_­url>: Download a file from the internet