惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

AI
AI
小众软件
小众软件
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
月光博客
月光博客
云风的 BLOG
云风的 BLOG
Recorded Future
Recorded Future
Apple Machine Learning Research
Apple Machine Learning Research
F
Fortinet All Blogs
罗磊的独立博客
爱范儿
爱范儿
GbyAI
GbyAI
Stack Overflow Blog
Stack Overflow Blog
MongoDB | Blog
MongoDB | Blog
D
Docker
C
CXSECURITY Database RSS Feed - CXSecurity.com
Spread Privacy
Spread Privacy
Recent Announcements
Recent Announcements
酷 壳 – CoolShell
酷 壳 – CoolShell
G
GRAHAM CLULEY
A
About on SuperTechFans
C
Cisco Blogs
The Register - Security
The Register - Security
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
B
Blog
Project Zero
Project Zero
V
V2EX
K
Kaspersky official blog
P
Privacy International News Feed
博客园 - 叶小钗
I
Intezer
T
Threatpost
The GitHub Blog
The GitHub Blog
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
V
Vulnerabilities – Threatpost
D
Darknet – Hacking Tools, Hacker News & Cyber Security
C
Cybersecurity and Infrastructure Security Agency CISA
Cyberwarzone
Cyberwarzone
Microsoft Azure Blog
Microsoft Azure Blog
N
Netflix TechBlog - Medium
Application and Cybersecurity Blog
Application and Cybersecurity Blog
博客园 - 【当耐特】
P
Proofpoint News Feed
L
Lohrmann on Cybersecurity
S
Schneier on Security
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
F
Full Disclosure
The Cloudflare Blog
P
Palo Alto Networks Blog
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
T
Tenable Blog

DEV Community

Authentication Security Deep Dive: From Brute Force to Salted Hashing (With Java Examples) Why AI Systems Don’t Fail — They Drift Spilling beans for how i learn for exam😁"Reinforcement Learning Cheat Sheet" I Replaced Chrome with Safari for AI Browser Automation. Here's What Broke (and What Finally Worked) How Python Borrows Other People's Work The $40 Architecture: Processing 1 Billion API Requests with 99.99% Uptime Vibe Coding: A Workflow Guide (From Zero to SaaS) Most webhook security guides protect the wrong side. The scary part is delivery. Headless CMS for TanStack Start: Build a Blog with Cosmic EU Age Verification App "Hacked in 2 Minutes" — What Actually Happened Comfy Cloud’s delete function does not actually remove files Running AI Models on GPU Cloud Servers: A Beginner Guide Event-driven media intelligence with AWS Step Functions and Bedrock I scored 500 AI prompts across 8 quality dimensions — here's what broke How to Call Google Gemini API from Next.js (Free Tier, No Backend Needed) The Portal Protocol: Reclaiming Human Connection in the Age of AI How to Fix Your Team's Scattered Knowledge Problem With a Self-Hosted Forum Intro to tc Cloud Functors: A Graph-First Mental Model for the Modern Cloud Designing Multi-Tenant Backends With Both Ownership and Team Access I Built a Neumorphic CSS Library with 77+ Components — Here's What I Learned PostgreSQL Performance Optimization: Why Connection Pooling Is Critical at Scale Cómo construí un SaaS multi-rubro para gestionar expensas en Argentina con FastAPI + Vue 3 🚀 I Built an Ethical Hacking Scanner Tool – Open Source Project I Replaced /usage and /context in Claude Code With a Single Statusline A Pythonic Way to Handle Emails (IMAP/SMTP) with Auto-Discovery and AI-Ready Design I Collected 8.9 Million Polymarket Price Points — Here's What I Found About How Markets Really Move EcoTrack AI — Carbon Footprint Tracker & Dashboard Everyone's Using AI. No One Agrees How. 5 self-hosted ebook managers worth trying in 2026 Building Your First AI Agent with LangChain: From Chatbot to Autonomous Assistant Common SOC 2 Failures (Real World) Stop Vibe-Checking Your AI App: A Practical Guide to Evals How to Use SonarQube and SonarScanner Locally to Level Up Your Code Quality Your Next To-Do App Is Dead — I Replaced Mine with an OpenClaw AI Sign a Nostr event in 60 lines of Python using coincurve — no nostr-sdk, no nbxplorer, no rust toolchain ITGC Audit Explained Like You’re in Big 4 Patch Tuesday abril 2026: Microsoft parcha 163 vulnerabilidades y un zero-day en SharePoint Stop scraping everything: a better way to track competitor price changes Listing on MCPize + the Official MCP Registry while routing payments OUTSIDE the marketplace — how I kept 100% of my x402 revenue Building an AI-Powered Risk Intelligence System Using Serverless Architecture Why We Ripped Function Overloading Out of Our AI Toolchain Testing AI-Generated Code: How to Actually Know If It Works SaaS Churn Is Killing Your Business. Here Is What to Do About It (Without a Support Team) The Speed of AI Is No Longer Linear - And Self-Improving Models Are Why How to Implement RBAC for MCP Tools: A Practical Guide for Engineering Teams From Standard Quote to Persuasive Proposal: AI Automation for Arborists I built a CLI that scaffolds complete multi-tenant SaaS apps Axios CVE-2025–62718: The Silent SSRF Bug That Could Be Hiding in Your Node.js App Right Now The dashboard that ended our friendship Data Pipelines Explained Simply (and How to Build Them with Python) The Hidden Cost of AI Systems Nobody Talks About. undefined vs undeclared, and how typeof behaves Switching from file-based jobs to NATS/Kafka in Rust without changing code io_uring Adventures: Rust Servers That Love Syscalls Why Agentic AI is Killing the Traditional Database The POUR principles of web accessibility for developers and designers Quantum Neural Network 3D — A Deep Dive into Interactive WebGL Visualization How To Install Caveman In Codex On macOS And Windows Automation Pipeline Reliability: Why Your Workflow Breaks When Nobody Is Watching I Built an 'Open World' AI Coding Agent — It Works From ANY Folder From Freelancing to Product: A Tech Service Company's SaaS Transformation China's AI Giants: Adding Tencent Hunyuan & ByteDance Doubao to AI University (74 Providers) On the Vibe Coders and Their Lies clerk: Auto-Summarize Your Claude Code Sessions AI Weekly — 2026/04/10–04/17 | The Model Lockdown Is Here, but the Toolchain Is the Real Battleground AI 週報 — 2026/04/10–2026/04/17 模型封鎖潮來了,但工具鏈才是真戰場 Maybe this is how Open-Source apps are born... 🚀 Fine-Tune LLMs with LoRA and QLoRA: 2026 Guide tRPC v11 + Next.js App Router: End-to-End Type Safety Without the Boilerplate ShadCN UI in 2026: Why I Stopped Installing Component Libraries and Started Owning My Components SaaS Billing in React Server Components: Stripe + Supabase Without a Single `useEffect` Join our DEV Weekend Challenge — $1,000 in Prizes Across TEN winners! Submissions Due April 20 at 6:59 AM UTC. Implementing FSRS Spaced Repetition in Flutter + Supabase — Adding Memory Science to an AI Learning App "I Texted My Localhost From the Train — Claude Code Fixed the Bug Before I Got Home" I Built a Sales Prep AI and It Went Deeper Than Expected Design to Code #2: One JSON, Eleven Outputs Solving the 100M-Row Problem: A Summary Table Pattern for High-Volume Push Notification Logs Flutter Web With Wasm: What Actually Changes For Developers I Built 50 Royalty-Free Soundtracks for My Side Project in a Weekend Using AI Music Generation The Vibe Coding Security Checklist: 7 Things to Check Before You Ship Stop Letting Googlebot Guess Fix Your React App's SEO Right Desconstruindo o Streaming do LinkedIn: Como Criar um Engine de Extração de Vídeo de Alta Performance com HLS e FFmpeg (EDA Part-1) EDA (Exploratory Data Analysis) Explained With Real Life — Why Looking at Your Data Is the Most Important Step in Machine Learning Brand Relationship Management at Scale: Our 4-Touch Outreach System for 200+ Brands Why String.fromEnvironment() Might Return an Empty String in Dart JGuardrails 1.0.0 — Hardening Java LLM Apps Against Jailbreaks, Toxicity, and Prompt Injection Plan and Schedule a Full Week of Threads Content From One Claude Conversation Coding Cat Oran Ep3, Five Tables Changed Everything Updated: BFF Pattern I'm done watching freelancers get buried by 200 proposals. So I'm building the alternative. This is my first post BFS Algorithm in Java Step by Step Tutorial with Examples Tracking LLM Pricing Monthly: An Open Dataset for 22 AI Models How We Measure Content ROI on a Comparison Site: Revenue Attribution Without Perfect Data Introducing Nova AI Ops: The AI-Native Operating System for SRE Teams I built a free desktop video downloader for Windows — Grabbit How Talkie OCR Helps Vision-Impaired & Dyslexic Users Read the World Around Them VRCFaceTracking安装和iPhone面捕配置教程,有bug Even CrowdStrike Can't See Your Agents The Automation Gold Rush: What n8n Workflows and Claude Are Opening Up for Developers Right Now
20 Linux Commands Every CS Student Should Know
PRAKASH GANGURDE · 2026-06-20 · via DEV Community

The practical commands that actually matter — with real examples for each one


By Prakash Gangurde | BCA Student | Technical Content Creator | AI • Python • Linux


Introduction

When I first opened a Linux terminal, I stared at a blinking cursor and had absolutely no idea what to do.

No buttons. No menus. Just a black screen waiting for me to type something.

If that sounds familiar — this article is for you.

Linux is not just for hackers and system administrators. As a CS student, you will encounter Linux in web servers, cloud platforms, cybersecurity, data science, and software development. The sooner you get comfortable with the terminal, the faster everything else becomes.

This article covers 20 commands I actually use — not a textbook list of every possible flag, but the ones that solve real problems you will face as a student. Each command comes with a real example, not just a definition.

Estimated reading time: 15–18 minutes
Tested on Ubuntu 22.04 LTS. Most commands work identically on any Debian-based Linux system and macOS terminal.



Before We Start — The Terminal Basics

Opening the terminal:

  • Ubuntu/Linux: Press Ctrl + Alt + T
  • macOS: Search "Terminal" in Spotlight
  • Windows: Use WSL (Windows Subsystem for Linux) or install Ubuntu

Reading command syntax:
When you see something like command [option] <argument>, it means:

  • command — the actual command to type
  • [option] — optional flag (in square brackets)
  • <argument> — required input (in angle brackets)

One rule before everything else:

Linux is case-sensitive. File.txt, file.txt, and FILE.TXT are three different files.


Navigation Commands

1. pwd — Print Working Directory

What it does: Shows you exactly where you are in the file system.

pwd

Output:

/home/prakash/projects

When you use it: Any time you get lost and need to know your current location. Think of it as "where am I right now?"


2. ls — List Directory Contents

What it does: Shows all files and folders in the current directory.

ls

Output:

Desktop  Documents  Downloads  projects  README.md

The version you will actually use:

ls -la

Output:

drwxr-xr-x  5 prakash prakash 4096 Jun 10 10:30 .
drwxr-xr-x 18 prakash prakash 4096 Jun  9 08:15 ..
-rw-r--r--  1 prakash prakash  220 Jun  9 08:15 .bash_logout
drwxr-xr-x  3 prakash prakash 4096 Jun 10 09:45 projects
-rw-r--r--  1 prakash prakash 1024 Jun 10 10:30 README.md

  • l gives you detailed info (permissions, size, date). a shows hidden files (files starting with .).

When you use it: Every single time you open a terminal.


3. cd — Change Directory

What it does: Moves you into a different folder.

cd projects          # go into the projects folder
cd ..                # go up one level
cd ~                 # go to your home directory from anywhere
cd /var/www/html     # go to an absolute path
cd -                 # go back to the previous directory

When you use it: Constantly. This is how you navigate your entire file system.


4. mkdir — Make Directory

What it does: Creates a new folder.

mkdir my-project              # create one folder
mkdir -p projects/python/day1 # create nested folders all at once

The -p flag is extremely useful — it creates all the parent folders if they don't exist yet.

When you use it: Every time you start a new project.


5. clear — Clear the Terminal Screen

What it does: Clears all the clutter from your terminal screen.

clear

Or just press Ctrl + L — same result, faster.

When you use it: When your terminal gets too messy to read.


File Operations

6. touch — Create an Empty File

What it does: Creates a new empty file instantly.

touch index.html
touch app.py
touch notes.txt

When you use it: Creating new files without opening an editor first.


7. cp — Copy Files and Folders

What it does: Copies a file or folder from one location to another.

cp app.py app_backup.py               # copy a file
cp -r projects/ projects_backup/      # copy an entire folder

The -r flag means "recursive" — required when copying folders.

When you use it: Before making big changes to a file — always keep a backup.


8. mv — Move or Rename Files

What it does: Moves a file to a new location OR renames it.

mv old_name.py new_name.py            # rename a file
mv app.py /home/prakash/projects/     # move a file to a different folder
mv folder1/ folder2/                  # rename a folder

When you use it: Organising files or renaming them without opening a file manager.


9. rm — Remove Files and Folders

What it does: Permanently deletes files or folders.

rm file.txt                  # delete a file
rm -r old_project/           # delete a folder and everything inside it

⚠️ Warning: Linux has no recycle bin. rm is permanent. Always double-check before running it. Never run rm -rf / — it deletes everything on the system.

When you use it: Cleaning up old files and project folders.


10. cat — Display File Contents

What it does: Prints the contents of a file directly in the terminal.

cat README.md
cat requirements.txt
cat /etc/hosts

When you use it: Quickly reading a small file without opening an editor. Also useful for checking config files.


 A  raw `cat` endraw  command reading a file.


Search and Find

11. grep — Search Inside Files

What it does: Searches for a specific word or pattern inside files.

grep "import" app.py                  # find all lines with "import" in app.py
grep -r "password" .                  # search for "password" in all files recursively
grep -n "def " app.py                 # show line numbers where "def " appears
grep -i "error" log.txt               # case-insensitive search

When you use it: Finding which file contains a specific function, variable, or text. I use grep -r almost every day when working on projects.


12. find — Find Files by Name

What it does: Searches for files and folders by name, type, or size.

find . -name "app.py"                 # find a file named app.py
find . -name "*.txt"                  # find all .txt files
find . -type d -name "node_modules"   # find all folders named node_modules
find /home -name "*.py" -size +1M     # find Python files larger than 1MB

When you use it: When you know a file exists but can't remember where you put it.


Permissions

13. chmod — Change File Permissions

What it does: Controls who can read, write, or execute a file.

chmod 755 script.py        # owner can read/write/execute, others can read/execute
chmod +x run.sh            # make a file executable
chmod 644 config.txt       # owner can read/write, others can only read

Understanding 755:

  • First digit (7) = owner: read + write + execute
  • Second digit (5) = group: read + execute
  • Third digit (5) = others: read + execute

When you use it: Any time you want to run a Python or shell script directly from the terminal, you need to make it executable with chmod +x.


14. sudo — Run as Administrator

What it does: Runs a command with administrator (root) privileges.

sudo apt update                       # update package list
sudo apt install python3-pip          # install software
sudo chmod 777 /var/www/html          # change permissions on system folders

When you use it: Installing software, changing system files, or running anything that requires admin access.

⚠️ Only use sudo when you actually need it. Running everything as sudo is a security risk.


Process Management

15. ps aux — View Running Processes

What it does: Shows all currently running processes on the system.

ps aux                                # show all processes
ps aux | grep python                  # find all running Python processes
ps aux | grep streamlit               # check if your Streamlit app is running

The | (pipe) sends the output of ps aux directly into grep — so you only see processes matching "python".

When you use it: When a script seems stuck and you need to find its process ID to stop it.


16. kill — Stop a Running Process

What it does: Stops a running process using its process ID (PID).

kill 1234                             # politely ask process 1234 to stop
kill -9 1234                          # force stop process 1234 immediately

To find the PID, use ps aux | grep python first, then note the number in the second column.

When you use it: When a program freezes or a server won't stop with Ctrl+C.


Networking

17. ping — Test Network Connection

What it does: Checks if a server or website is reachable from your machine.

ping google.com                       # test internet connection
ping 192.168.1.1                      # test connection to your router
ping -c 4 google.com                  # send exactly 4 packets then stop

When you use it: First step when diagnosing network problems. "Is the server down or is my internet down?"


18. curl — Transfer Data from URLs

What it does: Downloads content from a URL or sends HTTP requests.

curl https://example.com              # get the HTML of a webpage
curl -O https://example.com/file.zip  # download a file
curl -X POST https://api.example.com/data -d '{"key":"value"}'  # send a POST request

When you use it: Testing your own APIs, downloading files, or checking if a web server is responding. Essential for backend development and cybersecurity testing.


Package Management

19. apt — Install and Manage Software (Ubuntu/Debian)

What it does: Installs, updates, and removes software packages.

sudo apt update                       # refresh the list of available packages
sudo apt upgrade                      # upgrade all installed packages
sudo apt install python3-pip          # install a specific package
sudo apt install git                  # install git
sudo apt remove package-name          # uninstall a package

Always run sudo apt update before installing anything — this ensures you get the latest version.

When you use it: Installing any tool or software on a Linux system.


20. history — View Command History

What it does: Shows a numbered list of all commands you have previously run.

history                               # show all previous commands
history | grep git                    # find all git commands you've run
history | tail -20                    # show the last 20 commands
!42                                   # re-run command number 42 from history
!!                                    # re-run the last command

When you use it: When you ran a command earlier and want to run it again but can't remember exactly what you typed. Also useful for finding commands you use often.


Bonus — 3 Shortcuts That Save Time Every Day

These are not commands but keyboard shortcuts that will make your terminal life significantly faster:

Shortcut What it does
Ctrl + C Cancel the current running command immediately
Ctrl + Z Pause the current process and send it to background
Tab Auto-complete file names and commands — press once to complete, twice to see options
↑ arrow Cycle through previous commands — faster than retyping
Ctrl + L Clear the screen (same as clear)

The Tab key is the single most underused feature in the terminal. Get in the habit of pressing Tab after typing the first few letters of any file name — it completes the rest automatically.



Quick Reference — All 20 Commands

# Command What it does
1 pwd Show current location
2 ls -la List all files with details
3 cd Change directory
4 mkdir -p Create folders
5 clear Clear terminal screen
6 touch Create empty file
7 cp -r Copy files and folders
8 mv Move or rename
9 rm -r Delete files and folders
10 cat Read file contents
11 grep -r Search inside files
12 find Find files by name
13 chmod Change permissions
14 sudo Run as administrator
15 ps aux View running processes
16 kill Stop a process
17 ping Test network connection
18 curl Transfer data from URLs
19 apt Install software
20 history View command history

Try It Yourself — Challenge

Open your terminal right now and try this sequence:

mkdir linux-practice
cd linux-practice
touch hello.py
echo "print('Hello from Linux!')" > hello.py
cat hello.py
python3 hello.py
ls -la
cd ..
rm -r linux-practice

This uses 7 commands from this article in one go. If everything ran without errors — you are already comfortable with the Linux terminal.


What to Learn Next

These 20 commands are your foundation. Once you are comfortable with them, explore:

Topic What it covers
Bash scripting Automate tasks by writing shell scripts
File permissions in depth Understanding rwx and chmod numbers fully
SSH Connect to remote servers securely
Vim / Nano Edit files directly in the terminal
Cron jobs Schedule commands to run automatically
Networking tools netstat, nmap, traceroute for deeper network analysis

Summary — What You Learned Today

  • ✅ 5 navigation commands — move around the file system confidently
  • ✅ 5 file operation commands — create, copy, move, delete files
  • ✅ 2 search commands — find files and search inside them
  • ✅ 2 permission commands — control who can access your files
  • ✅ 2 process commands — see and stop running programs
  • ✅ 2 networking commands — test connections and talk to servers
  • ✅ 1 package manager — install software properly
  • ✅ 1 history command — never retype a long command again
  • ✅ 5 keyboard shortcuts — work faster every day

All Code on GitHub

The terminal practice script from this article is in my GitHub:

📌 GitHub Repository:
https://github.com/prakashgangurde-ux/linux-notes


Let's Connect

If this article helped you, please clap on Medium — it helps other students find it.

Drop any question in the comments — I read and reply to every one.


Next article: **How I Built an AI-Powered Network Intrusion Detection System as a BCA Student**


Written by Prakash Gangurde — BCA Student | Technical Content Creator | AI • Python • Linux