CareerByteCode
ByteBlogby CareerByteCode

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.

From Windows to Linux: A Gentle Start for Beginners

✍️ 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:

Windows and Linux in one picture
Windows has drives and clicks; Linux has one tree that starts at / and a terminal where you type what you want
  • 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\Documents becomes /home/ana/Documents. Your home folder is also written ~.
  • Case matters. Report.txt and report.txt are 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 put sudo in front of a command.

Your cheat sheet for this lab:

On WindowsOn LinuxWhat it does
File Explorer, dirls, treelist files and folders
cd, the address barcd, pwdmove around, show where you are
New folder, mdmkdir -pmake folders
Copy, copycpcopy
Rename, Move, movemvrename or move (the same command)
Delete, delrm (no Recycle Bin!)delete
Notepadnano, catedit, read a file
Search box, findstrfind, grepfind files, find text in files
Send to Compressed folderzip, unzipzip files
Task Managerps, top, killprograms and their CPU and memory
Services (services.msc)systemctlbackground services
Programs and Features, Microsoft Storeaptinstall and list software
ipconfig, ping, netstatip, ping, ssnetwork
%PATH%, set$PATH, exportenvironment variables
Run as administratorsudodo admin work

Before you start

  1. A Google Cloud account (the free trial works) and a project.
  2. 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.com

Part 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 works

From 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-b

On 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 dos2unix

The 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
Files the Linux way
pwd, the top of the tree, then new folders, a copy, a rename, a delete and the tree view

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.txt
Report.txt
report.txt
cat: REPORT.txt: No such file or directory

Two 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.txt
My
Notes.txt
My Notes.txt
My Notes.txt

touch 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 terminators

The 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.sh
dos2unix: converting file win.sh to Unix format...
win.sh: Bourne-Again shell script, ASCII text executable
hello from a Windows file
CRLF fixed
Case sensitivity, a space in a name, a CRLF script that cannot run, and dos2unix fixing it

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 color

The 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
Task Manager and search
Programs by memory, running services, installed packages, then find, grep and zip

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 -4
lo               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 builtin

Step 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.conf
touch: cannot touch '/etc/test.conf': Permission denied
-rw-r--r-- 1 root root 0 Nov 18 20:17 /etc/test.conf
Network, PATH and sudo
ipconfig, ping and netstat the Linux way, PATH with : separators, and sudo for admin work

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.txt and report.txt are 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, netstat and Run as administrator.

Quiz task: check what you learned

  1. What is the Linux path of the Windows folder C:\Users\ana\Downloads? (Answer: /home/ana/Downloads, or ~/Downloads when you are ana.)
  2. Rename draft.txt to final.txt. (Answer: mv draft.txt final.txt.)
  3. Find every file that contains the word error in /var/log. (Answer: sudo grep -rl error /var/log.)
  4. A script says cannot execute: required file not found but the file exists. What do you check? (Answer: file script.sh for CRLF line ends, then dos2unix script.sh.)
  5. 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
Clean up
The win-lab VM and its disk are deleted: 0 left

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 seeWhyFix
No such file or directory but the file is thereA capital letter differsCheck the exact name with ls
One file became twoA space in the nameUse quotes: "My Notes.txt"
cannot execute: required file not found or bad interpreterWindows CRLF line endsdos2unix script.sh
Permission denied writing in /etcSystem files belong to rootsudo for that one command
command not foundThe program is not installed or not in PATHsudo apt install <name>, or use the full path
ping never stopsLinux pings forever by defaultCtrl+C, or ping -c 4

What next

Prepared by the CareerByteCode Team from our tested lab, with AI help for the write-up.

Read next →Linux for Cloud Beginners: 50 Commands on a Free VM⏱ 17 min

⭐ Keep learning with CareerByteCode

Hand-picked to go deeper on this topic
News, guides and updates from the CareerByteCode team
🏅 Expert writer

The CareerByteCode team writes about what is new on careerbytecode.in: courses, labs, exams, events and the community, which is free to join for influencers and content creators in tech.

Get 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.

💬 Comments (0)

Top · Newest

Sign in to comment

Related blogs

🧪⭐ Recommended by CareerByteCode · ByteLabs project bundleCloud and DevOps Realtime Starterโ‚น499Build the projects →