Linux Command Line for Windows Users: 20 Commands to Survive a Server

Linux Command Line for Windows Users: 20 Commands to Survive a Server featured illustration

📎 This article includes 1 downloadable practice file ↓

⏱ 3 min readUpdated 28 September 2026

Sooner or later a data job means logging in to a Linux server over SSH. These commands cover the first weeks.

In this article
  1. Pipes: small tools, big results
  2. A first session on a server, step by step
  3. Permissions in one minute
  4. Editing a file safely
  5. Continue learning
Task Linux Windows equivalent
Where am I? pwd cd
List files (detailed) ls -lh dir
Change folder cd /var/log cd
Show a file cat file.txt, less file.txt type
Last lines of a log, live tail -f app.log —
Search inside files grep -i "error" app.log findstr
Find files by name find . -name "*.csv" dir /s
Copy / move / delete cp / mv / rm copy / move / del
Make a folder mkdir -p a/b mkdir
Disk space df -h, du -sh * —
Running processes top, ps aux Task Manager
Permissions chmod 644 file —
Run as admin sudo command Run as administrator
Download curl -O URL curl
Zip / unzip tar -czf a.tgz folder, unzip f.zip Compress

Pipes: small tools, big results

grep "ERROR" app.log | cut -d' ' -f1 | sort | uniq -c | sort -rn | head

“Count errors per day, most first” — five tiny commands joined with |.

Advertisement
⚠️ rm has no Recycle Bin. Double-check the path, and never run rm -rf on a line you copied without understanding it.

A first session on a server, step by step

Here is what the first ten minutes on a new Linux server usually look like — and what each command tells you.

whoami                 # which user am I?
hostname               # which machine is this?
df -h                  # is the disk nearly full?
free -m                # how much memory is used?
uptime                 # how long running, and load average
ls -lh /var/log        # where the logs live
sudo tail -n 50 /var/log/nginx/error.log   # the last 50 web-server errors

Load average (the three numbers from uptime) is roughly “how many things are waiting for the CPU”. On a 2-CPU server, values around 2 are busy; much higher means something is struggling.

Permissions in one minute

ls -l shows something like -rw-r--r-- 1 www-data www-data. The first three letters after the dash are the owner’s rights (read, write), then the group’s, then everyone else’s. chmod 644 file means owner read/write, others read only — the normal setting for web files. chmod 600 is for secrets like private keys.

Editing a file safely

  1. Make a backup: sudo cp site.conf site.conf.bak
  2. Edit with sudo nano site.conf (save: Ctrl+O, exit: Ctrl+X)
  3. Test before restarting: for Nginx, sudo nginx -t
  4. Only then reload: sudo systemctl reload nginx
💡 The Tab key completes file and command names, and the up arrow repeats the last command — together they remove most typos.

📎 Practice files for this article

  • 📄
    All code from this post2 examples in one file, ready to open in your editor.
    ⬇ SH · 717 B

Free to use for learning. Files with macros (.bas) are plain text — import them with Alt+F11 → File → Import File, and always test on a copy.

✨ Ask AI about this article

Stuck on a step? Ask a question and the AI answers using this article.

Free · AI can be wrong