ABSTRACT
The goal of this coding tutorial is to set up a unix-like environment on your computer.
- macOS or Linux: You are already set! Move directly to the next tutorial 12_terminal
- Windows: Follow the steps bellow to create a “sandbox” where you can run Ubuntu safely inside your current Windows system.
Why do you need a Unix environment?
Most professional software development, cloud servers, and scientific computing tools are built for Unix. Using it across all computers ensures:
- Consistency: avoid the “it works on my computer” problem.
- Better tools: access to industry-standard utilities like Bash, Git, and Docker.
- Seamless Paths: No inconsistency between Windows backslashes (
\) and Unix forward slashes (/).
1. Identify your operating system
If you are on macOS:
- Press
Cmd + Space, type “Terminal” and hit Enter. - Type
uname -sand press Enter. - If it says
Darwinyou environment is ready.
If you are on Linux, you already know.
If you are on Windows, you don’t have a Unix-based command line. Instead of creating a full Virtual Machine, we will use Windows Subsystem for Linux (WSL), which is much easier and faster.
WSL
- Open PowerShell as Administrator: Right-click the Start button and select “Terminal (Admin)” or “PowerShell (Admin)“.
- Install Ubuntu: Type
wsl --installand press Enter. - Restart: Once the process finishes, restart your computer.
- Launch: After restarting, open “Ubuntu” from your Start menu. It will ask you to create a username and password.
You can verify the installation by running the following command: lsb_release -a.
SUCCESS
Congratulations! You now have a Unix environment ready. Continue learning how to use the 12_terminal.