iTranslated by AI
A Beginner's Guide to Quick WSL2 Environment Setup for Students Lost in Linux and C Programming
🔖 1. Introduction
I dedicate this article to all of you who are currently in tears, thinking:
"Linux? What's that? Is it edible?"
"I just bought this Windows PC and I have no idea what I'm doing. What should I do?"
Don't worry. By using WSL2 (Windows Subsystem for Linux 2), you can set up your learning environment at lightning speed.
Once Linux is running on your PC, you won't have to go all the way to the university computer lab just for that.
It'll make your studies more efficient and reduce your stress.
...Probably.
🔖 2. Prerequisites
- Windows 10/11 (Update it before you come here)
- Internet connection (You have one, right?)
- A minimum amount of motivation (It'll evaporate naturally while reading, so refill it frequently)
🔖 3. WSL2 Installation Steps
First, launch the Command Prompt in Administrator mode.
Don't know what Administrator mode is?
I'd like to say I don't know either, but I'll teach you since I have no choice.
Type "Command Prompt" into the search box on the taskbar.
The Command Prompt icon will appear; right-click it and select "Run as administrator." Easy, right?

Command Prompt in Administrator Mode
Is it running?
Once it's open, don't overthink it—just type the following command and hit Enter.
wsl --install
Then the installation will begin, and both WSL2 and Ubuntu will be installed.
"Ubuntu? Did I just install something dangerous?"
Relax. I thought the same thing at first.
Ubuntu is one of the most famous Linux distributions. You're safe.
...Still don't get it?
There are many different versions (distributions) derived from Linux.
Ubuntu is like a "famous brand" among the many Linux options. In baseball terms, it's the Yankees; in manga terms, it's One Piece.
Got it?
While I was talking nonsense, the installation probably finished, right?
Not yet?
Sometimes it takes a while, so go grab a coffee and wait.
Finished?
Once it's done, you'll likely be asked to restart, so go ahead and restart your PC.

Restart required
After restarting, a black screen will appear and the Ubuntu installation will continue.
Once the installation is complete, the following window will be displayed.
Something like this ↓

Welcome to WSL
By the way, this window isn't very useful, so you can close it at lightning speed.
Open the Start menu, find the orange Ubuntu icon, and click it.
Then, a terminal will open and ask you to enter a Linux username and password, so enter whatever name and password you like.

Username and password registration screen
Just a heads-up: don't forget your ID and password.
If you forget them, you'll have to uninstall Ubuntu and start all over again.
🔖 4. Development Environment Setup
Once it's running, for now, make sure Ubuntu is up to date.
It's like Windows Update.
You can update to the latest version by running the following incantation.
Unlike Windows, it won't automatically apply patches for you, so it's a good idea to run it manually on a regular basis.
# Magic incantation to update Linux to the latest environment
sudo apt update && sudo apt upgrade -y
Next, install the C language development environment.
Just run the following command.
It's easy from here on out, right?
# Magic command to set up the C language development environment
sudo apt install build-essential -y
🔖 5. Let's try Hello World
Next is the operation check.
Let's make the customary Hello World in C.
First, create a folder for testing and move into it.
cd # Move to the home directory
mkdir test # Create the test directory
cd test # Move to the test directory
Next, create the source file.
For the editor, we'll use nano for now.
nano hello.c # Edit the hello.c file with the nano editor
Once the editor starts, type in the following program.
If it's too much trouble, you can just copy and paste it.
#include <stdio.h>
int main() {
printf("Hello, World!\n");
return 0;
}
When you're finished writing, press Ctrl+S to save and Ctrl+X to exit the editor.
Now it's finally time to compile and run it.
gcc hello.c -o hello # Compile hello.c and output the hello file
./hello # Execute the compiled executable file
Did it display Hello, World!?
Be moved to tears.
🔖 6. For More Convenience (Optional)
📝 Editors
We used nano this time, but in modern warfare, it's considered outdated equipment.
Also, depending on your professor, they might recommend vim or emacs to you.
Especially if they force emacs on you, just think of it as being recruited into a strange religion.
It's best to say "Yes, I understand," while using a different editor behind their back.
Developing with vim or emacs is like charging a tank with a bamboo spear.
Don't say I didn't warn you—just don't do it.
I recommend using Visual Studio Code (VSCode).
By installing VSCode on the Windows side and adding the WSL extension, you can easily integrate it with Ubuntu.
There are plenty of VSCode installation guides on the internet, so look them up. It's not difficult.
I'll provide the download link just in case.
Once you've installed the WSL extension, run the following command from your Ubuntu terminal.
# Make sure you're in the test folder before running this
code .
See? Now you can see inside the test folder in VSCode.
After that, you can just edit hello.c as usual.
📁 File Explorer
In the Ubuntu terminal, it's hard to tell where you created things, right?
You could use ls to check bit by bit, but for those of you used to Windows, it might make you want to cry.
In such cases, use this incantation.
explorer.exe . # Launch File Explorer on Windows
Look! Windows File Explorer opens up, and you can see the folder structure.
Ah, so convenient. This is the fruit of civilization.
Now the world is yours.
🔖 7. Conclusion
Did it work for now?
If you managed this, you're seriously awesome.
I mean it!
If you've come this far, you're no longer just a lost lamb.
You've properly stepped into the alternate world of Linux and learned how to use your first magic spell by yourself.
Fantastic.
At first, you might be scared because there's so much you don't know, but don't worry.
Both Linux and the C language will go from "I don't know" to "I can manage" to "This is fun" once you get used to them.
Got an error? Did the screen go black and freeze? It's okay—that's all part of the adventure.
Don't rush, don't get angry, and just keep moving forward with a smile every now and then.
See ya, Hero.
One last important thing: don't just think, move your hands.
How much you can output will be the turning point between winning and losing.
Also, absolutely do not forget your password. Seriously.
Discussion