Back to Learning Tools

🧾 ALL-IN-ONE LINUX COMMAND LIST

सभी Important Linux Commands के Examples के साथ

📂 Directory Commands

Folders और Directories में Navigate करें

$pwd# Current directory path दिखाए
$ls# Files/folders list करें
$ls -la# Hidden files के साथ detailed list
$cd folder# Specific folder में जाएं
$cd ..# Parent directory में वापस जाएं
$cd ~# Home directory में जाएं

📁 File Management

Files Create, Delete, Copy, Move करें

$touch file.txt# New empty file बनाएं
$mkdir folder# New folder बनाएं
$rm file.txt# File delete करें
$rm -rf folder# Folder और उसकी contents delete (⚠️ Be Careful!)
$cp file1 file2# File copy करें
$mv file1 file2# File rename/move करें

📖 File Viewing & Editing

File का Content देखें और Edit करें

$cat file.txt# File content दिखाए
$nano file.txt# Nano editor में open करें
$less file.txt# Scrollable view में content देखें
$head file.txt# File के पहले 10 lines दिखाएं
$tail file.txt# File के आखिरी 10 lines दिखाएं

📦 Package Management (Termux / Linux)

Software packages install/uninstall करें

$apt update# Package list update करें
$apt upgrade# All packages upgrade करें
$apt install package# New package install करें
$apt remove package# Package uninstall करें
$apt search package# Package search करें

⚙️ System Commands

System की जानकारी प्राप्त करें

$clear# Terminal screen clear करें
$whoami# Current user name दिखाए
$uname -a# System info दिखाए
$top# Running processes दिखाए (real-time)
$history# Command history दिखाए

🌐 Network Commands

Network और Internet संबंधित कमांड्स

$ping google.com# Internet connection test करें
$ifconfig# Network interface info दिखाए
$ip a# IP address info दिखाए
$netstat -tulnp# Open ports और connections दिखाए
$ss -tulnp# Socket statistics दिखाए (modern)

🔐 Permissions & Ownership

File permissions और ownership manage करें

$chmod 777 file# Full permissions (Read+Write+Execute)
$chmod +x file.sh# Execute permission दें
$chown user file# File owner change करें
$ls -l# File permissions detail में देखें

📋 Permission Codes:

4 = Read
2 = Write
1 = Execute
7 = Read+Write+Execute

🔍 Search Commands

Files और Text search करें

$find . -name file.txt# Current directory में file search करें
$grep "text" file.txt# File में specific text search करें
$grep -r "pattern" .# Recursive search in all files

📊 Process Management

Running processes को control करें

$ps aux# सभी running processes दिखाएं
$kill PID# Process को gracefully stop करें
$kill -9 PID# Process को forcefully kill करें

💾 Disk & Storage

Disk space और storage info देखें

$df -h# Disk space (human-readable format)
$du -sh folder# Folder size देखें
$du -sh *# सभी items की size देखें

📦 Compression (ZIP / TAR)

Files compress और decompress करें

$tar -cvf file.tar folder# Folder को tar archive में बनाएं
$tar -xvf file.tar# Tar archive extract करें
$zip file.zip file# File को zip करें
$unzip file.zip# Zip file extract करें

⬇️ Download Commands

Internet से files download करें

$wget URL# File download करें
$curl -O URL# URL से file download करें
$curl url# URL content दिखाए

👤 User Management

User accounts manage करें

$adduser name# New user add करें
$passwd name# User password change करें
$who# Logged-in users देखें

🔁 Pipes & Redirection

Commands को combine और output redirect करें

$ls | grep ".txt"# List में .txt files filter करें
$echo "Hello" > file.txt# File में text overwrite करें
$echo "Hi" >>> file.txt# File में text append करें
$cat file.txt | sort# File content sort करें

⏰ Automation (Cron Job)

Scheduled tasks setup करें

$crontab -e# Edit cron jobs

Example:

$* * * * * echo "Hello" >>> log.txt

# Har minute "Hello" log.txt में लिखेगा

🔑 Remote Access (SSH)

Remote systems से connect करें

$ssh user@ip# Remote system connect करें
$ssh -p 22 user@ip# Specific port के साथ connect

🌍 Environment Variables

System environment variables manage करें

$echo $PATH# PATH variable देखें
$export VAR=value# Environment variable set करें
$env# सभी environment variables देखें

⚡ Shortcuts

Useful keyboard shortcuts

CTRL + C# Running command stop करें
CTRL + Z# Process background में भेजें
TAB# Auto-complete command/filename
CTRL + L# Screen clear (same as clear)
CTRL + A# Cursor को line start पर ले जाएं
CTRL + E# Cursor को line end पर ले जाएं

🔥 Final Tips

Linux mastery के लिए ये टिप्स follow करें

  • 👉ये list = Linux का foundation + power combo
  • 👉रोज 15–20 commands practice करो
  • 👉खुद errors solve करो = fastest learning
  • 👉man command से manual देखें
  • 👉command --help से help प्राप्त करें
  • 👉History में Ctrl+R से commands search करें