From Windows to Linux: A Gentle Start for Beginners
What you build: everyday Windows tasks (files, search, zip, Task Manager, services, apps, network, admin) done the Linux way on a free VM, plus the 3 classic surprises and their fixes.

✍️ Translate this blog into Hindi, Tamil or Telugu
If you have used Windows all your life, your first Linux terminal can feel like a blank wall. The good news: almost everything you do on Windows every day (open folders, copy and rename files, look at Task Manager, install programs, check your network) has a simple Linux command. In this lab you do those everyday tasks on a free Google Cloud Linux VM, side by side with the Windows way, and you meet the three surprises that trip up every Windows user: names that care about capital letters, spaces in file names, and scripts saved on Windows that Linux refuses to run.
Who it is for: complete beginners who know Windows and are starting with Linux for a cloud or DevOps career. Time: about 1 hour. Cost: free. An e2-micro VM in us-east1 is in Google Cloud's Always Free tier (one per account), and we delete it at the end.
Every command below was run for real by the CareerByteCode Team on a fresh Google Cloud project, and every output and screenshot is the real result we got. Only dates and times will differ on your machine.
🧪⭐ Recommended by CareerByteCode · ByteLabs project bundleCloud and DevOps Realtime Starterโน499Build the projects →Part A: Windows and Linux, side by side
The biggest change is not the commands. It is the shape of the system:

- No drive letters. Windows has
C:\,D:\. Linux has one tree that starts at/(called "root"). A second disk is attached as a folder inside that tree. - Forward slashes.
C:\Users\Ana\Documentsbecomes/home/ana/Documents. Your home folder is also written~. - Case matters.
Report.txtandreport.txtare two different files. - You type, it does. Most servers have no desktop at all. The terminal (also called the shell, here
bash) is how you work. - An administrator is
root. Instead of "Run as administrator", you putsudoin front of a command.
Your cheat sheet for this lab:
| On Windows | On Linux | What it does |
|---|---|---|
File Explorer, dir | ls, tree | list files and folders |
cd, the address bar | cd, pwd | move around, show where you are |
New folder, md | mkdir -p | make folders |
Copy, copy | cp | copy |
Rename, Move, move | mv | rename or move (the same command) |
Delete, del | rm (no Recycle Bin!) | delete |
| Notepad | nano, cat | edit, read a file |
Search box, findstr | find, grep | find files, find text in files |
| Send to Compressed folder | zip, unzip | zip files |
| Task Manager | ps, top, kill | programs and their CPU and memory |
Services (services.msc) | systemctl | background services |
| Programs and Features, Microsoft Store | apt | install and list software |
ipconfig, ping, netstat | ip, ping, ss | network |
%PATH%, set | $PATH, export | environment variables |
| Run as administrator | sudo | do admin work |
Before you start
- A Google Cloud account (the free trial works) and a project.
- Open Cloud Shell (the
>_icon at the top right of the Google Cloud console). Cloud Shell is itself a small Linux machine in your browser. Set your project:
export PROJECT_ID="your-project-id"
gcloud config set project $PROJECT_ID
gcloud services enable compute.googleapis.comPart B: the lab
Step 1: a free Linux VM
Why: your own Linux server (Debian 12) to practise on, where nothing can go wrong for anybody else. --no-service-account --no-scopes gives it no Google Cloud permissions; this lab needs none.
gcloud compute instances create win-lab --zone=us-east1-b --machine-type=e2-micro \
--image-family=debian-12 --image-project=debian-cloud --boot-disk-size=10GB --boot-disk-type=pd-standard \
--no-service-account --no-scopes 2>&1 | tail -2
until gcloud compute ssh win-lab --zone=us-east1-b --tunnel-through-iap --command="echo ssh ok" 2>/dev/null | grep -q ok; do sleep 10; done; echo "SSH works"NAME ZONE MACHINE_TYPE PREEMPTIBLE INTERNAL_IP EXTERNAL_IP STATUS
win-lab us-east1-b e2-micro 10.142.0.17 EXTERNAL_IP RUNNING
SSH worksFrom here on: open an interactive SSH session with the VM using the command below (run it in Cloud Shell; or in the console click Compute Engine > VM instances > SSH next to win-lab, and a terminal opens in a browser window). Once you see the VM terminal prompt (you@win-lab:~$), run the next boxes there.
gcloud compute ssh win-lab --zone=us-east1-bOn the VM: everything from here to the clean up runs inside the VM, in a folder ~/lab279 (mkdir -p ~/lab279 && cd ~/lab279).
Step 2: where am I? (This PC, the Linux way)
Why: pwd (print working directory) shows the folder you are in, like the Explorer address bar. ls / lists the top of the tree. Then we install four small programs with apt, the Linux "app store" (sudo because installing is admin work).
# "This PC" on Linux: one tree that starts at / (no C: drive). Where am I, what is here?
mkdir -p ~/lab279 && cd ~/lab279
pwd
ls /
sudo apt-get update -qq && sudo DEBIAN_FRONTEND=noninteractive apt-get install -y -qq tree zip unzip dos2unix > /dev/null && echo "installed tree zip unzip dos2unix"/home/you/lab279
bin
boot
dev
etc
home
lib
lib64
lost+found
...
tmp
usr
var
installed tree zip unzip dos2unixThe folders you will meet most: /home (users' own folders, like C:\Users), /etc (settings, like the registry but plain text files), /var/log (logs, like Event Viewer), /tmp (temporary files) and /usr/bin (programs, like C:\Program Files).
Step 3: everyday file work
Why: the same things you do with right-click in Explorer. mkdir -p makes a folder and any missing parent folders. echo "..." > file writes a line into a new file (a quick Notepad). cp copies, mv renames, cat shows the content, rm deletes. tree draws the folders.
# Everyday file work: New folder, copy, rename (move), delete, view
cd ~/lab279
mkdir -p Documents/projects Downloads
echo "Meeting at 10, room 4" > Documents/todo.txt
cp Documents/todo.txt Documents/projects/todo-copy.txt
mv Documents/projects/todo-copy.txt Documents/projects/plan.txt
cat Documents/projects/plan.txt
rm Documents/projects/plan.txt
tree --noreport .Meeting at 10, room 4
.
โโโ Documents
โย ย โโโ projects
โย ย โโโ todo.txt
โโโ Downloads
Careful: rm does not use a Recycle Bin. A deleted file is gone. For editing files on a server, nano file.txt opens a simple editor (Ctrl+O saves, Ctrl+X exits).
Break it 1: capital letters matter
On Windows, Report.txt and report.txt are the same file. On Linux they are two.
# Break it: Linux file names are case sensitive (Windows does not care)
cd ~/lab279
echo "big R" > Report.txt; echo "small r" > report.txt
ls -1 [Rr]eport.txt
cat REPORT.txtReport.txt
report.txt
cat: REPORT.txt: No such file or directoryTwo different files live side by side, and REPORT.txt does not exist at all. This bites people who copy a website from Windows to a Linux server: a link to Logo.PNG breaks when the file is logo.png. Rule: use lowercase names with dashes, like monthly-report.txt.
Break it 2: a space in a file name
# Break it: a space in a file name splits it into two names
cd ~/lab279
touch My Notes.txt
ls -1 | grep -iE "^(my|notes)"
rm My Notes.txt
touch "My Notes.txt"; ls -1 | grep -i notes
ls My\ Notes.txtMy
Notes.txt
My Notes.txt
My Notes.txttouch My Notes.txt made two files, My and Notes.txt, because the shell splits words at spaces. Put the name in quotes ("My Notes.txt") or put a backslash before the space (My\ Notes.txt). On servers, avoid spaces in names: use my-notes.txt.
Break it 3: a script saved on Windows
Windows ends each line of a text file with two invisible characters (CR LF, written \r\n). Linux uses one (LF, \n). A script written in Windows Notepad and copied to Linux keeps the extra \r, and that breaks it.
# Break it: a script saved on Windows (CRLF line ends) will not run on Linux
cd ~/lab279
printf '#!/bin/bash\r\necho "hello from a Windows file"\r\n' > win.sh && chmod +x win.sh
./win.sh
file win.sh-bash: ./win.sh: cannot execute: required file not found
win.sh: Bourne-Again shell script, ASCII text executable, with CRLF line terminatorsThe error cannot execute: required file not found is confusing: the file is right there. Linux is looking for a program called /bin/bash\r (with the invisible \r), which does not exist. The file command gives it away: with CRLF line terminators. (Older Linux versions say bad interpreter for the same problem.)
Fix it: dos2unix
# Fix it: convert the line ends with dos2unix
cd ~/lab279
dos2unix win.sh
file win.sh
./win.shdos2unix: converting file win.sh to Unix format...
win.sh: Bourne-Again shell script, ASCII text executable
hello from a Windows file
dos2unix removes the \r characters. In VS Code you can also click CRLF in the bottom bar and choose LF before you save, and in Git set git config --global core.autocrlf input.
Step 4: Task Manager, Services and installed programs
Why: ps lists running programs (--sort=-%mem puts the biggest memory users first; top is the live, updating version). systemctl list-units --type=service is the Services window. apt list --installed is Programs and Features, and apt show describes one package.
# Task Manager, Services and "Programs and Features", the Linux way
ps -eo pid,%cpu,%mem,comm --sort=-%mem | head -4
systemctl list-units --type=service --state=running --no-pager | head -5
apt list --installed 2>/dev/null | wc -l
apt show tree 2>/dev/null | grep -E "^(Package|Version|Description)" PID %CPU %MEM COMMAND
449 0.2 6.1 google_osconfig
468 0.4 2.8 core_plugin
433 0.2 2.6 google_guest_ag
UNIT LOAD ACTIVE SUB DESCRIPTION
cron.service loaded active running Regular background program processing daemon
dbus.service loaded active running D-Bus System Message Bus
exim4.service loaded active running LSB: exim Mail Transport Agent
getty@tty1.service loaded active running Getty on tty1
365
Package: tree
Version: 2.1.0-1
Description: displays an indented directory tree, in colorThe biggest programs on this small VM are Google's own guest agents. cron (the task scheduler, like Windows Task Scheduler) is a running service. 365 packages are installed. To end a program, use kill <PID> (like End task).
Step 5: search and zip
Why: find searches for files by name (like the Explorer search box), grep -rn searches inside files and shows the line number (like findstr /s /n), zip -r zips a folder and unzip -l lists what is inside a zip. du -sh shows a folder's size (like Properties).
# Search for files (like the Explorer search box) and inside files (like findstr)
cd ~/lab279
find ~/lab279 -name "*.txt" | sed "s|$HOME|~|"
grep -rn "Meeting" ~/lab279 | sed "s|$HOME|~|"
zip -qr docs.zip Documents && unzip -l docs.zip
du -sh Documents🎓⭐ Recommended by CareerByteCode · Live trainingCloud & DevOps Live Cohort Internshipโน2,360See the training →~/lab279/Documents/todo.txt
~/lab279/Report.txt
~/lab279/My Notes.txt
~/lab279/report.txt
~/lab279/Documents/todo.txt:1:Meeting at 10, room 4
Archive: docs.zip
Length Date Time Name
--------- ---------- ----- ----
0 2026-11-18 20:15 Documents/
22 2026-11-18 20:15 Documents/todo.txt
0 2026-11-18 20:15 Documents/projects/
--------- -------
22 3 files
12K Documents
Step 6: network commands
Why: ip -br addr is ipconfig, ping works the same (here -c 2 stops after 2 pings; on Linux it runs forever without it), and ss -tln replaces netstat -an to show listening ports.
# ipconfig, ping and netstat, the Linux way
ip -br addr
ping -c 2 -q www.google.com | tail -2
ss -tln | head -4lo UNKNOWN 127.0.0.1/8 ::1/128
ens4 UP 10.142.0.17/32 metric 100 fe80::4001:aff:fe8e:11/64
2 packets transmitted, 2 received, 0% packet loss, time 1002ms
rtt min/avg/max/mdev = 0.601/0.620/0.639/0.019 ms
State Recv-Q Send-Q Local Address:Port Peer Address:PortProcess
LISTEN 0 4096 127.0.0.53%lo:53 0.0.0.0:*
LISTEN 0 20 127.0.0.1:25 0.0.0.0:*
LISTEN 0 4096 127.0.0.54:53 0.0.0.0:*Step 7: environment variables and PATH
Why: PATH is the list of folders where the shell looks for programs, as on Windows, but the separator is : instead of ; and you write $PATH instead of %PATH%. export sets a variable (like set), which finds a program (like where), and type tells you whether something is a program or built into the shell.
# Environment variables and PATH (%PATH% on Windows is $PATH here, and ; becomes :)
echo $PATH | tr ':' '\n' | head -4
export GREETING="hello"; echo "$GREETING"
which python3 ls
type cd/usr/local/bin
/usr/bin
/bin
/usr/games
hello
/usr/bin/python3
/usr/bin/ls
cd is a shell builtinStep 8: "Run as administrator" is sudo
Why: system folders like /etc belong to root. A normal user cannot write there, which protects the system from mistakes. sudo runs one command as root.
# "Run as administrator" = sudo. A normal user cannot touch system files.
touch /etc/test.conf
sudo touch /etc/test.conf && ls -l /etc/test.conf && sudo rm /etc/test.conftouch: cannot touch '/etc/test.conf': Permission denied
-rw-r--r-- 1 root root 0 Nov 18 20:17 /etc/test.conf
Use sudo only for the one command that needs it, never for everyday work. There is no "always run as administrator" button on Linux, and that is a good thing.
POC: prove it works
- You made, copied, renamed and deleted files and folders, and drew them with
tree. - You saw that
Report.txtandreport.txtare two files and that a space split one name into two. - A Windows CRLF script failed and ran after
dos2unix. - You used the Linux versions of Task Manager, Services, Programs and Features, search, zip,
ipconfig,ping,netstatand Run as administrator.
Quiz task: check what you learned
- What is the Linux path of the Windows folder
C:\Users\ana\Downloads? (Answer:/home/ana/Downloads, or~/Downloadswhen you are ana.) - Rename
draft.txttofinal.txt. (Answer:mv draft.txt final.txt.) - Find every file that contains the word
errorin/var/log. (Answer:sudo grep -rl error /var/log.) - A script says
cannot execute: required file not foundbut the file exists. What do you check? (Answer:file script.shfor CRLF line ends, thendos2unix script.sh.) - How do you install the program
htop? (Answer:sudo apt install htop.)
Clean up (delete everything)
Type exit to leave the VM and come back to Cloud Shell, then run this in Cloud Shell:
gcloud compute instances delete win-lab --zone=us-east1-b --quiet 2>&1 | tail -1
echo "win-lab VMs left: $(gcloud compute instances list --filter="name=win-lab" --format="value(name)" | wc -l)"
echo "win-lab disks left: $(gcloud compute disks list --filter="name~^win-lab" --format="value(name)" | wc -l)"Deleted [https://www.googleapis.com/compute/v1/projects/your-project-id/zones/us-east1-b/instances/win-lab].
win-lab VMs left: 0
win-lab disks left: 0
FAQ
Do I need to install Linux on my laptop? No. A free e2-micro VM (as here) or Cloud Shell gives you a real Linux terminal in your browser. On Windows 10 or 11 you can also install WSL (Windows Subsystem for Linux) to run Ubuntu next to Windows.
Which Linux should I learn? Debian or Ubuntu first: they are the most common on cloud servers and use apt. Red Hat style systems (Rocky, RHEL) use dnf instead, but almost every other command is the same.
Is there a Recycle Bin? Not in the terminal. rm deletes for good. Use rm -i to be asked before each file, and keep backups.
What is the difference between a terminal, a shell and bash? The terminal is the window, the shell is the program that reads your commands, and bash is the most common shell. Windows has PowerShell and cmd for the same job.
Why do people say "everything is a file" on Linux? Settings, logs and even disks and devices appear as files in the tree (/etc/..., /var/log/..., /dev/sda). That is why cat, grep and nano work on almost everything.
Can I use a desktop instead? You can install one, but cloud servers rarely have it. Learning the terminal is what jobs ask for.
Troubleshooting
| You see | Why | Fix |
|---|---|---|
No such file or directory but the file is there | A capital letter differs | Check the exact name with ls |
| One file became two | A space in the name | Use quotes: "My Notes.txt" |
cannot execute: required file not found or bad interpreter | Windows CRLF line ends | dos2unix script.sh |
Permission denied writing in /etc | System files belong to root | sudo for that one command |
command not found | The program is not installed or not in PATH | sudo apt install <name>, or use the full path |
ping never stops | Linux pings forever by default | Ctrl+C, or ping -c 4 |
What next
- Practise 50 everyday commands: Linux for Cloud Beginners: 50 Commands on a Free VM.
- Start with Google Cloud itself: Google Cloud for Absolute Beginners: Projects, Billing and Console.
- Turn your commands into scripts: Bash Scripting for DevOps: Automate Boring Tasks.
- More hands-on posts: ByteBlog. Practice in ByteLabs and see the courses.
Prepared by the CareerByteCode Team from our tested lab, with AI help for the write-up.
⭐ Keep learning with CareerByteCode
Hand-picked to go deeper on this topicGet CareerByteCode Team's next blog by email
One email a week when they publish. Add the weekly Best of ByteBlog too. No spam, unsubscribe with one click.
We email you once to confirm. By subscribing you agree to the privacy policy.
Related blogs
CareerByteCode TeamLinux for Cloud Beginners: 50 Commands on a Free VM
What you build: a free e2-micro Linux VM where you practise 50 everyday commands for files, text, permissions, processes, network and packages, in your own Google Cloud account. Every step tested.
#beginners
CareerByteCode TeamCron Jobs and Log Rotation on Linux
What you build: a disk report job run by cron every minute with its log rotated by logrotate, on a free VM, plus 3 real mistakes: relative paths, the % sign and an insecure log folder.
#beginners
CareerByteCode TeamLinux Users, Groups and sudo Explained
What you build: a shared Linux server for 3 people on a free VM: users, a developers group, a sudo rule that allows one job only, visudo catching a typo, the sudo log, and an account locked and remove
#beginners
CareerByteCode TeamLinux File Permissions Explained with Real Mistakes
What you build: a script, a team folder, an SSH key and a config file that break with Permission denied, then work with the right chmod, chown and group, on a free VM.
💬 Comments (0)
Top · NewestSign in to comment